Skip to Content.
Sympa Menu

ndt-users - Re: recv_msg problem

Subject: ndt-users list created

List archive

Re: recv_msg problem


Chronological Thread 
  • From: Aaron Brown <>
  • To:
  • Cc:
  • Subject: Re: recv_msg problem
  • Date: Thu, 10 Sep 2009 08:09:51 -0400

From the looks of it, either dbuff is too small (4 bytes vs. the 10 needed) or the msgLen parameter isn't filled in with size of dbuff.

Cheers,
Aaron

On Sep 9, 2009, at 9:24 PM, wrote:

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.


Fall 2009 Internet2 Member Meeting, October 5-8
Hosted by the University of Texas at San Antonio and LEARN
http://events.internet2.edu/2009/fall-mm/







Archive powered by MHonArc 2.6.16.

Top of Page