Skip to content

Commit

Permalink
Merge branch 'rawdata_opendirect' of github.com:gururaajar/rbus into …
Browse files Browse the repository at this point in the history
…rawdata_opendirect
  • Loading branch information
Gururaaja E S R authored and Gururaaja E S R committed Oct 30, 2023
2 parents 5cf7048 + 8c94741 commit 20d3c30
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/rbus/rbus.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions src/rtmessage/rtrouteBase.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down

0 comments on commit 20d3c30

Please sign in to comment.