/mandos/trunk

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

« back to all changes in this revision

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

  • Committer: Teddy Hogeborn
  • Date: 2009-02-12 19:08:35 UTC
  • Revision ID: teddy@fukt.bsnet.se-20090212190835-dqv0piw2u254d0jc
* plugin-runner.c: Whitespace changes only.

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, protocol,
858
 
                                    name, type, domain, protocol, 0,
859
 
                                    resolve_callback, NULL) == NULL)
 
857
    if(!(avahi_s_service_resolver_new(mc.server, interface,
 
858
                                       protocol, name, type, domain,
 
859
                                       AVAHI_PROTO_INET6, 0,
 
860
                                       resolve_callback, NULL)))
860
861
      fprintf(stderr, "Avahi: Failed to resolve service '%s': %s\n",
861
862
              name, avahi_strerror(avahi_server_errno(mc.server)));
862
863
    break;
907
908
  const char *seckey = PATHDIR "/" SECKEY;
908
909
  const char *pubkey = PATHDIR "/" PUBKEY;
909
910
  
 
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" };
910
915
  bool gnutls_initialized = false;
911
916
  bool gpgme_initialized = false;
912
917
  float delay = 2.5f;
1252
1257
  
1253
1258
  /* Create the Avahi service browser */
1254
1259
  sb = avahi_s_service_browser_new(mc.server, if_index,
1255
 
                                   AVAHI_PROTO_UNSPEC, "_mandos._tcp",
 
1260
                                   AVAHI_PROTO_INET6, "_mandos._tcp",
1256
1261
                                   NULL, 0, browse_callback, NULL);
1257
1262
  if(sb == NULL){
1258
1263
    fprintf(stderr, "Failed to create service browser: %s\n",