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
This commit is contained in:
Christine Caulfield 2009-02-20 08:24:40 +00:00
parent c450c918f7
commit 9a3ccc6059

View File

@ -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
*/
if (conn_info->service == SOCKET_SERVICE_INIT && (revent & POLLIN)) {