tony2001 Mon Jan 17 13:08:55 2005 EDT
Modified files:
/php-src/ext/odbc php_odbc.c
Log:
fix weird DB2 issue:
DB2's SQLDataSources() returns _max available_ length of result string
instead of
_real_ length and that results in strings a-la "\0 "
http://cvs.php.net/diff.php/php-src/ext/odbc/php_odbc.c?r1=1.183&r2=1.184&ty=u
Index: php-src/ext/odbc/php_odbc.c
diff -u php-src/ext/odbc/php_odbc.c:1.183 php-src/ext/odbc/php_odbc.c:1.184
--- php-src/ext/odbc/php_odbc.c:1.183 Mon Jan 17 10:05:11 2005
+++ php-src/ext/odbc/php_odbc.c Mon Jan 17 13:08:54 2005
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_odbc.c,v 1.183 2005/01/17 15:05:11 tony2001 Exp $ */
+/* $Id: php_odbc.c,v 1.184 2005/01/17 18:08:54 tony2001 Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -1232,8 +1232,8 @@
array_init(return_value);
- add_assoc_stringl_ex(return_value, "server", sizeof("server"),
server_name, len1, 1);
- add_assoc_stringl_ex(return_value, "description",
sizeof("description"), desc, len2, 1);
+ add_assoc_string_ex(return_value, "server", sizeof("server"),
server_name, 1);
+ add_assoc_string_ex(return_value, "description", sizeof("description"),
desc, 1);
}
/* }}} */
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php