Commit 63240b2b authored by Jonathan Michalon's avatar Jonathan Michalon

libovccclient/ovccclient-server: send_message: ensure message is non-null

Even if the Message parameter is non-nullable, in case of problem creating the
Message instance we still may receive a null parameter here. This triggers
an assert failure in send_loop_queue.push without error so we get a nice
deadlock waiting for a non-queued message to be sent...
parent b129490a
......@@ -277,6 +277,8 @@ namespace OVCCClient
if (AtomicInt.get (ref send_loop_running) == 0) {
throw new ServerError.COMMUNICATION_FAILED ("Send loop is not running");
} else if (msg == null) { /* send_loop_queue.push needs non-null */
throw new ServerError.COMMUNICATION_FAILED ("Message to send is null");
} else {
ulong id = 0;
ulong cancel_id = 0;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment