gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r36194 - gnunet/src/util


From: gnunet
Subject: [GNUnet-SVN] r36194 - gnunet/src/util
Date: Mon, 3 Aug 2015 18:44:19 +0200

Author: burdges
Date: 2015-08-03 18:44:18 +0200 (Mon, 03 Aug 2015)
New Revision: 36194

Modified:
   gnunet/src/util/connection.c
   gnunet/src/util/socks.c
   gnunet/src/util/test_socks.c
Log:
Woot!  It might actually work now, although I should tweak the test
a bit to make sure.



Modified: gnunet/src/util/connection.c
===================================================================
--- gnunet/src/util/connection.c        2015-08-03 15:49:30 UTC (rev 36193)
+++ gnunet/src/util/connection.c        2015-08-03 16:44:18 UTC (rev 36194)
@@ -740,7 +740,7 @@
     connection->dns_active = NULL;
     if ((NULL == connection->ap_head) && 
         (NULL == connection->sock) &&
-        (NULL == connection->proxy_handshake))
+        (NULL == connection->proxy_handshake)) 
       connect_fail_continuation (connection);
     return;
   }

Modified: gnunet/src/util/socks.c
===================================================================
--- gnunet/src/util/socks.c     2015-08-03 15:49:30 UTC (rev 36193)
+++ gnunet/src/util/socks.c     2015-08-03 16:44:18 UTC (rev 36194)
@@ -274,7 +274,6 @@
     case SOCKS5_step_done: 
       GNUNET_assert (0);
   }
-  ++ih->step;
   ih->instart = b;
   /* Do not reschedule the sender unless we're done reading. 
    * I imagine this lets us avoid ever cancelling the transmit handle. */
@@ -295,7 +294,6 @@
           const struct sockaddr * addr,
           socklen_t addrlen, int errCode)
 {
-printf("Meow(%d)",available);
   struct GNUNET_SOCKS_Handshake * ih = cls;
   GNUNET_assert (&ih->inend[available] < &ih->inbuf[1024]);
   memcpy(ih->inend, buf, available);
@@ -314,7 +312,6 @@
 void
 register_reciever (struct GNUNET_SOCKS_Handshake *ih, int want)
 {
-  printf("register_reciever on step %u for %d bytes.\n", ih->step, want );
   GNUNET_CONNECTION_receive (ih->socks5_connection,
                              want,
                              GNUNET_TIME_relative_get_minute_ (),
@@ -372,14 +369,10 @@
       }
       return 0;
     }
-    printf("Erronious socks.c transmit_ready() callback on step %u with reason 
%u.\n", 
-       ih->step, reason );
     /* if (reason == 48) register_sender (ih); */
     /* GNUNET_break(0); */
     return 0;
-  } else 
-    printf("Good socks.c transmit_ready() callback on step %u with reason 
%u.\n", 
-       ih->step, GNUNET_SCHEDULER_get_reason () );
+  }
 
   GNUNET_assert (1024 >= size && size > 0);
   GNUNET_assert (SOCKS5_step_done > ih->step && ih->step >= 0);
@@ -390,7 +383,6 @@
   GNUNET_assert (size >= l && l >= 0);
   memcpy(buf, b, l);
   register_reciever (ih, register_reciever_wants(ih));
-  printf("sent(%d)\n",l);
   return l;
 }
 
@@ -407,13 +399,13 @@
 {
   struct GNUNET_TIME_Relative timeout = GNUNET_TIME_UNIT_MINUTES;
 
-  GNUNET_assert (SOCKS5_step_done > ih->step && ih->step >= 0);
+  GNUNET_assert (SOCKS5_step_done > ih->step);
+  GNUNET_assert (ih->step >= 0);
   if (0 == ih->step)
     timeout = GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MINUTES, 3);
   unsigned char * b = ih->outstep[ih->step];
   unsigned char * e = ih->outstep[ih->step+1];
   GNUNET_assert (ih->outbuf <= b && b < e && e < &ih->outbuf[1024]);
-  printf("register_sender on step %u for %u bytes.\n", ih->step, (unsigned)(e 
- b) );
   ih->th = GNUNET_CONNECTION_notify_transmit_ready (ih->socks5_connection,
                                                     e - b,
                                                     timeout,
@@ -467,6 +459,8 @@
 
   ih->outstep[SOCKS5_step_cmd] = b;
 
+  ih->inend = ih->instart = ih->inbuf;
+
   return ih;
 }
 

Modified: gnunet/src/util/test_socks.c
===================================================================
--- gnunet/src/util/test_socks.c        2015-08-03 15:49:30 UTC (rev 36193)
+++ gnunet/src/util/test_socks.c        2015-08-03 16:44:18 UTC (rev 36194)
@@ -116,7 +116,6 @@
 {
   struct GNUNET_MessageHeader *msg = buf;
 
-  printf("Hmm(%u,%u)\n",NULL==buf,GNUNET_SCHEDULER_get_reason ());
   GNUNET_assert (size >= sizeof (struct GNUNET_MessageHeader));
   msg->type = htons (MY_TYPE);
   msg->size = htons (sizeof (struct GNUNET_MessageHeader));
@@ -211,7 +210,6 @@
   GNUNET_SCHEDULER_run (&task, &ok);
   GNUNET_CONFIGURATION_destroy (cfg);
 
-  printf("killing %d\n",pid);
   kill(pid,SIGTERM);
   return ok;
 }




reply via email to

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