[Asterisk-Dev] RE:"Failed to create update thread"
tiszaii at t-online.hu
tiszaii at t-online.hu
Thu Jan 12 04:18:44 MST 2006
Hi,
My bug:
http://bugs.digium.com/view.php?id=6153
I should like to ask you, if modified the part of
app_queue.c (removing the ast_mutex_lock(&q->lock) and
ast_mutex_unlock(&q->lock)) it is good "brainstorm"?:
static void *changethread(void *data)
{
struct ast_call_queue *q;
struct statechange *sc = data;
struct member *cur;
char *loc;
char *technology;
technology = ast_strdupa(sc->dev);
loc = strchr(technology, '/');
if (loc) {
*loc = '\0';
loc++;
} else {
free(sc);
return NULL;
}
if (option_debug)
ast_log(LOG_DEBUG, "Device '%s/%s' changed to state
'%d' (%s)\n", technology, loc, sc->state,
devstate2str(sc->state));
ast_mutex_lock(&qlock);
for (q = queues; q; q = q->next) {
// REMOVING ( OR COMMENT) LINE !!!! ast_mutex_lock(&q->lock);
cur = q->members;
while(cur) {
if (!strcasecmp(sc->dev, cur->interface)) {
if (cur->status != sc->state) {
cur->status = sc->state;
if (!q->maskmemberstatus) {
manager_event(EVENT_FLAG_AGENT,
"QueueMemberStatus",
"Queue: %s\r\n"
"Location: %s\r\n"
"Membership: %s\r\n"
"Penalty: %d\r\n"
"CallsTaken: %d\r\n"
"LastCall: %d\r\n"
"Status: %d\r\n"
"Paused: %d\r\n",
q->name, cur->interface,
cur->dynamic ? "dynamic" : "static",
cur->penalty, cur->calls,
(int)cur->lastcall, cur->status, cur->paused);
}
}
}
cur = cur->next;
}
// REMOVING (OR COMMENT) LINE !!!! ast_mutex_unlock(&q->lock);
}
ast_mutex_unlock(&qlock);
free(sc);
return NULL;
}
best regards
TI
More information about the asterisk-dev
mailing list