struct messaging_context *ctdb_conn_msg_ctx(struct ctdbd_connection *conn);
int ctdbd_conn_get_fd(struct ctdbd_connection *conn);
+void ctdbd_socket_readable(struct ctdbd_connection *conn);
int ctdbd_messaging_send_iov(struct ctdbd_connection *conn,
uint32_t dst_vnn, uint64_t dst_srvid,
return 0;
}
-/*
- * The ctdbd socket is readable asynchronuously
- */
-
-static void ctdbd_socket_handler(struct tevent_context *event_ctx,
- struct tevent_fd *event,
- uint16_t flags,
- void *private_data)
+void ctdbd_socket_readable(struct ctdbd_connection *conn)
{
- struct ctdbd_connection *conn = talloc_get_type_abort(
- private_data, struct ctdbd_connection);
struct ctdb_req_header *hdr = NULL;
int ret;
}
}
+/*
+ * The ctdbd socket is readable asynchronuously
+ */
+
+static void ctdbd_socket_handler(struct tevent_context *event_ctx,
+ struct tevent_fd *event,
+ uint16_t flags,
+ void *private_data)
+{
+ struct ctdbd_connection *conn = talloc_get_type_abort(
+ private_data, struct ctdbd_connection);
+
+ if ((flags & TEVENT_FD_READ) == 0) {
+ return;
+ }
+
+ ctdbd_socket_readable(conn);
+}
+
/*
* Prepare a ctdbd connection to receive messages
*/