Adding an informational message at startup

This commit is contained in:
Thomas Bernard 2012-09-15 17:36:10 +02:00
parent 18ea17b95e
commit dd9cbbb7e8
2 changed files with 16 additions and 4 deletions

View File

@ -1,4 +1,7 @@
$Id: Changelog.txt,v 1.299 2012/08/28 10:31:30 nanard Exp $ $Id: Changelog.txt,v 1.300 2012/09/15 15:35:08 nanard Exp $
2012/09/15:
Adding an informational message at startup
2012/08/24: 2012/08/24:
Moved man page to section 8. miniupnpd.1 => miniupnpd.8 Moved man page to section 8. miniupnpd.1 => miniupnpd.8

View File

@ -1,4 +1,4 @@
/* $Id: miniupnpd.c,v 1.168 2012/07/17 19:35:44 nanard Exp $ */ /* $Id: miniupnpd.c,v 1.169 2012/09/15 15:35:09 nanard Exp $ */
/* MiniUPnP project /* MiniUPnP project
* http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
* (c) 2006-2012 Thomas Bernard * (c) 2006-2012 Thomas Bernard
@ -1322,6 +1322,15 @@ main(int argc, char * * argv)
return 0; return 0;
} }
syslog(LOG_INFO, "Starting%s%swith external interface %s",
#ifdef ENABLE_NATPMP
GETFLAG(ENABLENATPMPMASK) ? " NAT-PMP " : " ",
#else
" ",
#endif
GETFLAG(ENABLEUPNPMASK) ? "UPnP-IGD " : "",
ext_if_name);
if(GETFLAG(ENABLEUPNPMASK)) if(GETFLAG(ENABLEUPNPMASK))
{ {
@ -1356,7 +1365,7 @@ main(int argc, char * * argv)
sudp = OpenAndConfSSDPReceiveSocket(0); sudp = OpenAndConfSSDPReceiveSocket(0);
if(sudp < 0) if(sudp < 0)
{ {
syslog(LOG_INFO, "Failed to open socket for receiving SSDP. Trying to use MiniSSDPd"); syslog(LOG_NOTICE, "Failed to open socket for receiving SSDP. Trying to use MiniSSDPd");
if(SubmitServicesToMiniSSDPD(lan_addrs.lh_first->str, v.port) < 0) { if(SubmitServicesToMiniSSDPD(lan_addrs.lh_first->str, v.port) < 0) {
syslog(LOG_ERR, "Failed to connect to MiniSSDPd. EXITING"); syslog(LOG_ERR, "Failed to connect to MiniSSDPd. EXITING");
return 1; return 1;
@ -1366,7 +1375,7 @@ main(int argc, char * * argv)
sudpv6 = OpenAndConfSSDPReceiveSocket(1); sudpv6 = OpenAndConfSSDPReceiveSocket(1);
if(sudpv6 < 0) if(sudpv6 < 0)
{ {
syslog(LOG_INFO, "Failed to open socket for receiving SSDP (IP v6)."); syslog(LOG_WARNING, "Failed to open socket for receiving SSDP (IP v6).");
} }
#endif #endif