diff options
-rwxr-xr-x | web/nms.gathering.org/api/private/switch-add | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/web/nms.gathering.org/api/private/switch-add b/web/nms.gathering.org/api/private/switch-add index e177b5e..92479f0 100755 --- a/web/nms.gathering.org/api/private/switch-add +++ b/web/nms.gathering.org/api/private/switch-add @@ -82,7 +82,12 @@ foreach my $tmp2 (@tmp) { push @added, $switch{'sysname'}; } else { if (defined($switch{'placement'})) { - my %placement = %{convertplace($switch{'placement'})}; + my %placement; + if ($switch{'placement'} eq "reset") { + %placement = guess_placement($switch{'sysname'}); + } else { + %placement = %{convertplace($switch{'placement'})}; + } my ($x1,$x2,$y1,$y2); $x1 = $placement{'x1'}; $y1 = $placement{'y1'}; |