[NeoStats-Devel] NeoStats [Commits] r3053 - in /trunk/src: signals.c support.c
[email protected] Wed, 20 Dec 2006 21:08:50 -0000
| Newsgroups | gmane.comp.neostats.devel |
|---|---|
| Message-ID | <[email protected]> |
Author: Mark
Date: Thu Dec 21 05:08:50 2006
New Revision: 3053
URL: http://svn.neostats.net/cgi-bin/viewvc.cgi?rev=3053&root=NeoStats&view=rev
Log:
sighup compile fix and inet_ntop fix
Modified:
trunk/src/signals.c
trunk/src/support.c
Modified: trunk/src/signals.c
URL: http://svn.neostats.net/cgi-bin/viewvc.cgi/trunk/src/signals.c?rev=3053&root=NeoStats&r1=3052&r2=3053&view=diff
==============================================================================
--- trunk/src/signals.c (original)
+++ trunk/src/signals.c Thu Dec 21 05:08:50 2006
@@ -55,6 +55,7 @@
do_exit( NS_EXIT_NORMAL, msg_sigterm );
}
+#ifdef SIGHUP
/** @brief SIGHUP handler
*
* Called by the signal handler if we get a SIGHUP
@@ -72,6 +73,7 @@
check_sql_sock();
#endif
}
+#endif /* SIGHUP */
/** @brief SEGV handler
*
@@ -221,8 +223,10 @@
( void ) sigaddset( &act.sa_mask, SIGSEGV );
( void ) sigaction( SIGSEGV, &act, NULL );
+#endif /* !WIN32 */
+#ifdef SIGHUP
( void ) signal( SIGHUP, sighup_handler );
-#endif
+#endif /* SIGHUP */
( void ) signal( SIGTERM, sigterm_handler );
( void ) signal( SIGSEGV, sigsegv_handler );
( void ) signal( SIGINT, sigterm_handler );
Modified: trunk/src/support.c
URL: http://svn.neostats.net/cgi-bin/viewvc.cgi/trunk/src/support.c?rev=3053&root=NeoStats&r1=3052&r2=3053&view=diff
==============================================================================
--- trunk/src/support.c (original)
+++ trunk/src/support.c Thu Dec 21 05:08:50 2006
@@ -241,6 +241,9 @@
static const char *fmt = "%u.%u.%u.%u";
char tmp[ sizeof( "255.255.255.255" )];
+ /* only supports AF_INET at present */
+ if ( af != AF_INET )
+ return NULL;
if ( ( size_t ) sprintf( tmp, fmt, src[0], src[1], src[2], src[3] ) >= size )
return NULL;
strlcpy( dst, tmp, size );
@@ -249,7 +252,7 @@
#endif /* HAVE_INET_NTOP */
#ifndef HAVE_INET_ATON
-/** @brief inet_ntop
+/** @brief inet_nton
*
* Convert from "a.b.c.d" IP address string into an in_addr structure.
*