/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to plugins.d/mandos-client.c

* plugins.d/mandos-client.c (browse_callback, main): Do not require
                                                     IPv6.
  (main): Removed redundant initialization of "mc".

Show diffs side-by-side

added added

removed removed

Lines of Context:
854
854
       the callback function is called the Avahi server will free the
855
855
       resolver for us. */
856
856
    
857
 
    if(!(avahi_s_service_resolver_new(mc.server, interface,
858
 
                                       protocol, name, type, domain,
859
 
                                       AVAHI_PROTO_INET6, 0,
860
 
                                       resolve_callback, NULL)))
 
857
    if(avahi_s_service_resolver_new(mc.server, interface, protocol,
 
858
                                    name, type, domain, protocol, 0,
 
859
                                    resolve_callback, NULL) == NULL)
861
860
      fprintf(stderr, "Avahi: Failed to resolve service '%s': %s\n",
862
861
              name, avahi_strerror(avahi_server_errno(mc.server)));
863
862
    break;
908
907
  const char *seckey = PATHDIR "/" SECKEY;
909
908
  const char *pubkey = PATHDIR "/" PUBKEY;
910
909
  
911
 
  /* Initialize Mandos context */
912
 
  mc = (mandos_context){ .simple_poll = NULL, .server = NULL,
913
 
                         .dh_bits = 1024, .priority = "SECURE256"
914
 
                         ":!CTYPE-X.509:+CTYPE-OPENPGP" };
915
910
  bool gnutls_initialized = false;
916
911
  bool gpgme_initialized = false;
917
912
  float delay = 2.5f;
1257
1252
  
1258
1253
  /* Create the Avahi service browser */
1259
1254
  sb = avahi_s_service_browser_new(mc.server, if_index,
1260
 
                                   AVAHI_PROTO_INET6, "_mandos._tcp",
 
1255
                                   AVAHI_PROTO_UNSPEC, "_mandos._tcp",
1261
1256
                                   NULL, 0, browse_callback, NULL);
1262
1257
  if(sb == NULL){
1263
1258
    fprintf(stderr, "Failed to create service browser: %s\n",