Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
grodansparadis committed Mar 24, 2015
2 parents 23d6262 + 7e82212 commit 998fc2c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/vscp/common/tcpipclientthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,8 @@ void VSCPClientThread::handleClientSend( struct ns_connection *conn, CControlObj

unsigned int index = 0;

event.pdata = new uint8_t[ event.sizeData ];

if ( NULL == event.pdata ) {
ns_send( conn, MSG_INTERNAL_MEMORY_ERROR, strlen( MSG_INTERNAL_MEMORY_ERROR ) );
return;
Expand Down
8 changes: 6 additions & 2 deletions src/vscp/common/vscpremotetcpif.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,9 @@ int VscpRemoteTcpIf::doCmdSend( const vscpEvent *pEvent )
strBuf += strGUID;
}

strBuf += _(",");
if ( 0 < pEvent->sizeData ) {
strBuf += _(",");
}

// Data
for ( i=0; i<pEvent->sizeData; i++ ) {
Expand Down Expand Up @@ -705,7 +707,9 @@ int VscpRemoteTcpIf::doCmdSendEx( const vscpEventEx *pEvent )
strBuf += strGUID;
}

strBuf += _(",");
if ( 0 < pEvent->sizeData ) {
strBuf += _(",");
}

// Data
for ( i=0; i<pEvent->sizeData; i++ ) {
Expand Down

0 comments on commit 998fc2c

Please sign in to comment.