If you try to run a client that accesses a non-loaded plugin (eg
votequorum on a default corosync installation) that process will hang.
This patch makes corosync return the ERR_NOT_EXIST error if the plugin
is not found.
I'm slightly unsure about whether it's sensible to call req_setup_send
with the conn_info mutex held, but it seems to work ;-)
if it's not right to do that we might have to get the mutex, read the
service ID, release the mutex and then send the reply.
Steve ?
Chrissie
Index: coroipcs.c
===================================================================
--- coroipcs.c (revision 2397)
+++ coroipcs.c (working copy)
@@ -1385,7 +1385,6 @@
if (res != 1) {
return (0);
}
- req_setup_send (conn_info, CS_OK);
pthread_mutex_init (&conn_info->mutex, NULL);
req_setup = (mar_req_setup_t *)conn_info->setup_msg;
@@ -1393,9 +1392,11 @@
* Is the service registered ?
*/
if (api->service_available (req_setup->service) == 0) {
+ req_setup_send (conn_info, CS_ERR_NOT_EXIST);
ipc_disconnect (conn_info);
return (0);
}
+ req_setup_send (conn_info, CS_OK);
#if _POSIX_THREAD_PROCESS_SHARED < 1
conn_info->semkey = req_setup->semkey;
_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais