gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r15711 - gnunet/src/vpn


From: gnunet
Subject: [GNUnet-SVN] r15711 - gnunet/src/vpn
Date: Sun, 19 Jun 2011 14:34:14 +0200

Author: toelke
Date: 2011-06-19 14:34:14 +0200 (Sun, 19 Jun 2011)
New Revision: 15711

Modified:
   gnunet/src/vpn/gnunet-daemon-exit.c
   gnunet/src/vpn/gnunet-daemon-vpn-helper.c
   gnunet/src/vpn/gnunet-helper-vpn-api.c
Log:
try to fix the helper-startup and so on

Modified: gnunet/src/vpn/gnunet-daemon-exit.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-exit.c 2011-06-17 20:28:00 UTC (rev 15710)
+++ gnunet/src/vpn/gnunet-daemon-exit.c 2011-06-19 12:34:14 UTC (rev 15711)
@@ -36,6 +36,8 @@
 #include "gnunet-helper-vpn-api.h"
 #include "gnunet-vpn-checksum.h"
 
+GNUNET_SCHEDULER_TaskIdentifier shs_task;
+
 /**
  * The handle to the configuration used throughout the process
  */

Modified: gnunet/src/vpn/gnunet-daemon-vpn-helper.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn-helper.c   2011-06-17 20:28:00 UTC (rev 
15710)
+++ gnunet/src/vpn/gnunet-daemon-vpn-helper.c   2011-06-19 12:34:14 UTC (rev 
15711)
@@ -126,6 +126,8 @@
     restart_hijack = 1;
     if (NULL != dns_connection)
       GNUNET_CLIENT_notify_transmit_ready(dns_connection, sizeof(struct 
GNUNET_MessageHeader), GNUNET_TIME_UNIT_FOREVER_REL, GNUNET_YES, &send_query, 
NULL);
+
+    GNUNET_SCHEDULER_add_write_file (GNUNET_TIME_UNIT_FOREVER_REL, 
helper_handle->fh_to_helper, &helper_write, NULL);
 }
 /*}}}*/
 
@@ -410,5 +412,6 @@
 
 void schedule_helper_write(struct GNUNET_TIME_Relative time, void* cls)
 {
+  if (GNUNET_SCHEDULER_NO_TASK == shs_task) return;
   GNUNET_SCHEDULER_add_write_file (time, helper_handle->fh_to_helper, 
&helper_write, cls);
 }

Modified: gnunet/src/vpn/gnunet-helper-vpn-api.c
===================================================================
--- gnunet/src/vpn/gnunet-helper-vpn-api.c      2011-06-17 20:28:00 UTC (rev 
15710)
+++ gnunet/src/vpn/gnunet-helper-vpn-api.c      2011-06-19 12:34:14 UTC (rev 
15711)
@@ -48,6 +48,8 @@
   GNUNET_SERVER_mst_destroy(handle->mst);
 }
 
+extern GNUNET_SCHEDULER_TaskIdentifier shs_task;
+
 /**
  * Read from the helper-process
  */
@@ -71,7 +73,7 @@
       stop_helper (handle);
 
       /* Restart the helper */
-      GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
+      shs_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
                                     handle->restart_task, handle);
       return;
     }
@@ -84,7 +86,7 @@
       stop_helper (handle);
 
       /* Restart the helper */
-      GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
+      shs_task = GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_SECONDS,
                                     handle->restart_task, handle);
       return;
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]