From 8ac048d601e83a6e2b356a3342ddb1cba33b4ebc Mon Sep 17 00:00:00 2001 From: Nedko Arnaudov Date: Wed, 1 Dec 2010 04:41:58 +0200 Subject: [PATCH] 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. --- daemon/room_load.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon/room_load.c b/daemon/room_load.c index 787a0347..37978200 100644 --- a/daemon/room_load.c +++ b/daemon/room_load.c @@ -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;