add a temporary kludge to the ctdb_service() function to handle the timed events with zero timeout that are used in the loibctdb code.
#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)
{
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;
}
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);