mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-14 00:47:35 +00:00
Add some mussing pthread_mutex_lock() calls.
git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1725 fd59a12c-fef9-0310-b244-a6a79926bd2f
This commit is contained in:
parent
a6af4c7cab
commit
8f0dbc60d7
14
lib/cfg.c
14
lib/cfg.c
@ -629,6 +629,8 @@ corosync_cfg_admin_state_get (
|
||||
req_lib_cfg_administrativestateget.header.size = sizeof (struct req_lib_cfg_administrativestateget);
|
||||
req_lib_cfg_administrativestateget.administrativeTarget = administrativeTarget;
|
||||
|
||||
pthread_mutex_lock (&cfg_instance->response_mutex);
|
||||
|
||||
error = saSendReceiveReply (cfg_instance->response_fd,
|
||||
&req_lib_cfg_administrativestateget,
|
||||
sizeof (struct req_lib_cfg_administrativestateget),
|
||||
@ -666,6 +668,8 @@ corosync_cfg_admin_state_set (
|
||||
req_lib_cfg_administrativestateset.administrativeTarget = administrativeTarget;
|
||||
req_lib_cfg_administrativestateset.administrativeState = administrativeState;
|
||||
|
||||
pthread_mutex_lock (&cfg_instance->response_mutex);
|
||||
|
||||
error = saSendReceiveReply (cfg_instance->response_fd,
|
||||
&req_lib_cfg_administrativestateset,
|
||||
sizeof (struct req_lib_cfg_administrativestateset),
|
||||
@ -707,6 +711,8 @@ corosync_cfg_kill_node (
|
||||
strcpy((char *)req_lib_cfg_killnode.reason.value, reason);
|
||||
req_lib_cfg_killnode.reason.length = strlen(reason)+1;
|
||||
|
||||
pthread_mutex_lock (&cfg_instance->response_mutex);
|
||||
|
||||
error = saSendReceiveReply (cfg_instance->response_fd,
|
||||
&req_lib_cfg_killnode,
|
||||
sizeof (struct req_lib_cfg_killnode),
|
||||
@ -742,6 +748,8 @@ corosync_cfg_try_shutdown (
|
||||
req_lib_cfg_tryshutdown.header.size = sizeof (struct req_lib_cfg_tryshutdown);
|
||||
req_lib_cfg_tryshutdown.flags = flags;
|
||||
|
||||
pthread_mutex_lock (&cfg_instance->response_mutex);
|
||||
|
||||
error = saSendReceiveReply (cfg_instance->response_fd,
|
||||
&req_lib_cfg_tryshutdown,
|
||||
sizeof (struct req_lib_cfg_tryshutdown),
|
||||
@ -777,8 +785,12 @@ corosync_cfg_replyto_shutdown (
|
||||
|
||||
iov.iov_base = &req_lib_cfg_replytoshutdown;
|
||||
iov.iov_len = sizeof (struct req_lib_cfg_replytoshutdown);
|
||||
|
||||
pthread_mutex_lock (&cfg_instance->response_mutex);
|
||||
error = saSendMsgRetry (cfg_instance->response_fd,
|
||||
&iov, 1);
|
||||
|
||||
return (error);
|
||||
pthread_mutex_unlock (&cfg_instance->response_mutex);
|
||||
|
||||
return (error);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user