gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [gnurl] 151/254: ghiper.c/hiperfifo.c: add comment about mi


From: gnunet
Subject: [GNUnet-SVN] [gnurl] 151/254: ghiper.c/hiperfifo.c: add comment about missing timer functionality
Date: Sat, 17 Jun 2017 16:53:03 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a commit to annotated tag gnurl-7.54.1
in repository gnurl.

commit e5491e0f9c876c84516f8a3bb7060a3c82e0a830
Author: Daniel Stenberg <address@hidden>
AuthorDate: Fri May 19 14:25:16 2017 +0200

    ghiper.c/hiperfifo.c: add comment about missing timer functionality
    
    It takes someone to read up on the APIs of these libraries to figure out
    how to do this correctly.
    
    Reported-by: Michael Kaufmann
    
    Closes #1253
---
 docs/examples/ghiper.c    | 11 ++++++++++-
 docs/examples/hiperfifo.c | 14 +++++++++++---
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c
index a1af4c5a3..505e90ab0 100644
--- a/docs/examples/ghiper.c
+++ b/docs/examples/ghiper.c
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -163,6 +163,15 @@ static int update_timeout_cb(CURLM *multi, long 
timeout_ms, void *userp)
   MSG_OUT("*** update_timeout_cb %ld => %ld:%ld ***\n",
           timeout_ms, timeout.tv_sec, timeout.tv_usec);
 
+  /* TODO
+   *
+   * if timeout_ms is 0, call curl_multi_socket_action() at once!
+   *
+   * if timeout_ms is -1, just delete the timer
+   *
+   * for all other values of timeout_ms, this should set or *update*
+   * the timer to the new value
+   */
   g->timer_event = g_timeout_add(timeout_ms, timer_cb, g);
   return 0;
 }
diff --git a/docs/examples/hiperfifo.c b/docs/examples/hiperfifo.c
index f08fcda99..45b69b0d1 100644
--- a/docs/examples/hiperfifo.c
+++ b/docs/examples/hiperfifo.c
@@ -5,7 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2016, Daniel Stenberg, <address@hidden>, et al.
+ * Copyright (C) 1998 - 2017, Daniel Stenberg, <address@hidden>, et al.
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -108,8 +108,6 @@ typedef struct _SockInfo
   GlobalInfo *global;
 } SockInfo;
 
-
-
 /* Update the event timer after curl_multi library calls */
 static int multi_timer_cb(CURLM *multi, long timeout_ms, GlobalInfo *g)
 {
@@ -119,6 +117,16 @@ static int multi_timer_cb(CURLM *multi, long timeout_ms, 
GlobalInfo *g)
   timeout.tv_sec = timeout_ms/1000;
   timeout.tv_usec = (timeout_ms%1000)*1000;
   fprintf(MSG_OUT, "multi_timer_cb: Setting timeout to %ld ms\n", timeout_ms);
+
+  /* TODO
+   *
+   * if timeout_ms is 0, call curl_multi_socket_action() at once!
+   *
+   * if timeout_ms is -1, just delete the timer
+   *
+   * for all other values of timeout_ms, this should set or *update*
+   * the timer to the new value
+   */
   evtimer_add(g->timer_event, &timeout);
   return 0;
 }

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

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