/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/mandosclient.c

  • Committer: Teddy Hogeborn
  • Date: 2008-07-22 06:23:29 UTC
  • Revision ID: teddy@fukt.bsnet.se-20080722062329-jaex5y5mslf6sqjx
* mandos-clients.conf ([DEFAULT]): New section.

* plugins.d/mandosclient.c (start_mandos_communication): Only print if
                                                         debugging.
                                                         Print server
                                                         name.
                                                         Bug fix: Loop
                                                         until suc-
                                                         cess.

* server.py (serverName): Set via option, not globally.
  (Client.__init__): Removed argument "options".  Require "timeout"
                     and "interval" arguments.
  (tcp_handler.handle): Set "priority" from self.server.options.
  (main): Removed "--timeout" and "--interval" options.  New options
          "--priority" and "--servicename".  Add defaults for
          "timeout" and "interval".  Set "serviceName" from options.
          Do not pass "options" to "Client()".

Show diffs side-by-side

added added

removed removed

Lines of Context:
419
419
  ret = gnutls_handshake (es.session);
420
420
  
421
421
  if (ret != GNUTLS_E_SUCCESS){
422
 
    fprintf(stderr, "\n*** Handshake failed ***\n");
423
 
    gnutls_perror (ret);
 
422
    if(debug){
 
423
      fprintf(stderr, "\n*** Handshake failed ***\n");
 
424
      gnutls_perror (ret);
 
425
    }
424
426
    retval = -1;
425
427
    goto exit;
426
428
  }
551
553
      char ip[AVAHI_ADDRESS_STR_MAX];
552
554
      avahi_address_snprint(ip, sizeof(ip), address);
553
555
      if(debug){
554
 
        fprintf(stderr, "Mandos server found on %s (%s) on port %d\n",
555
 
                host_name, ip, port);
 
556
        fprintf(stderr, "Mandos server \"%s\" found on %s (%s) on"
 
557
                " port %d\n", name, host_name, ip, port);
556
558
      }
557
559
      int ret = start_mandos_communication(ip, port,
558
560
                                           (unsigned int) interface);
559
561
      if (ret == 0){
560
562
        exit(EXIT_SUCCESS);
561
 
      } else {
562
 
        exit(EXIT_FAILURE);
563
563
      }
564
564
    }
565
565
  }