The branch, libctdb has been updated
       via  fade378b6af02c3c8ca33cd7851657ac3f865cf5 (commit)
      from  7e9d5cf24672d50d95094cd5c52a901d38c65527 (commit)

http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=libctdb


- Log -----------------------------------------------------------------
commit fade378b6af02c3c8ca33cd7851657ac3f865cf5
Author: Ronnie Sahlberg <ronniesahlb...@gmail.com>
Date:   Thu May 13 09:46:38 2010 +1000

    temporary kludge
    
    add a temporary kludge to the ctdb_service() function to handle the timed 
events with zero timeout that are used in the loibctdb code.

-----------------------------------------------------------------------

Summary of changes:
 libctdb/libctdb.c |    7 ++++++-
 libctdb/tst.c     |    2 +-
 2 files changed, 7 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/libctdb/libctdb.c b/libctdb/libctdb.c
index 638874c..47cc7c2 100644
--- a/libctdb/libctdb.c
+++ b/libctdb/libctdb.c
@@ -22,9 +22,11 @@
 #include <poll.h>
 #include "includes.h"
 #include "lib/events/events.h"
+#include "lib/events/events_internal.h"
 #include "include/ctdb.h"
 #include "include/ctdb_protocol.h"
 #include "include/ctdb_private.h"
+#include <sys/time.h>
 
 struct ctdb_context *ctdb_connect(const char *addr)
 {
@@ -120,9 +122,12 @@ struct ctdb_context *ctdb_init(struct event_context *ev)
 int ctdb_service(struct ctdb_context *ctdb)
 {
        int ret;
+       struct timeval t;
 
        ret = event_loop_once(ctdb->ev);
-       ret = event_loop_once(ctdb->ev);
+       do {
+               t = common_event_loop_timer_delay(ctdb->ev);
+       } while(timeval_is_zero(&t));
 
        return 0;
 }
diff --git a/libctdb/tst.c b/libctdb/tst.c
index 8f315ca..002d77b 100644
--- a/libctdb/tst.c
+++ b/libctdb/tst.c
@@ -34,7 +34,7 @@ int main(int argc, char *argv[])
                printf("Failed to register message port\n");
                exit(10);
        }
-       ret = ctdb_set_message_handler_recv(ctdb_context, ctdb_handle);
+       ret = ctdb_set_message_handler_recv(ctdb_context, handle);
        if (ret != 0) {
                printf("Failed to receive set_message_handler reply\n");
                exit(10);


-- 
CTDB repository

Reply via email to