gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] r25388 - in gnunet/src: fs include stream


From: gnunet
Subject: [GNUnet-SVN] r25388 - in gnunet/src: fs include stream
Date: Tue, 11 Dec 2012 12:14:24 +0100

Author: harsha
Date: 2012-12-11 12:14:24 +0100 (Tue, 11 Dec 2012)
New Revision: 25388

Modified:
   gnunet/src/fs/gnunet-service-fs_stream.c
   gnunet/src/include/gnunet_stream_lib.h
   gnunet/src/stream/perf_stream_api.c
   gnunet/src/stream/stream_api.c
   gnunet/src/stream/test_stream_2peers.c
   gnunet/src/stream/test_stream_2peers_halfclose.c
   gnunet/src/stream/test_stream_big.c
   gnunet/src/stream/test_stream_local.c
   gnunet/src/stream/test_stream_sequence_wraparound.c
Log:
- rename

Modified: gnunet/src/fs/gnunet-service-fs_stream.c
===================================================================
--- gnunet/src/fs/gnunet-service-fs_stream.c    2012-12-11 10:55:49 UTC (rev 
25387)
+++ gnunet/src/fs/gnunet-service-fs_stream.c    2012-12-11 11:14:24 UTC (rev 
25388)
@@ -89,12 +89,12 @@
   /**
    * Handle for active read operation, or NULL.
    */ 
-  struct GNUNET_STREAM_IOReadHandle *rh;
+  struct GNUNET_STREAM_ReadHandle *rh;
 
   /**
    * Handle for active write operation, or NULL.
    */ 
-  struct GNUNET_STREAM_IOWriteHandle *wh;
+  struct GNUNET_STREAM_WriteHandle *wh;
 
   /**
    * Head of write queue.
@@ -268,12 +268,12 @@
   /**
    * Handle for active read operation, or NULL.
    */ 
-  struct GNUNET_STREAM_IOReadHandle *rh;
+  struct GNUNET_STREAM_ReadHandle *rh;
 
   /**
    * Handle for active write operation, or NULL.
    */ 
-  struct GNUNET_STREAM_IOWriteHandle *wh;
+  struct GNUNET_STREAM_WriteHandle *wh;
 
   /**
    * Tokenizer for replies.
@@ -387,9 +387,9 @@
                                         &free_waiting_entry,
                                         sh);
   if (NULL != sh->wh)
-    GNUNET_STREAM_io_write_cancel (sh->wh);
+    GNUNET_STREAM_write_cancel (sh->wh);
   if (NULL != sh->rh)
-    GNUNET_STREAM_io_read_cancel (sh->rh);
+    GNUNET_STREAM_read_cancel (sh->rh);
   if (GNUNET_SCHEDULER_NO_TASK != sh->timeout_task)
     GNUNET_SCHEDULER_cancel (sh->timeout_task);
   if (GNUNET_SCHEDULER_NO_TASK != sh->reset_task)
@@ -472,7 +472,7 @@
              GNUNET_i2s (&sh->target));
   if (NULL != sh->rh)
   {
-    GNUNET_STREAM_io_read_cancel (sh->rh);
+    GNUNET_STREAM_read_cancel (sh->rh);
     sh->rh = NULL;
   }
   GNUNET_STREAM_close (sh->stream);
@@ -934,9 +934,9 @@
   if (GNUNET_SCHEDULER_NO_TASK != sc->timeout_task)
     GNUNET_SCHEDULER_cancel (sc->timeout_task); 
  if (NULL != sc->rh)
-    GNUNET_STREAM_io_read_cancel (sc->rh);
+    GNUNET_STREAM_read_cancel (sc->rh);
   if (NULL != sc->wh)
-    GNUNET_STREAM_io_write_cancel (sc->wh);
+    GNUNET_STREAM_write_cancel (sc->wh);
   if (NULL != sc->qe)
     GNUNET_DATASTORE_cancel (sc->qe);
   GNUNET_SERVER_mst_destroy (sc->mst);

Modified: gnunet/src/include/gnunet_stream_lib.h
===================================================================
--- gnunet/src/include/gnunet_stream_lib.h      2012-12-11 10:55:49 UTC (rev 
25387)
+++ gnunet/src/include/gnunet_stream_lib.h      2012-12-11 11:14:24 UTC (rev 
25388)
@@ -291,13 +291,13 @@
 /**
  * Handle to cancel IO write operations.
  */
