gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r1709 - in GNUnet/src/applications: advertising identity


From: grothoff
Subject: [GNUnet-SVN] r1709 - in GNUnet/src/applications: advertising identity
Date: Tue, 16 Aug 2005 23:11:48 -0700 (PDT)

Author: grothoff
Date: 2005-08-16 23:11:47 -0700 (Tue, 16 Aug 2005)
New Revision: 1709

Modified:
   GNUnet/src/applications/advertising/bootstrap.c
   GNUnet/src/applications/identity/identity.c
Log:
fix

Modified: GNUnet/src/applications/advertising/bootstrap.c
===================================================================
--- GNUnet/src/applications/advertising/bootstrap.c     2005-08-17 05:32:57 UTC 
(rev 1708)
+++ GNUnet/src/applications/advertising/bootstrap.c     2005-08-17 06:11:47 UTC 
(rev 1709)
@@ -179,6 +179,8 @@
     }
     if (abort_bootstrap != NO)
       break;
+    LOG(LOG_DEBUG,
+       "Starting bootstrap.\n");
     cls.helosLen = 0;
     cls.helosCount = 0;
     bootstrap->bootstrap((hello_Callback)&downloadHostlistCallback,

Modified: GNUnet/src/applications/identity/identity.c
===================================================================
--- GNUnet/src/applications/identity/identity.c 2005-08-17 05:32:57 UTC (rev 
1708)
+++ GNUnet/src/applications/identity/identity.c 2005-08-17 06:11:47 UTC (rev 
1709)
@@ -436,7 +436,7 @@
        }
       }
       for (j=0;j<entry->heloCount;j++) {
-       if (protocol == entry->helos[j]->protocol) {
+       if (protocol == ntohs(entry->helos[j]->protocol)) {
          FREE(entry->helos[j]);
          entry->helos[j]
            = entry->helos[entry->heloCount-1];
@@ -585,7 +585,7 @@
       if ( (tempHosts[j].heloCount > 0) &&
           hostIdentityEquals(hostId,
                              &tempHosts[j].identity) &&
-          ( (ntohs(tempHosts[j].protocols[0]) == protocol) ||
+          ( (tempHosts[j].protocols[0] == protocol) ||
             (protocol == ANY_PROTOCOL_NUMBER) ) ) {
        result = MALLOC(P2P_hello_MESSAGE_size(tempHosts[j].helos[0]));
        memcpy(result,
@@ -610,7 +610,7 @@
     protocol = host->protocols[weak_randomi(host->protocolCount)];
 
   for (i=0;i<host->heloCount;i++) {
-    if (host->helos[i]->protocol == protocol) {
+    if (ntohs(host->helos[i]->protocol) == protocol) {
       result
        = MALLOC(P2P_hello_MESSAGE_size(host->helos[i]));
       memcpy(result,
@@ -898,7 +898,7 @@
       count++;
       if (callback != NULL) {
        hi = entry->identity;
-       proto = ntohs(entry->protocols[0]);
+       proto = entry->protocols[0];
        MUTEX_UNLOCK(&lock_);
        callback(&hi,
                 proto,





reply via email to

[Prev in Thread] Current Thread [Next in Thread]