]> git.defcon.no Git - hermes/commitdiff
Forgot to die on error in --remove option path
authorJon Langseth <jon.langseth@hig.no>
Mon, 12 Aug 2013 11:42:25 +0000 (13:42 +0200)
committerJon Langseth <jon.langseth@hig.no>
Mon, 12 Aug 2013 11:42:25 +0000 (13:42 +0200)
guc-clients/sipalias

index 7a9716a46edf38454a036f700f65602fcf748197..ae38b6779f82b5f59aa179433d4d346490b4855d 100755 (executable)
@@ -234,6 +234,8 @@ else
        if ( not $aliases[0]->{'alias'} eq $use_alias )
        {
                printf("Not a match on alias: %s != %s\n", $aliases[0]->{'alias'}, $use_alias );
+               logout();
+               exit;
        }
 
        if ( not $aliases[0]->{'destination'} eq $username . "@" . $domain )
@@ -241,6 +243,8 @@ else
                printf("Not a match on destination: %s != %s\n", 
                        $aliases[0]->{'destination'}, $username . "@" . $domain
                );
+               logout();
+               exit;
        }
        undef $data;
        $data = exec_apinode("alias/remove", { 'alias' => $use_alias });