From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: From: "theresa g." To: bluez-devel@lists.sourceforge.net Mime-Version: 1.0 Content-Type: text/plain; format=flowed Subject: [Bluez-devel] rctest.c : question about do_listen function Sender: bluez-devel-admin@lists.sourceforge.net Errors-To: bluez-devel-admin@lists.sourceforge.net Reply-To: bluez-devel@lists.sourceforge.net List-Unsubscribe: , List-Id: BlueZ development List-Post: List-Help: List-Subscribe: , List-Archive: Date: Mon, 29 Nov 2004 11:00:30 -0800 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