]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
doveadm director map: Print also records for unknown users.
authorTimo Sirainen <tss@iki.fi>
Tue, 20 Jul 2010 20:42:36 +0000 (21:42 +0100)
committerTimo Sirainen <tss@iki.fi>
Tue, 20 Jul 2010 20:42:36 +0000 (21:42 +0100)
src/doveadm/doveadm-director.c

index 38ca96f242219184e2ea41362215d32943c1804a..074b341c8561b4a6e58fc51f5235a4f58afee35c 100644 (file)
@@ -264,7 +264,7 @@ static bool ip_find(const struct ip_addr *ips, unsigned int ips_count,
 static void cmd_director_map(int argc, char *argv[])
 {
        struct director_context *ctx;
-       const char *line, *const *args, *username;
+       const char *line, *const *args;
        struct ip_addr *ips, user_ip;
        pool_t pool;
        struct hash_table *users;
@@ -311,8 +311,11 @@ static void cmd_director_map(int argc, char *argv[])
                                 ip_find(ips, ips_count, &user_ip)) {
                                user = hash_table_lookup(users,
                                                POINTER_CAST(user_hash));
-                               if (user == NULL)
-                                       username = "<unknown>";
+                               if (user == NULL) {
+                                       doveadm_print("<unknown>");
+                                       doveadm_print(args[2]);
+                                       doveadm_print(unixdate2str(expires));
+                               }
                                for (; user != NULL; user = user->next) {
                                        doveadm_print(user->name);
                                        doveadm_print(args[2]);