[xdebug-dev] xdebug xdebug/xdebug_handler_dbgp.c - Flush the log so that it is also useful if things crash.

From: Derick Rethans <derick[@]derickrethans.nl>
Date: Thu, 6 Apr 2006 08:38:54 +0200

Date: Thu Apr 6 08:38:53 CEST 2006
User: Derick Rethans
Directory: xdebug

Log Message:
[0.05]
- Flush the log so that it is also useful if things crash.

Modified files:
           xdebug/xdebug_handler_dbgp.c (version: 1.88)

[FILE: /xdebug/xdebug_handler_dbgp.c]

===================================================================
RCS file: cvstemp,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- xdebug/xdebug_handler_dbgp.c:1.87 Tue Apr 04 15:01:10 2006 GMT
+++ xdebug/xdebug_handler_dbgp.c Thu Apr 06 04:38:53 2006 GMT
@@ -231,6 +231,7 @@
         xdebug_xml_return_node(message, &xml_message);
         if (XG(remote_log_file)) {
                 fprintf(XG(remote_log_file), "-> %s\n\n", xml_message.d);
+ fflush(XG(remote_log_file));
         }
 
         xdebug_str_add(ret, xdebug_sprintf("%d", xml_message.l), 1);
@@ -2025,6 +2026,7 @@
 
         if (XG(remote_log_file)) {
                 fprintf(XG(remote_log_file), "<- %s\n", line);
+ fflush(XG(remote_log_file));
         }
         res = xdebug_dbgp_parse_cmd(line, (char**) &cmd, (xdebug_dbgp_arg**) &args);
 
@@ -2084,7 +2086,7 @@
 
 char *xdebug_dbgp_get_revision(void)
 {
- return "$Revision: 1.87 $";
+ return "$Revision: 1.88 $";
 }
 
 int xdebug_dbgp_cmdloop(xdebug_con *context TSRMLS_DC)
@@ -2213,6 +2215,7 @@
         if (XG(remote_log_file)) {
                 char *timestr = xdebug_get_time();
                 fprintf(XG(remote_log_file), "Log opened at %s\n", timestr);
+ fflush(XG(remote_log_file));
                 xdfree(timestr);
         }
 
@@ -2264,6 +2267,7 @@
         if (XG(remote_log_file)) {
                 char *timestr = xdebug_get_time();
                 fprintf(XG(remote_log_file), "Log closed at %s\n\n", timestr);
+ fflush(XG(remote_log_file));
                 xdfree(timestr);
                 fclose(XG(remote_log_file));
                 XG(remote_log_file) = NULL;
Received on Thu Apr 06 2006 - 08:38:58 BST

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