فهرست منبع

Fix problem with 1722 commit which broke ipc.

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1776 fd59a12c-fef9-0310-b244-a6a79926bd2f
Steven Dake 17 سال پیش
والد
کامیت
82bbabb663
1فایلهای تغییر یافته به همراه8 افزوده شده و 8 حذف شده
  1. 8 8
      exec/ipc.c

+ 8 - 8
exec/ipc.c

@@ -448,13 +448,6 @@ static int poll_handler_connection (
 	}
 
 	/*
-	 * Is the service registered ?
-	 */
-	if (!ais_service[conn_info->service]) {
-		return poll_handler_connection_destroy (conn_info);
-	}
-
-	    /*
 	 * Read the header and process it
 	 */
 	if (conn_info->service == SOCKET_SERVICE_INIT && (revent & POLLIN)) {
@@ -471,9 +464,16 @@ static int poll_handler_connection (
 			return (0);
 		}
 		req_setup_send (conn_info, CS_OK);
+		req_setup = (mar_req_setup_t *)conn_info->setup_msg;
+
+		/*
+		 * Is the service registered ?
+		 */
+		if (!ais_service[req_setup->service]) {
+			return poll_handler_connection_destroy (conn_info);
+		}
 
 		pthread_mutex_init (&conn_info->mutex, NULL);
-		req_setup = (mar_req_setup_t *)conn_info->setup_msg;
 		conn_info->shmkey = req_setup->shmkey;
 		conn_info->semkey = req_setup->semkey;
 		conn_info->service = req_setup->service;