aboutsummaryrefslogtreecommitdiffstats
path: root/srv.c
diff options
context:
space:
mode:
Diffstat (limited to 'srv.c')
-rwxr-xr-xsrv.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/srv.c b/srv.c
index 25011ad52..9a4b7a736 100755
--- a/srv.c
+++ b/srv.c
@@ -113,9 +113,10 @@ int ast_get_srv(struct ast_channel *chan, char *host, int hostlen, int *port, co
if (chan)
ret |= ast_autoservice_stop(chan);
- if (ret <= 0)
+ if (ret <= 0) {
+ strcpy(host, "");
+ *port = -1;
return ret;
- strcpy(host, "");
- *port = -1;
+ }
return ret;
}