[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r3269 - GNUnet/src/server
From: |
grothoff |
Subject: |
[GNUnet-SVN] r3269 - GNUnet/src/server |
Date: |
Sun, 20 Aug 2006 13:22:15 -0700 (PDT) |
Author: grothoff
Date: 2006-08-20 13:22:12 -0700 (Sun, 20 Aug 2006)
New Revision: 3269
Modified:
GNUnet/src/server/connection.c
GNUnet/src/server/gnunet-transport-check.c
GNUnet/src/server/gnunetd.c
Log:
fixes
Modified: GNUnet/src/server/connection.c
===================================================================
--- GNUnet/src/server/connection.c 2006-08-20 20:18:02 UTC (rev 3268)
+++ GNUnet/src/server/connection.c 2006-08-20 20:22:12 UTC (rev 3269)
@@ -1422,9 +1422,15 @@
if(stats != NULL)
stats->change(stat_encrypted, p - sizeof(HashCode512));
GE_ASSERT(ectx, be->session.tsession != NULL);
- ret = transport->send(be->session.tsession, encryptedMsg, p);
+ ret = transport->send(be->session.tsession,
+ encryptedMsg,
+ p,
+ NO);
if((ret == NO) && (priority >= EXTREME_PRIORITY)) {
- ret = transport->sendReliable(be->session.tsession, encryptedMsg, p);
+ ret = transport->send(be->session.tsession,
+ encryptedMsg,
+ p,
+ YES);
}
if (ret == YES) {
if(stats != NULL)
@@ -3017,7 +3023,10 @@
memcpy(&buf[sizeof(P2P_PACKET_HEADER)], msg, size);
hash(&hdr->sequenceNumber,
size + sizeof(P2P_PACKET_HEADER) - sizeof(HashCode512), &hdr->hash);
- ret = transport->send(tsession, buf, size + sizeof(P2P_PACKET_HEADER));
+ ret = transport->send(tsession,
+ buf,
+ size + sizeof(P2P_PACKET_HEADER),
+ NO);
FREE(buf);
return ret;
}
Modified: GNUnet/src/server/gnunet-transport-check.c
===================================================================
--- GNUnet/src/server/gnunet-transport-check.c 2006-08-20 20:18:02 UTC (rev
3268)
+++ GNUnet/src/server/gnunet-transport-check.c 2006-08-20 20:22:12 UTC (rev
3269)
@@ -91,7 +91,8 @@
* Test the given transport API.
*/
static void testTAPI(TransportAPI * tapi,
- int * res) {
+ void * ctx) {
+ int * res = ctx;
P2P_hello_MESSAGE * helo;
TSession * tsession;
unsigned long long repeat;
@@ -206,8 +207,9 @@
SEMAPHORE_UP(sem);
}
-static void testPING(P2P_hello_MESSAGE * xhelo,
- int * stats) {
+static void testPING(const P2P_hello_MESSAGE * xhelo,
+ void * arg) {
+ int * stats = arg;
TSession * tsession;
P2P_hello_MESSAGE * helo;
P2P_hello_MESSAGE * myHelo;
@@ -333,6 +335,10 @@
stats[2]++;
}
+static int testTerminate(void * arg) {
+ return YES;
+}
+
/**
* All gnunet-transport-check command line options
*/
@@ -502,8 +508,10 @@
stats[0] = 0;
stats[1] = 0;
stats[2] = 0;
- bootstrap->bootstrap((hello_Callback)&testPING,
- &stats[0]);
+ bootstrap->bootstrap(&testPING,
+ &stats[0],
+ &testTerminate,
+ NULL);
printf(_("%d out of %d peers contacted successfully (%d times transport
unavailable).\n"),
stats[2],
stats[1],
@@ -511,7 +519,7 @@
releaseService(bootstrap);
} else {
while (Xrepeat-- > 0)
- transport->forEach((TransportCallback)&testTAPI,
+ transport->forEach(&testTAPI,
&res);
}
cron_stop(cron);
Modified: GNUnet/src/server/gnunetd.c
===================================================================
--- GNUnet/src/server/gnunetd.c 2006-08-20 20:18:02 UTC (rev 3268)
+++ GNUnet/src/server/gnunetd.c 2006-08-20 20:22:12 UTC (rev 3269)
@@ -191,7 +191,7 @@
GE_setDefaultContext(ectx);
cfg = GC_create_C_impl();
GE_ASSERT(ectx, cfg != NULL);
- os_init();
+ os_init(ectx);
if (-1 == gnunet_parse_options("gnunetd",
ectx,
cfg,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r3269 - GNUnet/src/server,
grothoff <=