diff --git a/src/rbus/rbus.c b/src/rbus/rbus.c index cca9fa66..b6094327 100644 --- a/src/rbus/rbus.c +++ b/src/rbus/rbus.c @@ -393,16 +393,14 @@ rbusError_t rbusCloseDirect_SubRemove(rbusHandle_t handle, rtVector eventSubs, c } handle->m_connection = handle->m_connectionParent; /* changed the handle m_connection of direct connection to use normal m_connection and used the same to add the rawdatatopic for normal connection*/ memset(rawDataTopic, '\0', strlen(rawDataTopic)); - if(subInternal->rawData) - snprintf(rawDataTopic, RBUS_MAX_NAME_LENGTH, "rawdata.%s", subInternal->sub->eventName); - else - snprintf(rawDataTopic, RBUS_MAX_NAME_LENGTH, "%d.%s", subInternal->subscriptionId, subInternal->sub->eventName); if(subInternal->rawData) { + snprintf(rawDataTopic, RBUS_MAX_NAME_LENGTH, "rawdata.%s", subInternal->sub->eventName); errorcode = rbusMessage_AddListener(handle, rawDataTopic, _subscribe_rawdata_handler, (void *)(subInternal->sub), subInternal->subscriptionId); } else { + snprintf(rawDataTopic, RBUS_MAX_NAME_LENGTH, "%d.%s", subInternal->subscriptionId, subInternal->sub->eventName); errorcode = rbusMessage_AddListener(handle, rawDataTopic, _consumer_event_handler, (void *)&subInternal->subscriptionId, subInternal->subscriptionId); } if(errorcode != RBUS_ERROR_SUCCESS) diff --git a/src/rtmessage/rtrouteBase.c b/src/rtmessage/rtrouteBase.c index 83f480a7..0fb914ca 100644 --- a/src/rtmessage/rtrouteBase.c +++ b/src/rtmessage/rtrouteBase.c @@ -497,12 +497,11 @@ rtRouteDirect_AcceptClientConnection(rtListener* listener) } rtError -rtRouteDirect_SendMessage(const rtPrivateClientInfo* pClient, uint8_t const* pInBuff, int inLength, bool rawData, char* subEventName, uint32_t subscriptionId) +rtRouteDirect_SendMessage(const rtPrivateClientInfo* pClient, uint8_t const* pInBuff, int inLength, char* subEventName, uint32_t subscriptionId) { rtError ret = RT_OK; rtMessageHeader new_header; ssize_t bytes_sent; - (void)rawData; if (pClient && pInBuff && (inLength > 0)) {