[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r2215 - GNUnet/src/applications/transport
From: |
grothoff |
Subject: |
[GNUnet-SVN] r2215 - GNUnet/src/applications/transport |
Date: |
Thu, 27 Oct 2005 12:18:44 -0700 (PDT) |
Author: grothoff
Date: 2005-10-27 12:18:43 -0700 (Thu, 27 Oct 2005)
New Revision: 2215
Modified:
GNUnet/src/applications/transport/transport.c
Log:
cleanup
Modified: GNUnet/src/applications/transport/transport.c
===================================================================
--- GNUnet/src/applications/transport/transport.c 2005-10-26 20:45:21 UTC
(rev 2214)
+++ GNUnet/src/applications/transport/transport.c 2005-10-27 19:18:43 UTC
(rev 2215)
@@ -1,5 +1,6 @@
/*
This file is part of GNUnet
+ (C) 2001, 2002, 2004, 2005 Christian Grothoff (and other contributing
authors)
GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
@@ -597,7 +598,8 @@
ctapi.receive = NULL;
}
-static void initHello(TransportAPI * tapi) {
+static void initHello(void * cls) {
+ TransportAPI * tapi = cls;
P2P_hello_MESSAGE * helo;
createSignedhello(tapi);
@@ -617,15 +619,25 @@
blocks the startup process in this case.
This is why we create the HELLOs in another
thread. */
- addCronJob((CronJob)&initHello,
+ addCronJob(&initHello,
0,
0,
tapi);
}
+static void doneHelper(TransportAPI * tapi,
+ void * unused) {
+ /* In the (rare) case that we shutdown transports
+ before the cron-jobs had a chance to run, stop
+ the cron-jobs */
+ delCronJob(&initHello,
+ 0,
+ tapi);
+}
+
/**
* Initialize the transport layer.
*/
@@ -756,6 +768,7 @@
int i;
void (*ptr)();
+ forEachTransport(&doneHelper, NULL);
for (i=0;i<tapis_count;i++) {
if (tapis[i] != NULL) {
delCronJob((CronJob)&createSignedhello,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r2215 - GNUnet/src/applications/transport,
grothoff <=