[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r4936 - in GNUnet: . src/applications/pingpong src/applicat
From: |
gnunet |
Subject: |
[GNUnet-SVN] r4936 - in GNUnet: . src/applications/pingpong src/applications/transport src/transports src/util/cron src/util/loggers |
Date: |
Wed, 6 Jun 2007 17:16:54 -0600 (MDT) |
Author: grothoff
Date: 2007-06-06 17:16:54 -0600 (Wed, 06 Jun 2007)
New Revision: 4936
Modified:
GNUnet/Makefile.am
GNUnet/bootstrap
GNUnet/src/applications/pingpong/pingpong.c
GNUnet/src/applications/transport/transport.c
GNUnet/src/transports/udp.c
GNUnet/src/util/cron/crontest.c
GNUnet/src/util/loggers/smtp.c
GNUnet/todo
Log:
some code cleanup
Modified: GNUnet/Makefile.am
===================================================================
--- GNUnet/Makefile.am 2007-06-06 23:15:27 UTC (rev 4935)
+++ GNUnet/Makefile.am 2007-06-06 23:16:54 UTC (rev 4936)
@@ -3,7 +3,9 @@
EXTRA_DIST = \
ABOUT-NLS \
- config.rpath \
+ config.rpath \
+ install.sh \
+ mkinstalldirs \
README.fr \
README.win32 \
README.debian \
Modified: GNUnet/bootstrap
===================================================================
--- GNUnet/bootstrap 2007-06-06 23:15:27 UTC (rev 4935)
+++ GNUnet/bootstrap 2007-06-06 23:16:54 UTC (rev 4936)
@@ -1,5 +1,6 @@
#!/bin/sh
export WANT_AUTOMAKE="1.8"
+automake -fi
cd libltdl
autoreconf -f -i
cd ..
Modified: GNUnet/src/applications/pingpong/pingpong.c
===================================================================
--- GNUnet/src/applications/pingpong/pingpong.c 2007-06-06 23:15:27 UTC (rev
4935)
+++ GNUnet/src/applications/pingpong/pingpong.c 2007-06-06 23:16:54 UTC (rev
4936)
@@ -439,8 +439,11 @@
if (pmsg == NULL)
return SYSERR;
if (usePlaintext == YES) {
- sendPlaintext(receiver,
- (const P2P_pingpong_MESSAGE*) pmsg);
+ if (OK != sendPlaintext(receiver,
+ (const P2P_pingpong_MESSAGE*) pmsg)) {
+ FREE(pmsg);
+ return SYSERR;
+ }
if (stats != NULL)
stats->change(stat_plaintextPingSent, 1);
} else {
Modified: GNUnet/src/applications/transport/transport.c
===================================================================
--- GNUnet/src/applications/transport/transport.c 2007-06-06 23:15:27 UTC
(rev 4935)
+++ GNUnet/src/applications/transport/transport.c 2007-06-06 23:16:54 UTC
(rev 4936)
@@ -205,9 +205,12 @@
P2P_hello_MESSAGE * hello;
int * perm;
TSession * ret;
+ unsigned int hc;
+ EncName enc;
+ hc = 0;
+ ret = NULL;
MUTEX_LOCK(tapis_lock);
- ret = NULL;
perm = permute(WEAK, tapis_count);
for (i=0;i<tapis_count;i++) {
if (tapis[perm[i]] == NULL)
@@ -217,6 +220,7 @@
useTempList);
if (hello == NULL)
continue;
+ hc++;
ret = transportConnect(hello);
FREE(hello);
if (ret != NULL)
@@ -224,6 +228,15 @@
}
FREE(perm);
MUTEX_UNLOCK(tapis_lock);
+ if (ret == NULL) {
+ hash2enc(&peer->hashPubKey,
+ &enc);
+ GE_LOG(ectx,
+ GE_WARNING | GE_BULK | GE_ADMIN,
+ _("Transport failed to connect to peer `%s' (%u HELLOs known, none
worked)"),
+ &enc,
+ hc);
+ }
return ret;
}
Modified: GNUnet/src/transports/udp.c
===================================================================
--- GNUnet/src/transports/udp.c 2007-06-06 23:15:27 UTC (rev 4935)
+++ GNUnet/src/transports/udp.c 2007-06-06 23:16:54 UTC (rev 4936)
@@ -220,13 +220,13 @@
* (the signature/crc have been verified before)
* @return OK on success, SYSERR on failure
*/
-static int verifyHelo(const P2P_hello_MESSAGE * helo) {
- HostAddress * haddr;
+static int verifyHelo(const P2P_hello_MESSAGE * hello) {
+ const HostAddress * haddr;
- haddr = (HostAddress*) &helo[1];
- if ( (ntohs(helo->senderAddressSize) != sizeof(HostAddress)) ||
- (ntohs(helo->header.size) != P2P_hello_MESSAGE_size(helo)) ||
- (ntohs(helo->header.type) != p2p_PROTO_hello) ||
+ haddr = (const HostAddress*) &hello[1];
+ if ( (ntohs(hello->senderAddressSize) != sizeof(HostAddress)) ||
+ (ntohs(hello->header.size) != P2P_hello_MESSAGE_size(hello)) ||
+ (ntohs(hello->header.type) != p2p_PROTO_hello) ||
(YES == isBlacklisted(&haddr->senderIP,
sizeof(IPaddr))) ||
(YES != isWhitelisted(&haddr->senderIP,
@@ -235,7 +235,7 @@
else {
#if DEBUG_UDP
GE_LOG(ectx, GE_DEBUG | GE_USER | GE_BULK,
- "Verified UDP helo from %u.%u.%u.%u:%u.\n",
+ "Verified UDP hello from %u.%u.%u.%u:%u.\n",
PRIP(ntohl(*(int*)&haddr->senderIP.addr)),
ntohs(haddr->senderPort));
#endif
@@ -303,7 +303,7 @@
const unsigned int size,
int important) {
UDPMessage * mp;
- P2P_hello_MESSAGE * helo;
+ P2P_hello_MESSAGE * hello;
HostAddress * haddr;
struct sockaddr_in sin; /* an Internet endpoint address */
int ok;
@@ -320,11 +320,11 @@
GE_BREAK(ectx, 0);
return SYSERR;
}
- helo = (P2P_hello_MESSAGE*)tsession->internal;
- if (helo == NULL)
+ hello = (P2P_hello_MESSAGE*)tsession->internal;
+ if (hello == NULL)
return SYSERR;
- haddr = (HostAddress*) &helo[1];
+ haddr = (HostAddress*) &hello[1];
ssize = size + sizeof(UDPMessage);
mp = MALLOC(ssize);
mp->header.size = htons(ssize);
@@ -546,7 +546,9 @@
if (-1 == GC_get_configuration_value_number(cfg,
"UDP",
"MTU",
- sizeof(UDPMessage) +
P2P_MESSAGE_OVERHEAD + sizeof(MESSAGE_HEADER) + 32,
+ sizeof(UDPMessage)
+ + P2P_MESSAGE_OVERHEAD
+ + sizeof(MESSAGE_HEADER) + 32,
65500,
MESSAGE_SIZE,
&mtu)) {
Modified: GNUnet/src/util/cron/crontest.c
===================================================================
--- GNUnet/src/util/cron/crontest.c 2007-06-06 23:15:27 UTC (rev 4935)
+++ GNUnet/src/util/cron/crontest.c 2007-06-06 23:16:54 UTC (rev 4936)
@@ -82,7 +82,7 @@
return 0;
}
-static void delJob() {
+static void delJob(void * unused) {
cron_del_job(cron,
&cronJob, 42, NULL);
}
Modified: GNUnet/src/util/loggers/smtp.c
===================================================================
--- GNUnet/src/util/loggers/smtp.c 2007-06-06 23:15:27 UTC (rev 4935)
+++ GNUnet/src/util/loggers/smtp.c 2007-06-06 23:16:54 UTC (rev 4936)
@@ -23,7 +23,7 @@
* @brief logging via email
* @author Christian Grothoff
*/
-#include "gnunet_error_loging.h"
+#include "gnunet_util_error_loggers.h"
#if FICTION
/**
Modified: GNUnet/todo
===================================================================
--- GNUnet/todo 2007-06-06 23:15:27 UTC (rev 4935)
+++ GNUnet/todo 2007-06-06 23:16:54 UTC (rev 4936)
@@ -10,6 +10,8 @@
- RC bugs:
* UDP assertion failure (mtu < size) [#1209]
* low connectivity (NAT? real issue?)
+ - gnunet-transport-check -t udp -p fails consistently even in ideal
network!?
+ - possibly related: gnunet.org's Decrypting message failed errors!?
0.7.3 [7'07] (aka "features"):
- chat support basics [RC]
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r4936 - in GNUnet: . src/applications/pingpong src/applications/transport src/transports src/util/cron src/util/loggers,
gnunet <=