I've been trying to figure out why the slptool 2.0.0 does not work on 
Solaris. I have debugged through some code, and have come to

SLPNetworkSendMessage (sockfd=7, socktype=1, buf=0x2a570, bufsz=49,
   peeraddr=0xffbff3f0, timeout=0xffbff178) at 
../../common/slp_network.c:155


155                 xferbytes = sendto(sockfd, (char *)cur,
156                       (int)(end - cur), flags, peeraddr,
157                       sizeof(struct sockaddr_storage));

This call returns -1 (errno==22, Invalid argument). Given this, I am 
presuming the problem is the 'peeraddr' structure being invalid (since 
"(int)(end - cur)" is 49, which does not overflow a size_t). Looking at 
where the peeradr is set (in NetworkConnectToSlpd) everything looks fine:

(gdb) print *(struct sockaddr_in *) addr
$95 = {sin_family = 2, sin_port = 427, sin_addr = {S_un = {S_un_b = {
       s_b1 = 127 '\177', s_b2 = 0 '\0', s_b3 = 0 '\0', s_b4 = 1 '\001'},
     S_un_w = {s_w1 = 32512, s_w2 = 1}, S_addr = 2130706433}},
 sin_zero = "\000\000\000\000\000\000\000"}

I'm not sure where else to look for this.

Any thoughts?


Thanks
-Jim

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Openslp-users mailing list
Openslp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openslp-users

Reply via email to