~ubuntu-branches/ubuntu/quantal/dovecot/quantal

« back to all changes in this revision

Viewing changes to sieve/src/testsuite/testsuite-settings.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short, Scott Kitterman
  • Date: 2010-06-22 10:33:51 UTC
  • mfrom: (1.13.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100622103351-ifbmnklp8kxrhb30
Tags: 1:1.2.12-0ubuntu1
* New upstream release:
  - deliver: Don't crash when a message with Auto-submitted: header gets
   rejected.
  - lib-storage: Fixed header searches to work correctly when there are
    multiple headers with same name.
  - dict client: Disconnect from dict server after 1 second of idling.
  - dict: If process crashed, it wasn't automatically restarted
  - dict file: If dict file's group permissions equal world permissions,
    don't try to change its gid.
  - maildir: Fixed a memory leak when copying with hardlinks.
  - maildir: Expunging last messages may have assert-crashed if their
    filenames had just changed.
 * Update sieve patch to 0.1.17
 * debian/dovecot-common.postinst: Add warning about expired certificate.
   (Debian Bug: #576455)
 * Silence lintian warnings.

 [Scott Kitterman]
 * Rename dovecot-postfix to mail-stack-delivery per server-maverick-mail-
   integration spec.
   - Update debian/rules
   - Convert existing package to a dummy package and add new binary in debian/control
   - Update maintainer scripts.
   - Move previously installed backups and config files to new package name
     space in preinst
   - Add new debian/mail-stack-delivery.prerm to handle downgrades
   - Rename debian/dovecot-postfix.* to debian/mail-stack-delivery.*

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
        char *value;
17
17
};
18
18
 
19
 
static struct hash_table *settings;
 
19
static struct hash_table *settings; 
20
20
 
21
21
void testsuite_settings_init(void)
22
22
{
26
26
 
27
27
void testsuite_settings_deinit(void)
28
28
{
29
 
        struct hash_iterate_context *itx =
 
29
        struct hash_iterate_context *itx = 
30
30
                hash_table_iterate_init(settings);
31
 
        void *key;
 
31
        void *key; 
32
32
        void *value;
33
 
 
 
33
        
34
34
        while ( hash_table_iterate(itx, &key, &value) ) {
35
35
                struct testsuite_setting *setting = (struct testsuite_setting *) value;
36
36
 
39
39
                i_free(setting);
40
40
        }
41
41
 
42
 
        hash_table_iterate_deinit(&itx);
 
42
        hash_table_iterate_deinit(&itx);        
43
43
 
44
44
        hash_table_destroy(&settings);
45
45
}
47
47
const char *testsuite_setting_get
48
48
(void *context ATTR_UNUSED, const char *identifier)
49
49
{
50
 
        struct testsuite_setting *setting = (struct testsuite_setting *)
 
50
        struct testsuite_setting *setting = (struct testsuite_setting *) 
51
51
                hash_table_lookup(settings, identifier);
52
52
 
53
53
        if ( setting == NULL ) {
59
59
 
60
60
void testsuite_setting_set(const char *identifier, const char *value)
61
61
{
62
 
        struct testsuite_setting *setting = (struct testsuite_setting *)
 
62
        struct testsuite_setting *setting = (struct testsuite_setting *) 
63
63
                hash_table_lookup(settings, identifier);
64
64
 
65
65
        if ( setting != NULL ) {
69
69
                setting = i_new(struct testsuite_setting, 1);
70
70
                setting->identifier = i_strdup(identifier);
71
71
                setting->value = i_strdup(value);
72
 
 
 
72
        
73
73
                hash_table_insert(settings, (void *) identifier, (void *) setting);
74
74
        }
75
75
}
76
76
 
77
77
void testsuite_setting_unset(const char *identifier)
78
78
{
79
 
        struct testsuite_setting *setting = (struct testsuite_setting *)
 
79
        struct testsuite_setting *setting = (struct testsuite_setting *) 
80
80
                hash_table_lookup(settings, identifier);
81
81
 
82
82
        if ( setting != NULL ) {