r1377 + queryGateway(): don't fail on common name containing space
authorDenis Ovsienko <infrastation@yandex.ru>
Fri, 7 Dec 2007 15:09:45 +0000 (15:09 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Fri, 7 Dec 2007 15:09:45 +0000 (15:09 +0000)
inc/gateways.php

index 95b57042e8699648ef21ab21758a6ef42462f061..40a269dfe1a6e92d3dabafd970ff77ede037dec1 100644 (file)
@@ -93,9 +93,10 @@ function getSwitchVLANs ($object_id = 0)
                if ($record['name'] == 'HW type' && !empty ($record['value']))
                        $hwtype = str_replace (' ', '+', $record['value']);
        }
+       $endpoint = str_replace (' ', '+', $endpoints[0]);
        $commands = array
        (
-               "connect ${endpoints[0]} $hwtype $swtype ${remote_username}",
+               "connect ${endpoint} ${hwtype} ${swtype} ${remote_username}",
                'listvlans',
                'listports',
                'listmacs'