[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r1175 - GNUnet/src/transports
From: |
grothoff |
Subject: |
[GNUnet-SVN] r1175 - GNUnet/src/transports |
Date: |
Thu, 30 Jun 2005 13:34:14 -0700 (PDT) |
Author: grothoff
Date: 2005-06-30 13:34:10 -0700 (Thu, 30 Jun 2005)
New Revision: 1175
Modified:
GNUnet/src/transports/ip.c
GNUnet/src/transports/ip6.c
GNUnet/src/transports/udp.c
Log:
fix
Modified: GNUnet/src/transports/ip.c
===================================================================
--- GNUnet/src/transports/ip.c 2005-06-30 20:10:40 UTC (rev 1174)
+++ GNUnet/src/transports/ip.c 2005-06-30 20:34:10 UTC (rev 1175)
@@ -336,7 +336,7 @@
cron_t now;
cronTime(&now);
- if (last + cronMINUTES > now) {
+ if (last + cronMINUTES < now) {
if (lastError + 30 * cronSECONDS > now)
return SYSERR;
if (SYSERR == getAddress(&myAddress)) {
@@ -347,7 +347,9 @@
}
last = now;
}
- *address = myAddress;
+ memcpy(address,
+ &myAddress,
+ sizeof(IPaddr));
return OK;
}
Modified: GNUnet/src/transports/ip6.c
===================================================================
--- GNUnet/src/transports/ip6.c 2005-06-30 20:10:40 UTC (rev 1174)
+++ GNUnet/src/transports/ip6.c 2005-06-30 20:34:10 UTC (rev 1175)
@@ -123,13 +123,13 @@
* @return SYSERR on error, OK on success
*/
int getPublicIP6Address(IP6addr * address) {
- static IP6addr myAddress;
+ static IP6addr myAddress;
static cron_t last;
static cron_t lastError;
cron_t now;
cronTime(&now);
- if (last + cronMINUTES > now) {
+ if (last + cronMINUTES < now) {
if (lastError + 30 * cronSECONDS > now)
return SYSERR;
if (SYSERR == getAddress6(&myAddress)) {
@@ -140,7 +140,9 @@
}
last = now;
}
- *address = myAddress;
+ memcpy(address,
+ &myAddress,
+ sizeof(IP6addr));
return OK;
}
Modified: GNUnet/src/transports/udp.c
===================================================================
--- GNUnet/src/transports/udp.c 2005-06-30 20:10:40 UTC (rev 1174)
+++ GNUnet/src/transports/udp.c 2005-06-30 20:34:10 UTC (rev 1175)
@@ -341,6 +341,9 @@
_("UDP: Could not determine my public IP address.\n"));
return SYSERR;
}
+ LOG(LOG_DEBUG,
+ "UDP uses IP address %u.%u.%u.%u.\n",
+ PRIP(ntohl(*(int*)&haddr->senderIP)));
if (udp_shutdown == YES)
haddr->senderPort = htons(getGNUnetUDPPort());
else
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r1175 - GNUnet/src/transports,
grothoff <=