Skip to Content.
Sympa Menu

ndt-users - recv_msg problem

Subject: ndt-users list created

List archive

recv_msg problem


Chronological Thread 
  • From:
  • To:
  • Subject: recv_msg problem
  • Date: Wed, 9 Sep 2009 21:24:44 -0400 (EDT)

Hi.

Im doing some modifications on ndt 3.5.0, but i have a problem:

Client side:

memset(buff, 0, sizeof buff);
sprintf(buff, "%-s", "xxxxxccccc");
n = send_msg(ctlSocket, 100 , buff, strlen(buff)); (n = 0 after this,
that's ok)

in client's log: >>> send_msg: type=100, len=10


Server side:

memset(dbuff, 0, sizeof dbuff);
n = recv_msg(ctlsockfd, &msgType, dbuff, &msgLen);
dbuff[msgLen] = 0;

in server log: recv_msg: length [10] > *len [4]

after this n=2 and dbuff is empty, i don't know why read_msg is returning 2


any ideas?



Regards.



Archive powered by MHonArc 2.6.16.

Top of Page