gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r14627 - in gnunet/src: chat core dht dv fs hostlist includ


From: gnunet
Subject: [GNUnet-SVN] r14627 - in gnunet/src: chat core dht dv fs hostlist include mesh topology
Date: Fri, 11 Mar 2011 13:44:06 +0100

Author: grothoff
Date: 2011-03-11 13:44:06 +0100 (Fri, 11 Mar 2011)
New Revision: 14627

Modified:
   gnunet/src/chat/gnunet-service-chat.c
   gnunet/src/core/core_api.c
   gnunet/src/dht/gnunet-service-dht.c
   gnunet/src/dv/gnunet-service-dv.c
   gnunet/src/fs/gnunet-service-fs.c
   gnunet/src/fs/gnunet-service-fs_cp.c
   gnunet/src/hostlist/hostlist-server.c
   gnunet/src/include/gnunet_core_service.h
   gnunet/src/mesh/mesh_api.c
   gnunet/src/topology/gnunet-daemon-topology.c
Log:
add cork option to core api:


Modified: gnunet/src/chat/gnunet-service-chat.c
===================================================================
--- gnunet/src/chat/gnunet-service-chat.c       2011-03-11 03:39:47 UTC (rev 
14626)
+++ gnunet/src/chat/gnunet-service-chat.c       2011-03-11 12:44:06 UTC (rev 
14627)
@@ -262,6 +262,7 @@
 #endif
   my_msg = GNUNET_memdup (msg, ntohs (msg->header.size));
   if (NULL == GNUNET_CORE_notify_transmit_ready (core,
+                                                GNUNET_NO,
                                                  1,
                                                  MAX_TRANSMIT_DELAY,
                                                  &pid,
@@ -553,6 +554,7 @@
     strlen (entry->room) + 
     entry->meta_len;
   if (NULL == GNUNET_CORE_notify_transmit_ready (core,
+                                                GNUNET_NO,
                                                  1,
                                                  MAX_TRANSMIT_DELAY,
                                                  &pid,
@@ -750,6 +752,7 @@
   my_receipt = GNUNET_memdup (receipt,
                               sizeof (struct P2PConfirmationReceiptMessage));
   if (NULL == GNUNET_CORE_notify_transmit_ready (core,
+                                                GNUNET_YES,
                                                  1,
                                                  MAX_TRANSMIT_DELAY,
                                                  &pid,
@@ -936,6 +939,7 @@
   public_key = GNUNET_memdup (&entry->public_key,
                               sizeof (struct 
GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded));
   if (NULL == GNUNET_CORE_notify_transmit_ready (core,
+                                                GNUNET_YES,
                                                  1,
                                                  MAX_TRANSMIT_DELAY,
                                                  &pid,
@@ -1408,6 +1412,7 @@
         strlen (entry->room) + 
         entry->meta_len;
       th = GNUNET_CORE_notify_transmit_ready (core,
+                                             GNUNET_NO,
                                               1,
                                               MAX_TRANSMIT_DELAY,
                                               other,
@@ -1589,6 +1594,7 @@
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
               "Peer connected: %s\n", GNUNET_i2s (peer));
   th = GNUNET_CORE_notify_transmit_ready (core,
+                                         GNUNET_YES,
                                           1,
                                           MAX_TRANSMIT_DELAY,
                                           peer,

Modified: gnunet/src/core/core_api.c
===================================================================
--- gnunet/src/core/core_api.c  2011-03-11 03:39:47 UTC (rev 14626)
+++ gnunet/src/core/core_api.c  2011-03-11 12:44:06 UTC (rev 14627)
@@ -1483,6 +1483,7 @@
  * established (and the client has been informed about this).
  *
  * @param handle connection to core service
+ * @param cork is corking allowed for this transmission?
  * @param priority how important is the message?
  * @param maxdelay how long can the message wait?
  * @param target who should receive the message,
@@ -1496,6 +1497,7 @@
  */
 struct GNUNET_CORE_TransmitHandle *
 GNUNET_CORE_notify_transmit_ready (struct GNUNET_CORE_Handle *handle,
+                                  int cork,
                                    uint32_t priority,
                                    struct GNUNET_TIME_Relative maxdelay,
                                    const struct GNUNET_PeerIdentity *target,

Modified: gnunet/src/dht/gnunet-service-dht.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht.c 2011-03-11 03:39:47 UTC (rev 14626)
+++ gnunet/src/dht/gnunet-service-dht.c 2011-03-11 12:44:06 UTC (rev 14627)
@@ -1076,7 +1076,9 @@
       if (reply_counter >= MAX_REPLY_TIMES)
         reply_counter = 0;
       peer->th =
-        GNUNET_CORE_notify_transmit_ready (coreAPI, pending->importance,
+        GNUNET_CORE_notify_transmit_ready (coreAPI, 
+                                          GNUNET_YES,
+                                          pending->importance,
                                            pending->timeout, &peer->id, ssize,
                                            &core_transmit_notify, peer);
       if (peer->th == NULL)

Modified: gnunet/src/dv/gnunet-service-dv.c
===================================================================
--- gnunet/src/dv/gnunet-service-dv.c   2011-03-11 03:39:47 UTC (rev 14626)
+++ gnunet/src/dv/gnunet-service-dv.c   2011-03-11 12:44:06 UTC (rev 14627)
@@ -864,9 +864,16 @@
     return; /* Message send already in progress */
 
   if ((pending != NULL) && (coreAPI != NULL))
-    core_transmit_handle = GNUNET_CORE_notify_transmit_ready (coreAPI, 
pending->importance, pending->timeout, &pending->recipient, pending->msg_size, 
&core_transmit_notify, NULL);
+    core_transmit_handle = GNUNET_CORE_notify_transmit_ready (coreAPI,
+                                                             GNUNET_YES,
+                                                             
pending->importance,
+                                                             pending->timeout, 
+                                                             
&pending->recipient,
+                                                             pending->msg_size,
+                                                             
&core_transmit_notify, NULL);
 }
 
+
 /**
  * Function called to notify a client about the socket
  * being ready to queue more data.  "buf" will be
@@ -939,7 +946,7 @@
 
   GNUNET_SCHEDULER_add_now(&try_core_send, NULL);
   /*if (reply != NULL)
-    core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, 
reply->importance, reply->timeout, &reply->recipient, reply->msg_size, 
&core_transmit_notify, NULL);*/
+    core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, 
GNUNET_YES,  reply->importance, reply->timeout, &reply->recipient, 
reply->msg_size, &core_transmit_notify, NULL);*/
 
   return off;
 }
@@ -1704,7 +1711,7 @@
 
       GNUNET_SCHEDULER_add_now(try_core_send, NULL);
       /*if (core_transmit_handle == NULL)
-        core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, 
default_dv_priority, GNUNET_TIME_relative_get_forever(), &to->identity, 
sizeof(p2p_dv_MESSAGE_NeighborInfo), &core_transmit_notify, NULL);*/
+        core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, 
GNUNET_YES,  default_dv_priority, GNUNET_TIME_relative_get_forever(), 
&to->identity, sizeof(p2p_dv_MESSAGE_NeighborInfo), &core_transmit_notify, 
NULL);*/
 
     }
 
@@ -2080,7 +2087,7 @@
 
   GNUNET_SCHEDULER_add_now(try_core_send, NULL);
   /*if (core_transmit_handle == NULL)
-    core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, 
default_dv_priority, GNUNET_TIME_relative_get_forever(), &notify->identity, 
sizeof(p2p_dv_MESSAGE_Disconnect), &core_transmit_notify, NULL);*/
+    core_transmit_handle = GNUNET_CORE_notify_transmit_ready(coreAPI, 
GNUNET_YES, default_dv_priority, GNUNET_TIME_relative_get_forever(), 
&notify->identity, sizeof(p2p_dv_MESSAGE_Disconnect), &core_transmit_notify, 
NULL);*/
 
   return GNUNET_YES;
 }

Modified: gnunet/src/fs/gnunet-service-fs.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs.c   2011-03-11 03:39:47 UTC (rev 14626)
+++ gnunet/src/fs/gnunet-service-fs.c   2011-03-11 12:44:06 UTC (rev 14627)
@@ -1163,6 +1163,7 @@
     }
   cp->cth 
     = GNUNET_CORE_notify_transmit_ready (core,
+                                        GNUNET_YES,
                                         0, GNUNET_TIME_UNIT_FOREVER_REL,
                                         (const struct GNUNET_PeerIdentity*) 
key,
                                         msize + sizeof (struct PutMessage),
@@ -2169,6 +2170,7 @@
                       &pid);
   cp->last_transmission_request_start = GNUNET_TIME_absolute_get ();
   cp->cth = GNUNET_CORE_notify_transmit_ready (core,
+                                              GNUNET_YES,
                                               pm->priority,
                                               GNUNET_CONSTANTS_SERVICE_TIMEOUT,
                                               &pid,
@@ -2405,6 +2407,7 @@
   /* need to schedule transmission */
   cp->last_transmission_request_start = GNUNET_TIME_absolute_get ();
   cp->cth = GNUNET_CORE_notify_transmit_ready (core,
+                                              GNUNET_YES,
                                               
cp->pending_messages_head->priority,
                                               MAX_TRANSMIT_DELAY,
                                               &pid,

Modified: gnunet/src/fs/gnunet-service-fs_cp.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_cp.c        2011-03-11 03:39:47 UTC (rev 
14626)
+++ gnunet/src/fs/gnunet-service-fs_cp.c        2011-03-11 12:44:06 UTC (rev 
14627)
@@ -368,6 +368,7 @@
     {
       /* reservation success, try transmission now! */
       pth->cth = GNUNET_CORE_notify_transmit_ready (GSF_core,
+                                                   GNUNET_YES,
                                                    pth->priority,
                                                    
GNUNET_TIME_absolute_get_remaining (pth->timeout),
                                                    peer,
@@ -1110,6 +1111,7 @@
   if (is_ready)
     {
       pth->cth = GNUNET_CORE_notify_transmit_ready (GSF_core,
+                                                   GNUNET_YES,
                                                    priority,
                                                    timeout,
                                                    &target,

Modified: gnunet/src/hostlist/hostlist-server.c
===================================================================
--- gnunet/src/hostlist/hostlist-server.c       2011-03-11 03:39:47 UTC (rev 
14626)
+++ gnunet/src/hostlist/hostlist-server.c       2011-03-11 12:44:06 UTC (rev 
14627)
@@ -414,6 +414,7 @@
               "Asked core to transmit advertisement message with a size of %u 
bytes to peer `%s'\n",
              size,GNUNET_i2s(peer));
   if (NULL == GNUNET_CORE_notify_transmit_ready (core,
+                                                GNUNET_YES,
                                                 0,
                                                 GNUNET_ADV_TIMEOUT,
                                                 peer,

Modified: gnunet/src/include/gnunet_core_service.h
===================================================================
--- gnunet/src/include/gnunet_core_service.h    2011-03-11 03:39:47 UTC (rev 
14626)
+++ gnunet/src/include/gnunet_core_service.h    2011-03-11 12:44:06 UTC (rev 
14627)
@@ -414,6 +414,7 @@
  * 
  *
  * @param handle connection to core service
+ * @param cork is corking allowed for this transmission?
  * @param priority how important is the message?
  * @param maxdelay how long can the message wait?
  * @param target who should receive the message,
@@ -437,6 +438,7 @@
 GNUNET_CORE_notify_transmit_ready (struct
                                   GNUNET_CORE_Handle
                                   *handle,
+                                  int cork,
                                   uint32_t priority,
                                   struct
                                   GNUNET_TIME_Relative

Modified: gnunet/src/mesh/mesh_api.c
===================================================================
--- gnunet/src/mesh/mesh_api.c  2011-03-11 03:39:47 UTC (rev 14626)
+++ gnunet/src/mesh/mesh_api.c  2011-03-11 12:44:06 UTC (rev 14627)
@@ -441,6 +441,7 @@
   cls->notify = notify;
   cls->tunnel = tunnel;
   GNUNET_CORE_notify_transmit_ready(tunnel->handle->core,
+                                   cork,
                                    priority,
                                    maxdelay,
                                    &tunnel->peer,

Modified: gnunet/src/topology/gnunet-daemon-topology.c
===================================================================
--- gnunet/src/topology/gnunet-daemon-topology.c        2011-03-11 03:39:47 UTC 
(rev 14626)
+++ gnunet/src/topology/gnunet-daemon-topology.c        2011-03-11 12:44:06 UTC 
(rev 14627)
@@ -635,7 +635,9 @@
   if (delay.rel_value == 0)
     {
       /* now! */
-      pl->hello_req = GNUNET_CORE_notify_transmit_ready (handle, 0,
+      pl->hello_req = GNUNET_CORE_notify_transmit_ready (handle, 
+                                                        GNUNET_YES,
+                                                        0,
                                                         
GNUNET_CONSTANTS_SERVICE_TIMEOUT,
                                                         &pl->pid,
                                                         next_want,




reply via email to

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