*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
-#include <stdlib.h>
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#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;
error:
if( p_sys->poll_thread != NULL )
- vlc_object_destroy( p_sys->poll_thread );
+ vlc_object_release( p_sys->poll_thread );
if( p_sys->client != NULL )
avahi_client_free( p_sys->client );
if( p_sys->simple_poll != NULL )
{
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_destroy( p_sys->poll_thread );
+ vlc_object_kill( p_sys->poll_thread );
+ vlc_thread_join( p_sys->poll_thread );
+ vlc_object_release( p_sys->poll_thread );
if( p_sys->group != NULL )
avahi_entry_group_free( p_sys->group );