From dd9cbbb7e8d9b09dddc629578c2755a7ee8a51e0 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Sat, 15 Sep 2012 17:36:10 +0200 Subject: [PATCH] Adding an informational message at startup --- miniupnpd/Changelog.txt | 5 ++++- miniupnpd/miniupnpd.c | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/miniupnpd/Changelog.txt b/miniupnpd/Changelog.txt index 7f30bc0..539e198 100644 --- a/miniupnpd/Changelog.txt +++ b/miniupnpd/Changelog.txt @@ -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: Moved man page to section 8. miniupnpd.1 => miniupnpd.8 diff --git a/miniupnpd/miniupnpd.c b/miniupnpd/miniupnpd.c index 2f51ae7..82d5e22 100644 --- a/miniupnpd/miniupnpd.c +++ b/miniupnpd/miniupnpd.c @@ -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 * http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/ * (c) 2006-2012 Thomas Bernard @@ -1322,6 +1322,15 @@ main(int argc, char * * argv) 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)) { @@ -1356,7 +1365,7 @@ main(int argc, char * * argv) sudp = OpenAndConfSSDPReceiveSocket(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) { syslog(LOG_ERR, "Failed to connect to MiniSSDPd. EXITING"); return 1; @@ -1366,7 +1375,7 @@ main(int argc, char * * argv) sudpv6 = OpenAndConfSSDPReceiveSocket(1); 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