abies           Wed Aug  6 21:00:25 2003 EDT

  Modified files:              
    /php-src/ext/interbase      interbase.c php_interbase.h 
  Log:
  Fixed crash in _php_ibase_error() after request shutdown
  
  
Index: php-src/ext/interbase/interbase.c
diff -u php-src/ext/interbase/interbase.c:1.119 php-src/ext/interbase/interbase.c:1.120
--- php-src/ext/interbase/interbase.c:1.119     Wed Aug  6 20:00:19 2003
+++ php-src/ext/interbase/interbase.c   Wed Aug  6 21:00:22 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: interbase.c,v 1.119 2003/08/07 00:00:19 abies Exp $ */
+/* $Id: interbase.c,v 1.120 2003/08/07 01:00:22 abies Exp $ */
 
 
 /* TODO: Arrays, roles?
@@ -34,6 +34,8 @@
                          emalloc() with do_alloca()
                        - Changes to ibase_query() to enable the use of CREATE 
DATABASE ...
                        - Added ibase_drop_db()
+                       - Added ibase_commit_ret() and ibase_rollback_ret()
+                       - Added ibase_name_result()
                2001-05-31: Jeremy Bettis <[EMAIL PROTECTED]>
                        - If a blob handle was expected and something else was
                          received create a blob and add the value to it.
@@ -575,7 +577,6 @@
        ibase_globals->timestampformat = NULL;
        ibase_globals->dateformat = NULL;
        ibase_globals->timeformat = NULL;
-       ibase_globals->errmsg = NULL;
        ibase_globals->num_persistent = 0;
 }
 
@@ -632,10 +633,7 @@
        }
        IBG(timeformat) = DL_STRDUP(IBG(cfg_timeformat));
 
-       if (IBG(errmsg)) {
-               DL_FREE(IBG(errmsg));
-       }
-       IBG(errmsg) = DL_MALLOC(sizeof(char)*MAX_ERRMSG+1);
+       RESET_ERRMSG;
 
        return SUCCESS;
 }
@@ -663,11 +661,6 @@
        }
        IBG(timeformat) = NULL;
 
-       if (IBG(errmsg)) {
-               DL_FREE(IBG(errmsg));
-       }
-       IBG(errmsg) = NULL;
-
        return SUCCESS;
 } 
  
@@ -677,7 +670,7 @@
 
        php_info_print_table_start();
        php_info_print_table_row(2, "Interbase Support", "enabled");
-       php_info_print_table_row(2, "Revision", "$Revision: 1.119 $");
+       php_info_print_table_row(2, "Revision", "$Revision: 1.120 $");
 #ifdef COMPILE_DL_INTERBASE
        php_info_print_table_row(2, "Dynamic Module", "Yes");
 #endif
Index: php-src/ext/interbase/php_interbase.h
diff -u php-src/ext/interbase/php_interbase.h:1.38 
php-src/ext/interbase/php_interbase.h:1.39
--- php-src/ext/interbase/php_interbase.h:1.38  Wed Aug  6 13:51:46 2003
+++ php-src/ext/interbase/php_interbase.h       Wed Aug  6 21:00:22 2003
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_interbase.h,v 1.38 2003/08/06 17:51:46 abies Exp $ */
+/* $Id: php_interbase.h,v 1.39 2003/08/07 01:00:22 abies Exp $ */
 
 #ifndef PHP_INTERBASE_H
 #define PHP_INTERBASE_H
@@ -102,7 +102,7 @@
        char *cfg_dateformat;
        char *timeformat;
        char *cfg_timeformat;
-       char *errmsg;
+       char errmsg[MAX_ERRMSG];
 ZEND_END_MODULE_GLOBALS(ibase)
 
 typedef struct {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to