remove unneeded var (issue #6466)
authorRussell Bryant <russell@russellbryant.com>
Mon, 13 Feb 2006 17:43:38 +0000 (17:43 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 13 Feb 2006 17:43:38 +0000 (17:43 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9757 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index d890878..2efb779 100644 (file)
@@ -9343,7 +9343,7 @@ static struct ast_custom_function checksipdomain_function = {
 int function_sippeer(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
 {
        struct sip_peer *peer;
 int function_sippeer(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
 {
        struct sip_peer *peer;
-       char *peername = data, *colname;
+       char *colname;
        char iabuf[INET_ADDRSTRLEN];
 
        if ((colname = strchr(data, ':')))
        char iabuf[INET_ADDRSTRLEN];
 
        if ((colname = strchr(data, ':')))
@@ -9351,7 +9351,7 @@ int function_sippeer(struct ast_channel *chan, char *cmd, char *data, char *buf,
        else
                colname = "ip";
 
        else
                colname = "ip";
 
-       if (!(peer = find_peer(peername, NULL, 1)))
+       if (!(peer = find_peer(data, NULL, 1)))
                return -1;
 
        if (!strcasecmp(colname, "ip")) {
                return -1;
 
        if (!strcasecmp(colname, "ip")) {