summaryrefslogtreecommitdiff
path: root/tntconfig.cpp
diff options
context:
space:
mode:
authorChristian Wieninger <cwieninger (at) gmx (dot) de>2009-02-19 20:29:24 +0100
committerChristian Wieninger <cwieninger (at) gmx (dot) de>2009-02-19 20:29:24 +0100
commitd5d59f964996c24019898e0573067b919fa83a6f (patch)
treeacbdb7d19f9083c77cb67b52b3c204defb623fca /tntconfig.cpp
parent3b53981b41a59c7935e372a56737c14857432bae (diff)
parente3343f602dfe288afa1f027563d307d049d95c1e (diff)
downloadvdr-plugin-live-d5d59f964996c24019898e0573067b919fa83a6f.tar.gz
vdr-plugin-live-d5d59f964996c24019898e0573067b919fa83a6f.tar.bz2
Merge commit 'tadi/master'
Conflicts: README setup.cpp
Diffstat (limited to 'tntconfig.cpp')
-rw-r--r--tntconfig.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/tntconfig.cpp b/tntconfig.cpp
index 23943a5..d35dad4 100644
--- a/tntconfig.cpp
+++ b/tntconfig.cpp
@@ -252,8 +252,19 @@ namespace vdrlive {
Setup::IpList const& ips = LiveSetup().GetServerIps();
int port = LiveSetup().GetServerPort();
+ size_t listenFailures = 0;
for ( Setup::IpList::const_iterator ip = ips.begin(); ip != ips.end(); ++ip ) {
- app.listen(*ip, port);
+ try {
+ app.listen(*ip, port);
+ }
+ catch (exception const & ex) {
+ esyslog("ERROR: live ip = %s is invalid: exception = %s", ip->c_str(), ex.what());
+ if (++listenFailures == ips.size()) {
+ // if no listener was initialized we throw at
+ // least the last exception to the next layer.
+ throw;
+ }
+ }
}
#if TNTSSLSUPPORT