Fixes for graceful exit patch

Mostly avahi related and cosmetic fixes for the graceful exit patch.
This commit is contained in:
Jaroslav Kysela 2014-03-05 15:03:50 +01:00
parent c07824a410
commit 9e092a91bc
4 changed files with 6 additions and 6 deletions

View file

@ -39,6 +39,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <signal.h>
#include <avahi-client/client.h>
#include <avahi-client/publish.h>
@ -248,13 +249,13 @@ client_callback(AvahiClient *c, AvahiClientState state, void *userdata)
static void *
avahi_thread(void *aux)
{
const AvahiPoll *ap = avahi_simple_poll_get(asp);
const AvahiPoll *ap = avahi_simple_poll_get(avahi_asp);
name = avahi_strdup("Tvheadend");
avahi_client_new(ap, AVAHI_CLIENT_NO_FAIL, client_callback, NULL, NULL);
while(avahi_simple_poll_iterate(asp, -1) == 0);
while(avahi_simple_poll_iterate(avahi_asp, -1) == 0);
return NULL;

View file

@ -100,8 +100,8 @@ static void _epgdb_v1_process ( htsmsg_t *c, epggrab_stats_t *stats )
/*
* Process v2 data
*/
static void _epgdb_v2_process (
char **sect, htsmsg_t *m, epggrab_stats_t *stats )
static void
_epgdb_v2_process( char **sect, htsmsg_t *m, epggrab_stats_t *stats )
{
int save = 0;
const char *s;

View file

@ -1989,7 +1989,6 @@ htsp_read_loop(htsp_connection_t *htsp)
while(tvheadend_running) {
readmsg:
tvhlog(LOG_INFO, "htsp", "read_loop");
if((r = htsp_read_message(htsp, &m, 0)) != 0)
return r;

View file

@ -695,7 +695,7 @@ tcp_server_done(void)
char c = 'E';
tcp_server_running = 0;
write(tcp_server_pipe.wr, &c, 1);
tvh_write(tcp_server_pipe.wr, &c, 1);
pthread_mutex_lock(&global_lock);
LIST_FOREACH(tsl, &tcp_server_active, alink) {