/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

* mandos-monitor: Speedup: Use properties from D-Bus
                  GetAllClientsWithProperties() call.  Also use
                  super() properly - only use keyword arguments and
                  strip them off as "kwargs" is passed on.
  (MandosClientPropertyCache.__init__): Take new "properties"
                                        argument; use it to skip
                                        calling D-Bus GetAll() method.
                                        Call super().  Bind self._
  (MandosClientPropertyCache._property_changed): New helper function.
  (MandosClientPropertyCache.property_changed): Changed to take
                                                keyword arguments.
  (MandosClientPropertyCache.delete): Bug fix: Don't call
                                      super().__init__().
  (MandosClientWidget.__init__): Don't take *args.  Strip used keyword
                                 arguments before calling super().
  (MandosClientWidget.property_changed): Removed dead code.
  (MandosClientWidget.delete): Don't take *args.
  (MandosClientWidget.property_changed): Don't take "value" argument,
                                         since it is not used.
  (ConstrainedListBox.keypress): Take *args, **kwargs and pass them on
                                 to super().

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
 * "browse_callback", and parts of "main".
10
10
 * 
11
11
 * Everything else is
12
 
 * Copyright © 2008-2011 Teddy Hogeborn
13
 
 * Copyright © 2008-2011 Björn Påhlsson
 
12
 * Copyright © 2008-2012 Teddy Hogeborn
 
13
 * Copyright © 2008-2012 Björn Påhlsson
14
14
 * 
15
15
 * This program is free software: you can redistribute it and/or
16
16
 * modify it under the terms of the GNU General Public License as
1450
1450
          perror_plus("setenv");
1451
1451
          _exit(EX_OSERR);
1452
1452
        }
1453
 
        ret = setenv("VERBOSE", debug ? "1" : "0", 1);
 
1453
        ret = setenv("VERBOSITY", debug ? "1" : "0", 1);
1454
1454
        if(ret == -1){
1455
1455
          perror_plus("setenv");
1456
1456
          _exit(EX_OSERR);
1473
1473
          _exit(EX_OSERR);
1474
1474
        }
1475
1475
        free(delaystring);
 
1476
        if(connect_to != NULL){
 
1477
          ret = setenv("CONNECT", connect_to, 1);
 
1478
          if(ret == -1){
 
1479
            perror_plus("setenv");
 
1480
            _exit(EX_OSERR);
 
1481
          }
 
1482
        }
1476
1483
        if(execl(fullname, direntry->d_name, mode, NULL) == -1){
1477
1484
          perror_plus("execl");
1478
1485
          _exit(EXIT_FAILURE);
1601
1608
        .group = 2 },
1602
1609
      { .name = "retry", .key = 132,
1603
1610
        .arg = "SECONDS",
1604
 
        .doc = "Retry interval used when denied by the mandos server",
 
1611
        .doc = "Retry interval used when denied by the Mandos server",
1605
1612
        .group = 2 },
1606
1613
      { .name = "network-hook-dir", .key = 133,
1607
1614
        .arg = "DIR",