Fix crash in AMI PJSIPShowEndpoint action.
authorMark Michelson <mmichelson@digium.com>
Thu, 13 Feb 2014 15:57:21 +0000 (15:57 +0000)
committerMark Michelson <mmichelson@digium.com>
Thu, 13 Feb 2014 15:57:21 +0000 (15:57 +0000)
commitdb0d0363af93968ce4c80195572cddda053dfbd1
tree90d0b3797b4cd60a6210ac3369f3a098e629214a
parentfe1e8e55a1f185bc159d4192f430d7da60e2365a
Fix crash in AMI PJSIPShowEndpoint action.

If an AOR has no permanent contacts, then the
permanent_contacts container is never allocated.
This makes the code safe in the face of NULLs.

I also changed the variable that counts contacts
from "num" to "total_contacts" since there are now
two variables that are indicate numbers of things.
........

Merged revisions 407988 from http://svn.asterisk.org/svn/asterisk/branches/12

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@407990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_pjsip/location.c