Better service arg parsing
authorGreg Sabino Mullane <greg@endpoint.com>
Sun, 20 Apr 2014 12:23:59 +0000 (08:23 -0400)
committerGreg Sabino Mullane <greg@endpoint.com>
Sun, 20 Apr 2014 12:23:59 +0000 (08:23 -0400)
bucardo

diff --git a/bucardo b/bucardo
index 9f99edfd3341f2682cc132082e5a5f9cc6e74866..bbd3ff6e43f0b5c2b160ea04d9142a2326a9ee8e 100755 (executable)
--- a/bucardo
+++ b/bucardo
@@ -1481,8 +1481,11 @@ sub add_database {
     if (exists $vals->{dbservice}) {
         delete $vals->{dbport};
         delete $vals->{dbhost};
-        if ($cols =~ s/dbhost,dbport,//) {
-            $phs =~ s/\Q?,?,//;
+        if ($cols =~ s/dbport,//) {
+            $phs =~ s/\Q?,//;
+        }
+        if ($cols =~ s/dbhost,//) {
+            $phs =~ s/\Q?,//;
         }
     }