Explorar o código

Change assert to allow empty messages to be forwarded downstream

This will allow chain elements such as a defragmenter to buffer fragmented messages in order to forward the whole message once all the fragments are available.
omigamedev %!s(int64=2) %!d(string=hai) anos
pai
achega
b2029acd71
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/mediahandlerelement.cpp

+ 1 - 1
src/mediahandlerelement.cpp

@@ -127,7 +127,7 @@ MediaHandlerElement::formIncomingControlMessage(message_ptr message,
 ChainedMessagesProduct
 MediaHandlerElement::formIncomingBinaryMessage(ChainedMessagesProduct messages,
                                                std::function<bool(ChainedOutgoingProduct)> send) {
-	assert(messages && !messages->empty());
+	assert(messages);
 	auto product = processIncomingBinaryMessage(messages);
 	prepareAndSendResponse(product.outgoing, send);
 	if (product.incoming) {