gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r11745 - gnunet/src/transport


From: gnunet
Subject: [GNUnet-SVN] r11745 - gnunet/src/transport
Date: Mon, 14 Jun 2010 16:22:10 +0200

Author: wachs
Date: 2010-06-14 16:22:10 +0200 (Mon, 14 Jun 2010)
New Revision: 11745

Modified:
   gnunet/src/transport/plugin_transport_http.c
   gnunet/src/transport/test_plugin_transport_http.c
Log:


Modified: gnunet/src/transport/plugin_transport_http.c
===================================================================
--- gnunet/src/transport/plugin_transport_http.c        2010-06-14 13:32:58 UTC 
(rev 11744)
+++ gnunet/src/transport/plugin_transport_http.c        2010-06-14 14:22:10 UTC 
(rev 11745)
@@ -538,7 +538,7 @@
         if ( GNUNET_YES  == res)
         {
           /* existing session for this address found */
-          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Session `%s' found\n",address);
+          GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,"Session for peer `%s' 
found\n",GNUNET_i2s(&cs->sender));
           break;
         }
         cs = cs->next;
@@ -1017,7 +1017,7 @@
                   else
                   {
                     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                                "Send to %s completed.\n", cs->ip);
+                                "Send to peer `%s' completed.\n", 
GNUNET_i2s(&cs->sender));
                     if (GNUNET_OK != remove_http_message(cs, 
cs->pending_outbound_msg))
                       GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Message could not 
be removed from session `%s'", GNUNET_i2s(&cs->sender));
 
@@ -1164,7 +1164,6 @@
   {
     /* create new session object */
 
-    /*FIXME: what is const void * really? Assuming struct sockaddr_in * ! */
     ses = create_session(NULL, (struct sockaddr_in *) addr, target);
     ses->is_active = GNUNET_YES;
 

Modified: gnunet/src/transport/test_plugin_transport_http.c
===================================================================
--- gnunet/src/transport/test_plugin_transport_http.c   2010-06-14 13:32:58 UTC 
(rev 11744)
+++ gnunet/src/transport/test_plugin_transport_http.c   2010-06-14 14:22:10 UTC 
(rev 11745)
@@ -324,6 +324,11 @@
  */
 static int fail;
 
+/**
+ * Number of local addresses
+ */
+static unsigned int count_str_addr;
+
 CURL *curl_handle;
 
 /**
@@ -348,7 +353,7 @@
   /* Evaluate results  */
   if ((fail_notify_address == GNUNET_NO) && (fail_pretty_printer == GNUNET_NO) 
&& (fail_addr_to_str == GNUNET_NO) &&
       (test_no_ident.test_failed == GNUNET_NO) && 
(test_too_short_ident.test_failed == GNUNET_NO) && 
(test_too_long_ident.test_failed == GNUNET_NO) &&
-      (test_valid_ident.test_failed == GNUNET_NO) && 
(fail_transmit_to_local_addrs == GNUNET_NO))
+      (test_valid_ident.test_failed == GNUNET_NO) && 
(fail_transmit_to_local_addrs == count_str_addr))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Tests successful\n");
     fail = 0;
@@ -420,9 +425,14 @@
     tmp_addr = tmp_addr->next;
   }
 
-  if (cls == tmp_addr)
+  if (cls != NULL)
   {
-    fail_transmit_to_local_addrs = GNUNET_NO;
+    fail_transmit_to_local_addrs++;
+  }
+  if (fail_transmit_to_local_addrs == count_str_addr)
+
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Message sent to %u 
addresses!\n",fail_transmit_to_local_addrs);
     shutdown_clean();
   }
 
@@ -980,7 +990,7 @@
   struct Plugin_Address * cur;
   const char * addr_str;
 
-  unsigned int count_str_addr;
+
   unsigned int suggest_res;
 
   fail_pretty_printer = GNUNET_YES;




reply via email to

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