Some trivial fixes.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 30 Aug 2007 13:23:03 +0000 (15:23 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 30 Aug 2007 13:23:03 +0000 (15:23 +0200)
NEWS
mods/socks.c
src/admin.c

diff --git a/NEWS b/NEWS
index f6d80dd7527e8bf1f55b787102b9654c4d183069..5a471744d4c53bb959745dd9e820d5a77d9a58ed 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,12 @@
  Otherwise indicated differently, all changes made by 
        Jelmer Vernooij.
 
+Ctrlproxy 3.0.4 UNRELEASED
+
+  BUG FIXES
+
+    * Check for empty argument to /CTRLPROXY BACKLOG (#132)
+
 Ctrlproxy 3.0.3 2007-07-22
 
   BUG FIXES
index 5c0aabe8fccdbdfe6fc099cd60fe72ca1f925f50..750931b0f13da6b9764b5bc5381477d1a0d72b9b 100644 (file)
@@ -178,7 +178,7 @@ static gboolean pass_handle_data(struct socks_client *cl)
        {
                struct allow_rule *r = gl->data;
 
-               if (!r->password || !r->username
+               if (r->password == NULL || r->username == NULL
                        continue;
 
                if (strcmp(r->username, uname)) 
@@ -186,6 +186,7 @@ static gboolean pass_handle_data(struct socks_client *cl)
 
                if (strcmp(r->password, pass))
                        continue;
+
                break;
        }
 
index 8b46b55f6975ec1dcd1f81cd1a63317e0fb4c4e9..52bad88e200272650f666a8871f7dc6f36b2ad6a 100644 (file)
@@ -368,7 +368,7 @@ static void repl_command(admin_handle h, char **args, void *userdata)
                return;
        }
 
-       if(!args[1]) {
+       if (!args[1] || strlen(args[1]) == 0) {
                admin_out(h, "Sending backlog for network '%s'", n->info.name);
 
                linestack_send(n->linestack, lm, NULL, admin_get_client(h),