gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r17604 - gnunet/src/ats


From: gnunet
Subject: [GNUnet-SVN] r17604 - gnunet/src/ats
Date: Wed, 19 Oct 2011 15:10:04 +0200

Author: grothoff
Date: 2011-10-19 15:10:03 +0200 (Wed, 19 Oct 2011)
New Revision: 17604

Modified:
   gnunet/src/ats/ats_api_performance.c
Log:
major bugfixes in performance api implementation, some logging

Modified: gnunet/src/ats/ats_api_performance.c
===================================================================
--- gnunet/src/ats/ats_api_performance.c        2011-10-19 13:09:56 UTC (rev 
17603)
+++ gnunet/src/ats/ats_api_performance.c        2011-10-19 13:10:03 UTC (rev 
17604)
@@ -335,11 +335,6 @@
   struct GNUNET_ATS_ReservationContext *rc;
   int32_t amount;
 
-  if (ph->infocb == NULL)
-  {
-    GNUNET_break (0);
-    return GNUNET_SYSERR;
-  }    
   if (ntohs (msg->size) < sizeof (struct ReservationResultMessage))
   {
     GNUNET_break (0);
@@ -568,13 +563,14 @@
   p->size = sizeof (struct ReservationRequestMessage);
   p->is_init = GNUNET_NO;
   m = (struct ReservationRequestMessage*) &p[1];
-  m->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_ADDRESS_UPDATE);
+  m->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_RESERVATION_REQUEST);
   m->header.size = htons (sizeof (struct ReservationRequestMessage));
   m->amount = htonl (amount);
   m->peer = *peer;
   GNUNET_CONTAINER_DLL_insert_tail (ph->pending_head,
                                    ph->pending_tail,
                                    p);
+  do_transmit (ph);
   return rc;
 }
 
@@ -639,7 +635,7 @@
   p->size = msize;
   p->is_init = GNUNET_NO;
   m = (struct ChangePreferenceMessage*) &p[1];
-  m->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_ADDRESS_UPDATE);
+  m->header.type = htons (GNUNET_MESSAGE_TYPE_ATS_PREFERENCE_CHANGE);
   m->header.size = htons (msize);
   m->num_preferences = htonl (count);
   m->peer = *peer;
@@ -667,6 +663,7 @@
   GNUNET_CONTAINER_DLL_insert_tail (ph->pending_head,
                                    ph->pending_tail,
                                    p);
+  do_transmit (ph);
 }
 
 /* end of ats_api_performance.c */




reply via email to

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