CVS update: php3/functions
| From: | tommay | Date: | Tue, 03 Nov 1998 02:52:44 +0000 |
| Subject: | CVS update: php3/functions | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-2138@lists.php.net to get a copy of this message | ||
Date: Monday November 2, 1998 @ 21:52
Author: tommay
Update of /repository/php3/functions
In directory asf:/u2/tmp/cvs-serv2614
Modified Files:
sybase-ct.c
Log Message:
exec_cmd() now checks the final return code from ct_results() to decide
whether to return SUCCESS or FAILURE.
Index: php3/functions/sybase-ct.c
diff -c php3/functions/sybase-ct.c:1.46 php3/functions/sybase-ct.c:1.47
*** php3/functions/sybase-ct.c:1.46 Mon Nov 2 20:42:30 1998
--- php3/functions/sybase-ct.c Mon Nov 2 21:52:43 1998
***************
*** 27,33 ****
+----------------------------------------------------------------------+
*/
! /* $Id: sybase-ct.c,v 1.46 1998/11/03 01:42:30 tommay Exp $ */
#ifndef MSVC5
--- 27,33 ----
+----------------------------------------------------------------------+
*/
! /* $Id: sybase-ct.c,v 1.47 1998/11/03 02:52:43 tommay Exp $ */
#ifndef MSVC5
***************
*** 547,552 ****
--- 547,553 ----
static int exec_cmd(sybct_link *sybct_ptr,char *cmdbuf)
{
+ CS_RETCODE retcode;
CS_INT restype;
int failure=0;
***************
*** 562,568 ****
return FAILURE;
}
! while (ct_results(sybct_ptr->cmd, &restype)==CS_SUCCEED) {
switch ((int) restype) {
case CS_CMD_SUCCEED:
case CS_CMD_DONE:
--- 563,569 ----
return FAILURE;
}
! while ((retcode = ct_results(sybct_ptr->cmd, &restype))==CS_SUCCEED) {
switch ((int) restype) {
case CS_CMD_SUCCEED:
case CS_CMD_DONE:
***************
*** 586,592 ****
}
}
! return SUCCESS;
}
--- 587,610 ----
}
}
! switch (retcode) {
! case CS_END_RESULTS:
! return SUCCESS;
! break;
!
! case CS_FAIL:
! /* Hopefully this either cleans up the connection, or the
! * connection ends up marked dead so it will be reopened
! * if it is persistent. We may want to do
! * ct_close(CS_FORCE_CLOSE) if ct_cancel() fails; see the
! * doc for ct_results()==CS_FAIL.
! */
! ct_cancel(NULL, sybct_ptr->cmd, CS_CANCEL_ALL);
! return FAILURE;
!
! default:
! return FAILURE;
! }
}
--
PHP Development Mailing List http://www.php.net/
To unsubscribe send an empty message to php-dev-unsubscribe@lists.php.net
For help: php-dev-help@lists.php.net