cmRtNet.c: More changes to cmRtNetTest().

This commit is contained in:
kpl 2013-04-26 15:36:37 -07:00
parent 353deeee5d
commit 3e1c8cbce6

View File

@ -803,15 +803,20 @@ void cmRtNetTest( cmCtx_t* ctx, bool mstrFl )
cmUdpPort_t port = 5876; cmUdpPort_t port = 5876;
_cmRtNetTest_t* p = &t; _cmRtNetTest_t* p = &t;
cmRtNetRC_t rc = kOkNetRC; cmRtNetRC_t rc = kOkNetRC;
unsigned hn = cmUdpHostNameMaxCharCount();
cmChar_t hostNameStr[ hn ];
memset(&t,0,sizeof(t)); memset(&t,0,sizeof(t));
if( cmUdpHostName(hostNameStr,hn) != kOkUdpRC )
goto errLabel;
if( cmThreadCreate(&p->thH,_cmRtNetTestThreadFunc,p,&ctx->rpt) != kOkThRC ) if( cmThreadCreate(&p->thH,_cmRtNetTestThreadFunc,p,&ctx->rpt) != kOkThRC )
goto errLabel; goto errLabel;
if((rc = cmRtNetAlloc(ctx,&p->netH,_cmRtNetTestRecv,p)) != kOkNetRC ) if((rc = cmRtNetAlloc(ctx,&p->netH,_cmRtNetTestRecv,p)) != kOkNetRC )
goto errLabel; goto errLabel;
if((rc = cmRtNetCreateNode(p->netH, "thunk", NULL, port )) != kOkNetRC) if((rc = cmRtNetCreateNode(p->netH, hostNameStr, NULL, port )) != kOkNetRC)
goto errLabel; goto errLabel;
if( mstrFl ) if( mstrFl )