]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pjsip cli: Change Identify to show CIDR notation instead of netmasks.
authorGeorge Joseph <george.joseph@fairview5.com>
Thu, 19 Jun 2014 20:12:15 +0000 (20:12 +0000)
committerGeorge Joseph <george.joseph@fairview5.com>
Thu, 19 Jun 2014 20:12:15 +0000 (20:12 +0000)
commit43e0a4ddea0db201bddcca2edd9b40f845052934
tree6647dce3c75c813fce43c2e53bd44d401e60181c
parent252187f95586ac7d6dcbe7e2075c54f0eb7b7291
pjsip cli: Change Identify to show CIDR notation instead of netmasks.

* Added ast_sockaddr_cidr_bits() to count the 1 bits in an ast_sockaddr.
* Added ast_ha_join_cidr() which uses ast_sockaddr_cidr_bits() for the netmask
  instead of ast_sockaddr_stringify_addr.
* Changed res_pjsip_endpoint_identifier_ip to call ast_ha_join_cidr() instead
  of ast_ha_join() for the CLI output.

This is a CLI change only.  AMI was not affected.

Tested by: George Joseph
Review: https://reviewboard.asterisk.org/r/3652/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@416737 65c4cc65-6c06-0410-ace0-fbb531ad65f3
include/asterisk/acl.h
include/asterisk/netsock2.h
main/acl.c
main/netsock2.c
res/res_pjsip_endpoint_identifier_ip.c