Skip to Content.
Sympa Menu

ndt-users - recv_msg problem

Subject: ndt-users list created

List archive

recv_msg problem


Chronological Thread 
  • From: Daniel Romero <>
  • To:
  • Subject: recv_msg problem
  • Date: Wed, 9 Sep 2009 21:20:41 -0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=mvsIYF38xk7ifa3aHovg169lGcD6RRaUCimaFnWFnaXQIKnxnDGPC7niW2Dz2Tpf4B booL/oWyVKev332elvOzuZ0lZ/ayh123uSm+3mJ4tepw/uTYDt7V4iscvLg8L4ddAbqt FaikG2/k4a6zVd9BI7d020G2MeCBccxwHUpno=

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