Revert 378248.  I changed the logic of this function unitentionally, pointed out by file.


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@378249 f38db490-d61c-443f-a65b-d21fe96a405b