esound r516 - trunk
- From: jmouette svn gnome org
- To: svn-commits-list gnome org
- Subject: esound r516 - trunk
- Date: Tue, 18 Nov 2008 20:18:09 +0000 (UTC)
Author: jmouette
Date: Tue Nov 18 20:18:08 2008
New Revision: 516
URL: http://svn.gnome.org/viewvc/esound?rev=516&view=rev
Log:
* clients.c: (get_new_clients): prettier debugging output.
Modified:
trunk/ChangeLog
trunk/clients.c
Modified: trunk/clients.c
==============================================================================
--- trunk/clients.c (original)
+++ trunk/clients.c Tue Nov 18 20:18:08 2008
@@ -146,7 +146,6 @@
size_t size_in = sizeof(struct sockaddr_in);
esd_client_t *new_client = NULL;
- unsigned long addr;
short port;
/* see who awakened us */
@@ -171,22 +170,24 @@
fd = accept( listen, (struct sockaddr*) &incoming, (socklen_t *) &size_in );
if ( fd < 0 )
goto again;
- port = ntohs( incoming.sin_port );
- addr = ntohl( incoming.sin_addr.s_addr );
-
ESDBG_TRACE(
+ if (esd_use_tcpip) {
+
+ port = ntohs( incoming.sin_port );
+ addr = ntohl( incoming.sin_addr.s_addr );
+
printf( "(%02d) new client from: %03u.%03u.%03u.%03u:%05d\n",
fd, (unsigned int) addr >> 24,
(unsigned int) (addr >> 16) % 256,
(unsigned int) (addr >> 8) % 256,
- (unsigned int) addr % 256, port ); );
+ (unsigned int) addr % 256, port );
+ } );
}
#ifdef USE_LIBWRAP
if (esd_use_tcpip)
{
struct request_info req;
- struct servent *serv;
request_init( &req, RQ_DAEMON, "esound", RQ_FILE, fd, NULL );
fromhost( &req );
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]