All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] rctest.c : question about do_listen function
@ 2004-11-29 19:00 theresa g.
  2004-11-29 19:10 ` Lars Grunewaldt
  0 siblings, 1 reply; 3+ messages in thread
From: theresa g. @ 2004-11-29 19:00 UTC (permalink / raw)
  To: bluez-devel

hello everyone,

I have looked at the rctest.c file (inside the bluez-utils-2.11/test 
directory) to get insight on how to write my own server app.  It all makes 
sense, except for the listen() call inside the do_listen function, which 
follows:

	if( listen(s, 10) ) {
		syslog(LOG_ERR,"Can not listen on the socket. %s(%d)", strerror(errno), 
errno);
		exit(1);
	}

I'm somewhat of a newbie to all this stuff (including sockets) so I question 
why the listen return is being checked for a 1 for error when the man pages 
say -1 is returned on error and 0 is returned on success.

Insight to this would really be appreciated!

Thanks in advance,
Theresa




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-30  0:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-29 19:00 [Bluez-devel] rctest.c : question about do_listen function theresa g.
2004-11-29 19:10 ` Lars Grunewaldt
2004-11-30  0:46   ` theresa g.

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.