X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fping.c;h=5df82f475cb935383d629a23186bee2754382979;hb=22b9f5441f0bb294e16aa27169d02eb69e32d556;hp=c97571b85c066c695fd66369269b6035bba00097;hpb=6a68a39a2c6987fdcc94fb1bdd9cc8f598fd9478;p=collectd.git diff --git a/src/ping.c b/src/ping.c index c97571b8..5df82f47 100644 --- a/src/ping.c +++ b/src/ping.c @@ -379,7 +379,7 @@ static int start_thread (void) /* {{{ */ if (ping_thread_loop != 0) { pthread_mutex_unlock (&ping_lock); - return (-1); + return (0); } ping_thread_loop = 1; @@ -393,7 +393,7 @@ static int start_thread (void) /* {{{ */ pthread_mutex_unlock (&ping_lock); return (-1); } - + pthread_mutex_unlock (&ping_lock); return (0); } /* }}} int start_thread */ @@ -444,10 +444,7 @@ static int ping_init (void) /* {{{ */ "Will use a timeout of %gs.", ping_timeout); } - if (start_thread () != 0) - return (-1); - - return (0); + return (start_thread ()); } /* }}} int ping_init */ static int config_set_string (const char *name, /* {{{ */