[prev in list] [next in list] [prev in thread] [next in thread] 

List:       silc-devel
Subject:    Re: Network Unreachable
From:       Pekka Riikonen <priikone () silcnet ! org>
Date:       2001-08-30 19:12:33
Message-ID: Pine.NEB.4.33.0108302105490.21250-100000 () otaku ! Xtrmntr ! org
[Download RAW message or body]

:
: > Ah, now looking at the code that error is returned when gethostbyname()
: > fails. For some reason it cannot resolve the IP address for the
: > silc.silcnet.org. Do you have DNS configured etc. network working in your
: > machine?...
:
: 	Yes the network is configured on this machine and the irssi silc client
: works just fine from cygwin so its not the machine - its my coding
: somewhere. :-)  Actually my winsock package wasn't working so I went back to
: doing it manually and I am now getting different error messages, which may
: or may not be a good thing... :-)
:
: 	I did some digging in the code and tweaked a line in silclog.c so that the
: log messages get dumped to the default log file.  After a connect call the
: log begins to fill with this over and over...
:
: [Thu Aug 30 13:55:33 2001] [Warning] WaitForMultipleObjects() failed
: [Thu Aug 30 13:55:33 2001] [Error] Error in select(): No error
:
: 	Dug into the code a bit and the problem seems to be in silcwin32schedule.c
: when calling the Win32 function MsgWaitForMultipleObjects.
:
: 	I followed the code through some loops in that test application you sent me
: as well as mine, and this function seems to work ok the first few times
: through, then after the connect call it starts failing.
:
: 	Any ideas?
:
Ok, you need to have Winsock2 installed. Not the wsock32.lib but the
ws2_32.lib or what ever it was named... I'm not sure whether the wsock32
works correctly. Then, you NEED to call the silc_net_win32_init since it
does not only startup the Winsock but it also sets the sockets to
synchronous mode meaning that we can use the SOCKET's as file descriptors,
and thusly wait for them with MsgWaitForMultipleObjects. If that socket
option is not set then the MsgWaitForMultipleObjects will fail
immediately. So you either need to call that silc_net_win32_init or
manually set the option. The code is in lib/silcutil/win32/silcwin32net.c.
And, you need to call it before calling any other SILC library routine.

So, if you startup the Winsock manually then remember to set the socket
option as in the silc_win32_net_init function. I bet that is the reason
now for the invalid argument....

	Pekka
________________________________________________________________________
 Pekka Riikonen                                 priikone at silcnet.org
 Secure Internet Live Conferencing (SILC)       http://silcnet.org/



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic