This is addressed in my flow control work so please don't merge. regards -steve
On 07/14/2010 08:56 PM, Angus Salkeld wrote: > Signed-off-by: Angus Salkeld<[email protected]> > --- > exec/coroipcs.c | 10 +++++++++- > 1 files changed, 9 insertions(+), 1 deletions(-) > > diff --git a/exec/coroipcs.c b/exec/coroipcs.c > index 923ed87..e8e2ab1 100644 > --- a/exec/coroipcs.c > +++ b/exec/coroipcs.c > @@ -123,6 +123,7 @@ union semun { > }; > #endif > #endif > +static pthread_mutexattr_t conn_info_mutex_attr; > > > enum conn_state { > @@ -1021,6 +1022,9 @@ static void _corosync_ipc_init(void) > struct sockaddr_un un_addr; > int res; > > + pthread_mutexattr_init(&conn_info_mutex_attr); > + pthread_mutexattr_settype(&conn_info_mutex_attr, > PTHREAD_MUTEX_RECURSIVE); > + > /* > * Create socket for IPC clients, name socket, listen for connections > */ > @@ -1344,6 +1348,10 @@ static void msg_send (void *conn, const struct iovec > *iov, unsigned int iov_len, > POLLIN|POLLOUT|POLLNVAL); > } else > if (res == -1) { > + char error_str[100]; > + strerror_r (errno, error_str, 100); > + log_printf (LOGSYS_LEVEL_ERROR, "Error sending flow control > errno:%d (%s)\n", > + errno, error_str); > ipc_disconnect (conn_info); > } > #if _POSIX_THREAD_PROCESS_SHARED> 0 > @@ -1701,7 +1709,7 @@ int coroipcs_handler_dispatch ( > return (0); > } > > - pthread_mutex_init (&conn_info->mutex, NULL); > + pthread_mutex_init(&conn_info->mutex,&conn_info_mutex_attr); > req_setup = (mar_req_setup_t *)conn_info->setup_msg; > /* > * Is the service registered ? _______________________________________________ Openais mailing list [email protected] https://lists.linux-foundation.org/mailman/listinfo/openais
