]> git.proxmox.com Git - mirror_corosync.git/commitdiff
Correct missing poll funtions from service handler struct needed for confdb APIs
authorSteven Dake <sdake@redhat.com>
Mon, 4 Jul 2011 15:17:53 +0000 (08:17 -0700)
committerSteven Dake <sdake@redhat.com>
Fri, 15 Jul 2011 20:30:41 +0000 (13:30 -0700)
Signed-off-by: Steven Dake <sdake@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
exec/apidef.c
include/corosync/engine/coroapi.h
services/confdb.c

index b22b17f193e04c6e2bf8ebc961d11289ef261316..72bfc6200e30c604a3c38a0e7aa1a6c5350df50d 100644 (file)
@@ -144,7 +144,9 @@ static struct corosync_api_v1 apidef_corosync_api_v1 = {
        .fatal_error = _corosync_public_exit_error,
        .shutdown_request = corosync_shutdown_request,
        .state_dump = corosync_state_dump,
-       .poll_handle_get = corosync_poll_handle_get
+       .poll_handle_get = corosync_poll_handle_get,
+       .poll_dispatch_add = poll_dispatch_add,
+       .poll_dispatch_delete = poll_dispatch_delete
 };
 
 void apidef_init (struct objdb_iface_ver0 *objdb) {
index e6eae24b62f5d9b8502e1dc322187c7522538ba5..0f6bb5ede8d44093a0b33a47e3cc82e172c0bc76 100644 (file)
@@ -608,7 +608,6 @@ struct corosync_api_v1 {
         */
        hdb_handle_t (*poll_handle_get) (void);
 
-
        int (*object_key_create_typed) (
                hdb_handle_t object_handle,
                const char *key_name,
@@ -636,6 +635,22 @@ struct corosync_api_v1 {
                hdb_handle_t *handle,
                int (schedwrk_fn) (const void *),
                const void *context);
+
+       int (*poll_dispatch_add) (hdb_handle_t handle,
+               int fd,
+               int events,
+               void *data,
+
+               int (*dispatch_fn) (hdb_handle_t handle,
+                       int fd,
+                       int revents,
+                       void *data));
+
+
+       int (*poll_dispatch_delete) (
+               hdb_handle_t handle,
+               int fd);
+
 };
 
 #define SERVICE_ID_MAKE(a,b) ( ((a)<<16) | (b) )
index 0083eccd4fed15257c1f62d2ed87fe171bb4d84d..7fd283ddb18f74f2beb1aa1242c454bca70e9551 100644 (file)
@@ -321,7 +321,7 @@ __attribute__ ((constructor)) static void corosync_lcr_component_register (void)
 
 static int confdb_exec_exit_fn(void)
 {
-       poll_dispatch_delete(api->poll_handle_get(), notify_pipe[0]);
+       api->poll_dispatch_delete(api->poll_handle_get(), notify_pipe[0]);
        close(notify_pipe[0]);
        close(notify_pipe[1]);
        return 0;
@@ -347,7 +347,7 @@ static int confdb_exec_init_fn (
                }
        }
 
-       return poll_dispatch_add(api->poll_handle_get(), notify_pipe[0],
+       return api->poll_dispatch_add(api->poll_handle_get(), notify_pipe[0],
                POLLIN, NULL, objdb_notify_dispatch);
 }