Jelajahi Sumber

Don't crash if a library tries to talk to a module that is not loaded

git-svn-id: http://svn.fedorahosted.org/svn/corosync/trunk@1772 fd59a12c-fef9-0310-b244-a6a79926bd2f
Christine Caulfield 17 tahun lalu
induk
melakukan
9a3ccc6059
1 mengubah file dengan 7 tambahan dan 0 penghapusan
  1. 7 0
      exec/ipc.c

+ 7 - 0
exec/ipc.c

@@ -448,6 +448,13 @@ 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
 	 * Read the header and process it
 	 */
 	 */
 	if (conn_info->service == SOCKET_SERVICE_INIT && (revent & POLLIN)) {
 	if (conn_info->service == SOCKET_SERVICE_INIT && (revent & POLLIN)) {