Changeset 8152


Ignore:
Timestamp:
Apr 5, 2009, 5:34:34 PM (13 years ago)
Author:
charles
Message:

(trunk) back out the avahi patch

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/cli/Makefile.am

    r8149 r8152  
    2424    $(LIBCURL_LIBS) \
    2525    $(ZLIB_LIBS) \
    26     $(AVAHI_LIBS) \
    2726    $(OPENSSL_LIBS) \
    2827    $(PTHREAD_LIBS) \
  • trunk/configure.ac

    r8149 r8152  
    253253fi
    254254
    255 PKG_CHECK_MODULES([AVAHI],
    256                   [avahi-client],
    257                   [have_avahi=yes],
    258                   [have_avahi=no])
    259 AC_ARG_ENABLE([avahi],
    260               AS_HELP_STRING([--enable-avahi],[enable mDNS advertising for the web interface]),,
    261               [enable_avahi=yes])
    262 use_avahi=no
    263 if test "x$enable_avahi" = "xyes" ; then
    264     if test "x$have_avahi" = "xyes"; then
    265         use_avahi=yes
    266         AC_DEFINE([HAVE_AVAHI], 1)
    267     fi
    268 fi
    269 
    270255AC_ARG_ENABLE([nls],
    271256              AS_HELP_STRING([--enable-nls],[enable native language support]),,
     
    391376          ... dbus-glib support:    ${use_dbus_glib}
    392377          ... libnotify support:    ${use_libnotify}
    393           ... avahi support:        ${use_avahi}
    394378        Build OS X client:          ${build_mac}
    395379
  • trunk/daemon/Makefile.am

    r8149 r8152  
    2626    $(LIBCURL_LIBS) \
    2727    $(ZLIB_LIBS) \
    28     $(AVAHI_LIBS) \
    2928    $(OPENSSL_LIBS) \
    3029    $(PTHREAD_LIBS) -lm
  • trunk/gtk/Makefile.am

    r8149 r8152  
    110110    $(LIBCURL_LIBS) \
    111111    $(ZLIB_LIBS) \
    112     $(AVAHI_LIBS) \
    113112    $(PTHREAD_LIBS) -lm
    114113
  • trunk/libtransmission/Makefile.am

    r8149 r8152  
    88    $(OPENSSL_CFLAGS) \
    99    $(PTHREAD_CFLAGS) \
    10     $(AVAHI_CFLAGS)   \
    1110    $(ZLIB_CFLAGS)
    1211
     
    130129    $(OPENSSL_LIBS) \
    131130    $(PTHREAD_LIBS) \
    132     $(AVAHI_LIBS) \
    133131    $(ZLIB_LIBS) \
    134132    -lm
  • trunk/libtransmission/rpc-server.c

    r8149 r8152  
    2525#endif
    2626
    27 #ifdef HAVE_AVAHI
    28  #include <avahi-common/simple-watch.h>
    29  #include <avahi-client/client.h>
    30  #include <avahi-client/publish.h>
    31 #endif
    32 
    3327#include <libevent/event.h>
    3428#include <libevent/evhttp.h>
     
    6862#ifdef HAVE_ZLIB
    6963    z_stream           stream;
    70 #endif
    71 #ifdef HAVE_AVAHI
    72     AvahiSimplePoll   *poll;
    73     AvahiClient       *client;
    74     AvahiEntryGroup   *group;
    7564#endif
    7665};
     
    531520}
    532521
    533 #ifdef HAVE_AVAHI
    534 static void
    535 entry_group_callback( AvahiEntryGroup *g, AvahiEntryGroupState state, void *userdata )
    536 {
    537         /* No-op */
    538 }
    539 
    540 static void
    541 client_callback( AvahiClient *c, AvahiClientState state, void * vserver )
    542 {
    543         tr_rpc_server * server  = vserver;
    544 
    545         if( state != AVAHI_CLIENT_S_RUNNING )
    546         {
    547                 avahi_client_free( server->client );
    548                 server->client = NULL;
    549                 avahi_simple_poll_free( server->poll );
    550                 server->poll = NULL;
    551                 return;
    552         }
    553 
    554         server->group = avahi_entry_group_new( c, entry_group_callback, NULL );
    555         avahi_entry_group_add_service( server->group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC,
    556                                        0, "Transmission Web Interface", "_http._tcp", NULL, NULL, server->port,
    557                                        "path=/transmission/web", NULL );
    558         avahi_entry_group_commit( server->group );
    559 }
    560 #endif /* HAVE_AVAHI */
    561 
    562522static void
    563523startServer( void * vserver )
     
    571531        evhttp_set_gencb( server->httpd, handle_request, server );
    572532
    573 #ifdef HAVE_AVAHI
    574         server->poll = avahi_simple_poll_new();
    575         server->client = avahi_client_new( avahi_simple_poll_get( server->poll ), 0, client_callback, server, NULL );
    576 #endif
    577533    }
    578534}
     
    585541        evhttp_free( server->httpd );
    586542        server->httpd = NULL;
    587 
    588 #ifdef HAVE_AVAHI
    589         avahi_client_free( server->client );
    590         server->client = NULL;
    591         avahi_entry_group_free( server->group );
    592         server->group = NULL;
    593         avahi_simple_poll_free( server->poll );
    594         server->poll = NULL;
    595 #endif
    596543    }
    597544}
Note: See TracChangeset for help on using the changeset viewer.