[xdebug-dev] xdebug xdebug/xdebug.c xdebug/xdebug_profiler.c - Fixed bug #289: Xdebug terminates connection when eval() is run in the init

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Sun, 8 Jul 2007 20:33:45 +0200

Date: Sun Jul 8 20:33:44 CEST 2007
User: Derick Rethans
Directory: xdebug

Log Message:
[3.00]
- Fixed bug #289: Xdebug terminates connection when eval() is run in the init
  stage.

Modified files:
           xdebug/xdebug.c (version: 1.398)
           xdebug/xdebug_profiler.c (version: 1.51)

[FILE: /xdebug/xdebug.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.397
retrieving revision 1.398
diff -u -r1.397 -r1.398
--- xdebug/xdebug.c:1.397 Sun Jul 08 10:56:23 2007 GMT
+++ xdebug/xdebug.c Sun Jul 08 16:33:44 2007 GMT
@@ -1403,18 +1403,19 @@
                         /* Initialize debugging session */
                         XG(context).socket = xdebug_create_socket(XG(remote_host), XG(remote_port));
                         if (XG(context).socket >= 0) {
- XG(remote_enabled) = 0;
+ XG(remote_enabled) = 1;
 
                                 /* Get handler from mode */
                                 XG(context).handler = xdebug_handler_get(XG(remote_handler));
                                 if (!XG(context).handler) {
                                         zend_error(E_WARNING, "The remote debug handler '%s' is not supported.", XG(remote_handler));
+ XG(remote_enabled) = 0;
                                 } else if (!XG(context).handler->remote_init(&(XG(context)), XDEBUG_REQ)) {
                                         /* The request could not be started, ignore it then */
+ XG(remote_enabled) = 0;
                                 } else {
                                         /* All is well, turn off script time outs */
                                         zend_alter_ini_entry("max_execution_time", sizeof("max_execution_time"), "0", strlen("0"), PHP_INI_SYSTEM, PHP_INI_STAGE_ACTIVATE);
- XG(remote_enabled) = 1;
                                 }
                         }
                 }

[FILE: /xdebug/xdebug_profiler.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- xdebug/xdebug_profiler.c:1.50 Mon May 14 12:20:40 2007 GMT
+++ xdebug/xdebug_profiler.c Sun Jul 08 16:33:44 2007 GMT
@@ -66,6 +66,7 @@
                 /* Invalid or empty xdebug.profiler_output_name */
                 return FAILURE;
         }
+ php_printf("%p %p\n", XG(profiler_output_dir), fname);
         filename = xdebug_sprintf("%s/%s", XG(profiler_output_dir), fname);
         xdfree(fname);
                 
Received on Sun Jul 08 2007 - 20:33:50 BST

This archive was generated by hypermail 2.2.0 : Sun Jun 24 2018 - 04:00:03 BST