-struct GNUNET_STREAM_IOWriteHandle;
+struct GNUNET_STREAM_WriteHandle;
 
 
 /**
  * Handle to cancel IO read operations.
  */
-struct GNUNET_STREAM_IOReadHandle;
+struct GNUNET_STREAM_ReadHandle;
 
 /**
  * Tries to write the given data to the stream. The maximum size of data that
@@ -318,7 +318,7 @@
  *           is broken then write_cont is immediately called and NULL is
  *           returned.
  */
-struct GNUNET_STREAM_IOWriteHandle *
+struct GNUNET_STREAM_WriteHandle *
 GNUNET_STREAM_write (struct GNUNET_STREAM_Socket *socket,
                      const void *data,
                      size_t size,
@@ -347,7 +347,7 @@
 /**
  * Tries to read data from the stream. Should not be called when another read
  * handle is present; the existing read handle should be canceled with
- * GNUNET_STREAM_io_read_cancel(). Only one read handle per socket is present 
at
+ * GNUNET_STREAM_read_cancel(). Only one read handle per socket is present at
  * any time
  *
  * @param socket the socket representing a stream
@@ -358,7 +358,7 @@
  *           been shutdown for this type of opeartion (the DataProcessor is
  *           immediately called with GNUNET_STREAM_SHUTDOWN as status)
  */
-struct GNUNET_STREAM_IOReadHandle *
+struct GNUNET_STREAM_ReadHandle *
 GNUNET_STREAM_read (struct GNUNET_STREAM_Socket *socket,
                     struct GNUNET_TIME_Relative timeout,
                    GNUNET_STREAM_DataProcessor proc,
@@ -383,7 +383,7 @@
  * @param ioh handle to operation to cancel
  */
 void
-GNUNET_STREAM_io_write_cancel (struct GNUNET_STREAM_IOWriteHandle *iowh);
+GNUNET_STREAM_write_cancel (struct GNUNET_STREAM_WriteHandle *iowh);
 
 
 /**
@@ -392,7 +392,7 @@
  * @param ioh handle to operation to cancel
  */
 void
-GNUNET_STREAM_io_read_cancel (struct GNUNET_STREAM_IOReadHandle *iorh);
+GNUNET_STREAM_read_cancel (struct GNUNET_STREAM_ReadHandle *iorh);
 
 
 #if 0

Modified: gnunet/src/stream/perf_stream_api.c
===================================================================
--- gnunet/src/stream/perf_stream_api.c 2012-12-11 10:55:49 UTC (rev 25387)
+++ gnunet/src/stream/perf_stream_api.c 2012-12-11 11:14:24 UTC (rev 25388)
@@ -103,12 +103,12 @@
   /**
    * Peer's io write handle
    */
-  struct GNUNET_STREAM_IOWriteHandle *io_write_handle;
+  struct GNUNET_STREAM_WriteHandle *io_write_handle;
 
   /**
    * Peer's io read handle
    */
-  struct GNUNET_STREAM_IOReadHandle *io_read_handle;
+  struct GNUNET_STREAM_ReadHandle *io_read_handle;
 
   /**
    * The peer handle when we use the testbed servie

Modified: gnunet/src/stream/stream_api.c
===================================================================
--- gnunet/src/stream/stream_api.c      2012-12-11 10:55:49 UTC (rev 25387)
+++ gnunet/src/stream/stream_api.c      2012-12-11 11:14:24 UTC (rev 25388)
@@ -217,12 +217,12 @@
   /**
    * The write IO_handle associated with this socket
    */
-  struct GNUNET_STREAM_IOWriteHandle *write_handle;
+  struct GNUNET_STREAM_WriteHandle *write_handle;
 
   /**
    * The read IO_handle associated with this socket
    */
-  struct GNUNET_STREAM_IOReadHandle *read_handle;
+  struct GNUNET_STREAM_ReadHandle *read_handle;
 
   /**
    * The shutdown handle associated with this socket
@@ -459,7 +459,7 @@
 /**
  * The IO Write Handle
  */
-struct GNUNET_STREAM_IOWriteHandle
+struct GNUNET_STREAM_WriteHandle
 {
   /**
    * The socket to which this write handle is associated
@@ -511,7 +511,7 @@
 /**
  * The IO Read Handle
  */
-struct GNUNET_STREAM_IOReadHandle
+struct GNUNET_STREAM_ReadHandle
 {
   /**
    * The socket to which this read handle is associated
@@ -901,7 +901,7 @@
 static void 
 write_data (struct GNUNET_STREAM_Socket *socket)
 {
-  struct GNUNET_STREAM_IOWriteHandle *io_handle = socket->write_handle;
+  struct GNUNET_STREAM_WriteHandle *io_handle = socket->write_handle;
   unsigned int packet;
   
   for (packet=0; packet < io_handle->packets_sent; packet++)
@@ -958,7 +958,7 @@
 static void
 cleanup_read_handle (struct GNUNET_STREAM_Socket *socket)
 {
-  struct GNUNET_STREAM_IOReadHandle *read_handle;
+  struct GNUNET_STREAM_ReadHandle *read_handle;
 
   read_handle = socket->read_handle;
   /* Read io time task should be there; if it is already executed then this
@@ -987,7 +987,7 @@
                      const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   struct GNUNET_STREAM_Socket *socket = cls;
-  struct GNUNET_STREAM_IOReadHandle *read_handle;
+  struct GNUNET_STREAM_ReadHandle *read_handle;
   GNUNET_STREAM_DataProcessor proc;
   void *proc_cls;
   size_t read_size;
@@ -1101,7 +1101,7 @@
                  const struct GNUNET_SCHEDULER_TaskContext *tc)
 {
   struct GNUNET_STREAM_Socket *socket = cls;
-  struct GNUNET_STREAM_IOReadHandle *read_handle;
+  struct GNUNET_STREAM_ReadHandle *read_handle;
   GNUNET_STREAM_DataProcessor proc;
   void *proc_cls;
 
@@ -1964,7 +1964,7 @@
 
     wc = socket->write_handle->write_cont;
     wc_cls = socket->write_handle->write_cont_cls;
-    GNUNET_STREAM_io_write_cancel (socket->write_handle);
+    GNUNET_STREAM_write_cancel (socket->write_handle);
     socket->write_handle = NULL;
     if (NULL != wc)
       wc (wc_cls,
@@ -2091,7 +2091,7 @@
 
     wc = socket->write_handle->write_cont;
     wc_cls = socket->write_handle->write_cont_cls;
-    GNUNET_STREAM_io_write_cancel (socket->write_handle);
+    GNUNET_STREAM_write_cancel (socket->write_handle);
     socket->write_handle = NULL;
     if (NULL != wc)
       wc (wc_cls,
@@ -2543,7 +2543,7 @@
            const struct GNUNET_STREAM_AckMessage *ack,
            const struct GNUNET_ATS_Information*atsi)
 {
-  struct GNUNET_STREAM_IOWriteHandle *write_handle;
+  struct GNUNET_STREAM_WriteHandle *write_handle;
   uint64_t ack_bitmap;
   unsigned int packet;
   int need_retransmission;
@@ -3274,13 +3274,13 @@
   {
     LOG (GNUNET_ERROR_TYPE_WARNING,
         "Closing STREAM socket when a read handle is pending\n");
-    GNUNET_STREAM_io_read_cancel (socket->read_handle);
+    GNUNET_STREAM_read_cancel (socket->read_handle);
   }
   if (NULL != socket->write_handle)
   {
     LOG (GNUNET_ERROR_TYPE_WARNING,
         "Closing STREAM socket when a write handle is pending\n");
-    GNUNET_STREAM_io_write_cancel (socket->write_handle);
+    GNUNET_STREAM_write_cancel (socket->write_handle);
     //socket->write_handle = NULL;
   }
   /* Terminate the ack'ing task if they are still present */
@@ -3465,7 +3465,7 @@
  *           is broken then write_cont is immediately called and NULL is
  *           returned.
  */
-struct GNUNET_STREAM_IOWriteHandle *
+struct GNUNET_STREAM_WriteHandle *
 GNUNET_STREAM_write (struct GNUNET_STREAM_Socket *socket,
                      const void *data,
                      size_t size,
@@ -3473,7 +3473,7 @@
                      GNUNET_STREAM_CompletionContinuation write_cont,
                      void *write_cont_cls)
 {
-  struct GNUNET_STREAM_IOWriteHandle *io_handle;
+  struct GNUNET_STREAM_WriteHandle *io_handle;
   struct GNUNET_STREAM_DataMessage *data_msg;
   const void *sweep;
   struct GNUNET_TIME_Relative ack_deadline;
@@ -3524,7 +3524,7 @@
     size = GNUNET_STREAM_ACK_BITMAP_BIT_LENGTH  * socket->max_payload_size;
   num_needed_packets =
       (size + (socket->max_payload_size - 1)) / socket->max_payload_size;
-  io_handle = GNUNET_malloc (sizeof (struct GNUNET_STREAM_IOWriteHandle));
+  io_handle = GNUNET_malloc (sizeof (struct GNUNET_STREAM_WriteHandle));
   io_handle->socket = socket;
   io_handle->write_cont = write_cont;
   io_handle->write_cont_cls = write_cont_cls;
@@ -3609,7 +3609,8 @@
 /**
  * Tries to read data from the stream. Should not be called when another read
  * handle is present; the existing read handle should be canceled with
- * GNUNET_STREAM_io_read_cancel(). Only one read handle per socket is present 
at any time
+ * GNUNET_STREAM_read_cancel(). Only one read handle per socket is present at
+ * any time
  *
  * @param socket the socket representing a stream
  * @param timeout the timeout period
@@ -3622,13 +3623,13 @@
  *           read handle is present (only one read handle per socket is present
  *           at any time)
  */
-struct GNUNET_STREAM_IOReadHandle *
+struct GNUNET_STREAM_ReadHandle *
 GNUNET_STREAM_read (struct GNUNET_STREAM_Socket *socket,
                     struct GNUNET_TIME_Relative timeout,
                    GNUNET_STREAM_DataProcessor proc,
                    void *proc_cls)
 {
-  struct GNUNET_STREAM_IOReadHandle *read_handle;
+  struct GNUNET_STREAM_ReadHandle *read_handle;
   
   LOG (GNUNET_ERROR_TYPE_DEBUG,
        "%s: %s()\n", 
@@ -3657,7 +3658,7 @@
   default:
     break;
   }
-  read_handle = GNUNET_malloc (sizeof (struct GNUNET_STREAM_IOReadHandle));
+  read_handle = GNUNET_malloc (sizeof (struct GNUNET_STREAM_ReadHandle));
   read_handle->proc = proc;
   read_handle->proc_cls = proc_cls;
   read_handle->socket = socket;
@@ -3678,7 +3679,7 @@
  * @param ioh handle to operation to cancel
  */
 void
-GNUNET_STREAM_io_write_cancel (struct GNUNET_STREAM_IOWriteHandle *ioh)
+GNUNET_STREAM_write_cancel (struct GNUNET_STREAM_WriteHandle *ioh)
 {
   struct GNUNET_STREAM_Socket *socket = ioh->socket;
   unsigned int packet;
@@ -3706,7 +3707,7 @@
  * @param ioh handle to operation to cancel
  */
 void
-GNUNET_STREAM_io_read_cancel (struct GNUNET_STREAM_IOReadHandle *ioh)
+GNUNET_STREAM_read_cancel (struct GNUNET_STREAM_ReadHandle *ioh)
 {
   struct GNUNET_STREAM_Socket *socket;
   

Modified: gnunet/src/stream/test_stream_2peers.c
===================================================================
--- gnunet/src/stream/test_stream_2peers.c      2012-12-11 10:55:49 UTC (rev 
25387)
+++ gnunet/src/stream/test_stream_2peers.c      2012-12-11 11:14:24 UTC (rev 
25388)
@@ -61,12 +61,12 @@
   /**
    * Peer's io write handle
    */
-  struct GNUNET_STREAM_IOWriteHandle *io_write_handle;
+  struct GNUNET_STREAM_WriteHandle *io_write_handle;
 
   /**
    * Peer's io read handle
    */
-  struct GNUNET_STREAM_IOReadHandle *io_read_handle;
+  struct GNUNET_STREAM_ReadHandle *io_read_handle;
 
   /**
    * Peer's shutdown handle

Modified: gnunet/src/stream/test_stream_2peers_halfclose.c
===================================================================
--- gnunet/src/stream/test_stream_2peers_halfclose.c    2012-12-11 10:55:49 UTC 
(rev 25387)
+++ gnunet/src/stream/test_stream_2peers_halfclose.c    2012-12-11 11:14:24 UTC 
(rev 25388)
@@ -55,12 +55,12 @@
   /**
    * Peer's io write handle
    */
-  struct GNUNET_STREAM_IOWriteHandle *io_write_handle;
+  struct GNUNET_STREAM_WriteHandle *io_write_handle;
 
   /**
    * Peer's io read handle
    */
-  struct GNUNET_STREAM_IOReadHandle *io_read_handle;
+  struct GNUNET_STREAM_ReadHandle *io_read_handle;
 
   /**
    * Peer's shutdown handle

Modified: gnunet/src/stream/test_stream_big.c
===================================================================
--- gnunet/src/stream/test_stream_big.c 2012-12-11 10:55:49 UTC (rev 25387)
+++ gnunet/src/stream/test_stream_big.c 2012-12-11 11:14:24 UTC (rev 25388)
@@ -53,12 +53,12 @@
   /**
    * Peer's io write handle
    */
-  struct GNUNET_STREAM_IOWriteHandle *io_write_handle;
+  struct GNUNET_STREAM_WriteHandle *io_write_handle;
 
   /**
    * Peer's io read handle
    */
-  struct GNUNET_STREAM_IOReadHandle *io_read_handle;
+  struct GNUNET_STREAM_ReadHandle *io_read_handle;
 
   /**
    * Peer's shutdown handle

Modified: gnunet/src/stream/test_stream_local.c
===================================================================
--- gnunet/src/stream/test_stream_local.c       2012-12-11 10:55:49 UTC (rev 
25387)
+++ gnunet/src/stream/test_stream_local.c       2012-12-11 11:14:24 UTC (rev 
25388)
@@ -52,12 +52,12 @@
   /**
    * Peer's io write handle
    */
-  struct GNUNET_STREAM_IOWriteHandle *io_write_handle;
+  struct GNUNET_STREAM_WriteHandle *io_write_handle;
 
   /**
    * Peer's io read handle
    */
-  struct GNUNET_STREAM_IOReadHandle *io_read_handle;
+  struct GNUNET_STREAM_ReadHandle *io_read_handle;
 
   /**
    * Peer's shutdown handle

Modified: gnunet/src/stream/test_stream_sequence_wraparound.c
===================================================================
--- gnunet/src/stream/test_stream_sequence_wraparound.c 2012-12-11 10:55:49 UTC 
(rev 25387)
+++ gnunet/src/stream/test_stream_sequence_wraparound.c 2012-12-11 11:14:24 UTC 
(rev 25388)
@@ -56,12 +56,12 @@
   /**
    * Peer's io write handle
    */
-  struct GNUNET_STREAM_IOWriteHandle *io_write_handle;
+  struct GNUNET_STREAM_WriteHandle *io_write_handle;
 
   /**
    * Peer's io read handle
    */
-  struct GNUNET_STREAM_IOReadHandle *io_read_handle;
+  struct GNUNET_STREAM_ReadHandle *io_read_handle;
 
   /**
    * Peer's shutdown handle




reply via email to

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