]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
push-notification: Allow drivers to set only "key" without "=value" to parameters.
authorTimo Sirainen <tss@iki.fi>
Fri, 2 Oct 2015 09:10:41 +0000 (12:10 +0300)
committerTimo Sirainen <tss@iki.fi>
Fri, 2 Oct 2015 09:10:41 +0000 (12:10 +0300)
src/plugins/push-notification/push-notification-drivers.c

index b28125f686092f2ca7839903cff566f34fe4eb30..d1153cef81db35ffc2656a0faa3415f188c6ee7c 100644 (file)
@@ -66,9 +66,12 @@ push_notification_driver_parse_config(const char *p)
         p2 = strchr(*args, '=');
         if (p2 != NULL) {
             key = t_strdup_until(*args, p2);
-            value = t_strdup(p2 + 1);
-            hash_table_insert(config->config, key, value);
-        }
+           value = t_strdup(p2 + 1);
+       } else {
+           key = *args;
+           value = "";
+       }
+       hash_table_insert(config->config, key, value);
     }
 
     return config;