Remove locks taken in the wrong order. Asterissk own code does not lock a channel if accessing fields as readonly (what happend if referenced by fields memory is freed while accessed?)

This commit is contained in:
MelwareDE 2010-11-04 19:57:26 +00:00
parent 487fb33bb9
commit 67b363c1c1
2 changed files with 0 additions and 4 deletions

View File

@ -167,10 +167,8 @@ static int pbx_capi_ami_capichat_list(struct mansession *s, const struct message
char* cidVisual;
char* callerNameVisual;
ast_channel_lock(c);
cidVisual = ast_strdup(pbx_capi_get_cid (c, "<unknown>"));
callerNameVisual = ast_strdup(pbx_capi_get_callername (c, "<no name>"));
ast_channel_unlock(c);
if (isCapiChatMemberListener || isCapiChatRoomMuted || isCapiChatMemberMuted) {
if (isMemberOperator) {

View File

@ -1036,11 +1036,9 @@ int pbxcli_capi_chatinfo(int fd, int argc, char *argv[])
room->number, room->name, room->i->vname,
"?", "?");
} else {
ast_channel_lock(c);
ast_cli(fd, "%3d %-12s%-30s\"%s\" <%s>\n",
room->number, room->name, c->name,
pbx_capi_get_callername (c, ""), pbx_capi_get_cid (c, ""));
ast_channel_unlock(c);
}
room = room->next;
}