aboutsummaryrefslogtreecommitdiffstats
path: root/channels
diff options
context:
space:
mode:
authorroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-23 18:05:13 +0000
committerroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-05-23 18:05:13 +0000
commite005dbccdff80ceb02ce7cc8576852c80e520e56 (patch)
tree1e2b07a7aa75eadc062fcad4be36f3355b0610d4 /channels
parentcc6e91422e06fcf597f039d73159505355474ac7 (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@29762 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels')
-rw-r--r--channels/chan_sip.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index c2e1026c9..9a3f9983a 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -11309,6 +11309,7 @@ static int sipsock_read(int *id, int fd, short events, void *ignore)
int nounlock;
int recount = 0;
char iabuf[INET_ADDRSTRLEN];
+ int lockretrycount = 0;
len = sizeof(sin);
memset(&req, 0, sizeof(req));
@@ -11363,7 +11364,15 @@ retrylock:
ast_mutex_unlock(&netlock);
/* Sleep infintismly short amount of time */
usleep(1);
- goto retrylock;
+ lockretrycount++;
+ if (lockretrycount < 100)
+ goto retrylock;
+ }
+ if (lockretrycount > 100) {
+ ast_log(LOG_ERROR, "We could NOT get the channel lock for %s! \n", p->owner->name);
+ ast_log(LOG_ERROR, "SIP MESSAGE JUST IGNORED: %s \n", req.data);
+ ast_log(LOG_ERROR, "BAD! BAD! BAD!\n");
+ return 1;
}
memcpy(&p->recv, &sin, sizeof(p->recv));
if (recordhistory) {