/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <stdlib.h>
#include <vlc/vlc.h>
+#include "bonjour.h"
#ifdef HAVE_AVAHI_CLIENT
-#include <vlc/intf.h>
-#include <vlc/sout.h>
+#include <vlc_sout.h>
#include <avahi-client/client.h>
#ifdef HAVE_AVAHI_06
/*****************************************************************************
* bonjour_start_service
*****************************************************************************/
-void *bonjour_start_service( vlc_object_t *p_log, char *psz_stype,
- char *psz_name, int i_port, char *psz_txt )
+void *bonjour_start_service( vlc_object_t *p_log, const char *psz_stype,
+ const char *psz_name, int i_port, char *psz_txt )
{
int err;
bonjour_t *p_sys;
{
bonjour_t *p_sys = (bonjour_t *)_p_sys;
- if( p_sys->poll_thread->b_thread )
- {
- p_sys->poll_thread->b_die = 1;
- vlc_thread_join( p_sys->poll_thread );
- }
-
+ vlc_object_kill( p_sys->poll_thread );
+ vlc_thread_join( p_sys->poll_thread );
vlc_object_destroy( p_sys->poll_thread );
if( p_sys->group != NULL )