ladishd: don't crash when room link port is not found

User can attempt to load a project into room with fewer ports than the
room where project was saved. This was causing ASSERT:

Wed Dec  1 04:36:45 2010: ERROR: callback_elstart: Cannot find room link port.
Wed Dec  1 04:36:45 2010: ERROR: callback_elend: ASSERT(context_ptr->port != NULL) failed. function callback_elend in ../daemon/room_load.c: 652

This changeset fixes the ASSERT by failing the project load.
This commit is contained in:
Nedko Arnaudov 2010-12-01 04:41:58 +02:00
parent 0cfdeec2e7
commit 8ac048d601
1 changed files with 1 additions and 1 deletions

View File

@ -395,7 +395,7 @@ static void callback_elstart(void * data, const char * el, const char ** attr)
if (context_ptr->port == NULL)
{
log_error("Cannot find room link port.");
context_ptr->port = NULL;
context_ptr->error = XML_TRUE;
}
return;