cvs: php4 /ext/fbsql php_fbsql.c

From: Date: Wed, 25 Apr 2001 19:45:14 +0000
Subject: cvs: php4 /ext/fbsql php_fbsql.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-5263@lists.php.net to get a copy of this message
fmk Wed Apr 25 12:45:14 2001 EDT Modified files: /php4/ext/fbsql php_fbsql.c Log: Remove c++ comment Move errormessage when FBExec is not running. This error should not show if we connect through a port number. Index: php4/ext/fbsql/php_fbsql.c diff -u php4/ext/fbsql/php_fbsql.c:1.13 php4/ext/fbsql/php_fbsql.c:1.14 --- php4/ext/fbsql/php_fbsql.c:1.13 Wed Apr 25 11:01:22 2001 +++ php4/ext/fbsql/php_fbsql.c Wed Apr 25 12:45:13 2001 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_fbsql.c,v 1.13 2001/04/25 18:01:22 fmk Exp $ */ +/* $Id: php_fbsql.c,v 1.14 2001/04/25 19:45:13 fmk Exp $ */ /* TODO: * @@ -521,12 +521,6 @@ { FBCExecHandler* execHandler = fbcehHandlerForHost(hostName,128); list_entry le; - if (execHandler == NULL) - { - php_error(E_WARNING,"Cannot connect to host '%s'",hostName); - php_error(E_WARNING,fbcehClassErrorMessage()); -// return NULL; - } result = malloc(sizeof(PHPFBLink)); result->retainCount = 1; result->persistant = persistant; @@ -1115,7 +1109,15 @@ phpLink = phpfbGetLink(FB_SQL_G(linkIndex)); } if (phpLink == NULL) RETURN_FALSE; -/* printf("Select db at link %s@%s\n",phpLink->hostName,phpLink->userName); */ + if (phpLink->execHandler == NULL) + { + int port = atoi(name); + if (port == 0 || port > 64535) { + php_error(E_WARNING,"Cannot connect to FBExec for database '%s'",name); + php_error(E_WARNING,fbcehClassErrorMessage()); + RETURN_FALSE; + } + } database = phpfbSelectDB(INTERNAL_FUNCTION_PARAM_PASSTHRU,name,phpLink); if (database == NULL) RETURN_FALSE;

« previous php.cvs (#5263) next »