[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r12269 - gnunet/src/vpn
From: |
gnunet |
Subject: |
[GNUnet-SVN] r12269 - gnunet/src/vpn |
Date: |
Tue, 20 Jul 2010 10:20:39 +0200 |
Author: toelke
Date: 2010-07-20 10:20:39 +0200 (Tue, 20 Jul 2010)
New Revision: 12269
Modified:
gnunet/src/vpn/gnunet-daemon-vpn.c
Log:
CG could answer my questions
Modified: gnunet/src/vpn/gnunet-daemon-vpn.c
===================================================================
--- gnunet/src/vpn/gnunet-daemon-vpn.c 2010-07-20 08:20:39 UTC (rev 12268)
+++ gnunet/src/vpn/gnunet-daemon-vpn.c 2010-07-20 08:20:39 UTC (rev 12269)
@@ -40,14 +40,14 @@
struct GNUNET_DISK_PipeHandle* helper_out;
const struct GNUNET_DISK_FileHandle* fh_from_helper;
- struct GNUNET_SCHEDULER_Handle *sched; // TODO CG: is that right? Do I
have to carry it around myself?
+ struct GNUNET_SCHEDULER_Handle *sched;
pid_t helper_pid;
};
static void cleanup(void* cls, const struct GNUNET_SCHEDULER_TaskContext*
tskctx) {
struct vpn_cls* mycls = (struct vpn_cls*) cls;
- if (tskctx->reason == GNUNET_SCHEDULER_REASON_SHUTDOWN) {
+ if (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) {
PLIBC_KILL(mycls->helper_pid, SIGTERM);
GNUNET_OS_process_wait(mycls->helper_pid);
}
@@ -59,6 +59,9 @@
int r = 0;
+ if (tsdkctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)
+ return;
+
while (r < sizeof(struct suid_packet_header)) {
int t = GNUNET_DISK_file_read(mycls->fh_from_helper, &hdr,
sizeof(struct suid_packet_header));
if (t< 0) {
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r12269 - gnunet/src/vpn,
gnunet <=