Always treat arguments to get_by_name_cb as strings
authorTerry Wilson <twilson@digium.com>
Wed, 11 Jan 2012 19:19:35 +0000 (19:19 +0000)
committerTerry Wilson <twilson@digium.com>
Wed, 11 Jan 2012 19:19:35 +0000 (19:19 +0000)
commit9748f19e969b33387836d5a6958c2e3211057732
treea1334fc387d748ce8d2d7e3b559c542f9f706472
parent47a55ad6522c5ed023b357519ea9d27a0421912e
Always treat arguments to get_by_name_cb as strings

Initially, support was left in for the old style of searching, even
though it wasn't actually used. In the case of name_len != 0, the
OBJ_KEY flag isn't passed because we aren't matching on a full key
and therefor can't use the hash function to optimize. The code left
in to support the old way of searching unfortunately treated a prefix
search like this as though an ast_channel struct was passed as an arg
and caused a crash.

This patch also adds needed parentheses around some matching conditions.

(closes issue ASTERISK-19182)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
main/channel.c