|
@@ -608,13 +608,14 @@ cmRtNetRC_t _cmRtNetSyncModeRecv( cmRtNet_t* p, const char* data, unsigned data
|
608
|
608
|
return rc;
|
609
|
609
|
}
|
610
|
610
|
|
|
611
|
+// This is called in the context of cmRtNetReceive().
|
611
|
612
|
void _cmRtNetRecv( void* cbArg, const char* data, unsigned dataByteCnt, const struct sockaddr_in* fromAddr )
|
612
|
613
|
{
|
613
|
614
|
cmRtNet_t* p = (cmRtNet_t*)cbArg;
|
614
|
615
|
|
615
|
616
|
if( _cmRtNetIsSyncModeMsg(data,dataByteCnt))
|
616
|
617
|
_cmRtNetSyncModeRecv(p,data,dataByteCnt,fromAddr);
|
617
|
|
- else
|
|
618
|
+ // else
|
618
|
619
|
p->cbFunc(p->cbArg,data,dataByteCnt,fromAddr);
|
619
|
620
|
|
620
|
621
|
}
|
|
@@ -707,6 +708,7 @@ cmRtNetRC_t cmRtNetReceive( cmRtNetH_t h )
|
707
|
708
|
cmRtNetRC_t rc = kOkNetRC;
|
708
|
709
|
cmRtNet_t* p = _cmRtNetHandleToPtr(h);
|
709
|
710
|
|
|
711
|
+ // Calling this function results in callbacks to _cmRtNetRecv() (above)
|
710
|
712
|
if( cmUdpGetAvailData(p->udpH, NULL, NULL, NULL ) != kOkUdpRC )
|
711
|
713
|
{
|
712
|
714
|
cmErrMsg(&p->err,kUdpPortFailNetRC,"UDP port query failed.");
|