aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-16 02:30:13 +0000
committerfile <file@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-16 02:30:13 +0000
commit8fe941bc2aa0d29befb81e7d15ad75b8dc429cbf (patch)
tree5d9709fefabedfd259d620495be3e06ad34c9750 /channels
parent95af8fe8af74e9d98589457f7aa73be2ac91ee61 (diff)
Remove DNS lookup from sip_devicestate. This seems to come from way back when and I can't think of a reason for it being here, plus it could cause needless DNS lookups.
(closes issue #10983) Reported by: jtodd git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98954 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index f9b64a02c..cb76b2212 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -17283,9 +17283,6 @@ static int sip_devicestate(void *data)
{
char *host;
char *tmp;
-
- struct hostent *hp;
- struct ast_hostent ahp;
struct sip_peer *p;
int res = AST_DEVICE_INVALID;
@@ -17338,12 +17335,7 @@ static int sip_devicestate(void *data)
}
unref_peer(p);
} else {
- char *port = strchr(host, ':');
- if (port)
- *port = '\0';
- hp = ast_gethostbyname(host, &ahp);
- if (hp)
- res = AST_DEVICE_UNKNOWN;
+ res = AST_DEVICE_UNKNOWN;
}
return res;