CVS Commit: network

Marc ARIBERTI marcari at via.ecp.fr
Sat Oct 27 19:06:10 CEST 2001


On Sat, Oct 27, 2001, Brieuc Jeunhomme wrote:
> In order to avoid 100% cpu consumption, NULL could be used instead of
> &select_timeout. This way, the select won't be uselessly interrupted
> and the thread won't be awaken each second just to see it has nothing
> to do.
It works with a NULL without problem.
But I wonder about one thing :
* If no one alls the telnet interface : the condition while(!module->uDie)
will never be reached
* then the only way to kill the telnet module is to press ctrl+C

> I also suggest, for portability, that memset(&(addr.sin_zero),0,8); at
> the beginning be replaced by
> memset(&(addr.sin_zero),0,sizeof(addr.sin_zero)); and of course called
When I see the definition of sin_zero, it is a wise advice.

> One more thing... I see a call to socket() in the main routine of the
> telnet interface and no call to close() I can however see some calls to
> return... :) Nitroooooooooox ?
fixed !
 
> And one more : strlen(WELCOME) could be replaced by
> sizeof(WELCOME)-sizeof(char), right ?
No, then the \n is not sent to the client (and it is quite ugly)

-- 
Marc ARIBERTI
marcari at via.ecp.fr




More information about the vlcs-devel mailing list