X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Faccess_output%2Fbonjour.c;h=908673e6f18c2638f56275fd5dc60a47d39795ee;hb=6411526fe052a033300e73045b07c0aaee089e88;hp=34663d3d3d9b9a23f177fd72cf6fe566430f8019;hpb=3daa12e4604194736153dd5a775251a3c3988c80;p=vlc diff --git a/modules/access_output/bonjour.c b/modules/access_output/bonjour.c index 34663d3d3d..908673e6f1 100644 --- a/modules/access_output/bonjour.c +++ b/modules/access_output/bonjour.c @@ -18,19 +18,22 @@ * * 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 + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif #include +#include "bonjour.h" #ifdef HAVE_AVAHI_CLIENT -#include -#include +#include #include #ifdef HAVE_AVAHI_06 @@ -190,8 +193,8 @@ static void poll_iterate_thread( poll_thread_t *p_pt ) /***************************************************************************** * 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; @@ -266,7 +269,7 @@ void *bonjour_start_service( vlc_object_t *p_log, char *psz_stype, 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 ) @@ -290,13 +293,9 @@ void bonjour_stop_service( void *_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_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 );