|
|
@ -12098,7 +12098,7 @@ static int sipsock_read(int *id, int fd, short events, void *ignore)
|
|
|
|
int nounlock;
|
|
|
|
int nounlock;
|
|
|
|
int recount = 0;
|
|
|
|
int recount = 0;
|
|
|
|
char iabuf[INET_ADDRSTRLEN];
|
|
|
|
char iabuf[INET_ADDRSTRLEN];
|
|
|
|
int lockretrycount = 0;
|
|
|
|
unsigned int lockretry = 100;
|
|
|
|
|
|
|
|
|
|
|
|
len = sizeof(sin);
|
|
|
|
len = sizeof(sin);
|
|
|
|
memset(&req, 0, sizeof(req));
|
|
|
|
memset(&req, 0, sizeof(req));
|
|
|
@ -12155,13 +12155,12 @@ retrylock:
|
|
|
|
ast_log(LOG_DEBUG, "Failed to grab lock, trying again...\n");
|
|
|
|
ast_log(LOG_DEBUG, "Failed to grab lock, trying again...\n");
|
|
|
|
ast_mutex_unlock(&p->lock);
|
|
|
|
ast_mutex_unlock(&p->lock);
|
|
|
|
ast_mutex_unlock(&netlock);
|
|
|
|
ast_mutex_unlock(&netlock);
|
|
|
|
/* Sleep infintismly short amount of time */
|
|
|
|
/* Sleep for a very short amount of time */
|
|
|
|
usleep(1);
|
|
|
|
usleep(1);
|
|
|
|
lockretrycount++;
|
|
|
|
if (--lockretry)
|
|
|
|
if (lockretrycount < 100)
|
|
|
|
|
|
|
|
goto retrylock;
|
|
|
|
goto retrylock;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (lockretrycount > 100) {
|
|
|
|
if (!lockretry) {
|
|
|
|
ast_log(LOG_ERROR, "We could NOT get the channel lock for %s! \n", p->owner->name);
|
|
|
|
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, "SIP MESSAGE JUST IGNORED: %s \n", req.data);
|
|
|
|
ast_log(LOG_ERROR, "BAD! BAD! BAD!\n");
|
|
|
|
ast_log(LOG_ERROR, "BAD! BAD! BAD!\n");
|
|
|
|