Mostly avahi related and cosmetic fixes for the graceful exit patch.
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
+#include <signal.h>
#include <avahi-client/client.h>
#include <avahi-client/publish.h>
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;
/*
* 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;
while(tvheadend_running) {
readmsg:
- tvhlog(LOG_INFO, "htsp", "read_loop");
if((r = htsp_read_message(htsp, &m, 0)) != 0)
return r;
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) {