[asterisk-commits] dsessions: trunk r372290 - in /trunk: channels/ configs/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Sep 5 09:12:17 CDT 2012
Author: dsessions
Date: Wed Sep 5 09:12:11 2012
New Revision: 372290
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=372290
Log:
(closes issue ASTERISK-17222)
Reported by: John Covert
Patch by: David Vossel
Tested by: Darren Sessions
LDAP Realtime Peers Cannot Register
Prior to 1.8, it was not necessary for an explicit "type" to be set for an
asterisk LDAP realtime peer. Now the routine find_peer actually checks the
type field during registration and fails to find the peer if it is not set.
The attached patch makes the realtime type equal whatever type is being
searched for if the type is 0 upon return from routine build_peer.
Review: https://reviewboard.asterisk.org/r/2095/
Modified:
trunk/channels/chan_sip.c
trunk/configs/res_ldap.conf.sample
Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=372290&r1=372289&r2=372290
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Sep 5 09:12:11 2012
@@ -5263,6 +5263,18 @@
goto cleanup;
}
+ /* Previous versions of Asterisk did not require the type field to be
+ * set for real time peers. This statement preserves that behavior. */
+ if (peer->type == 0) {
+ if (which_objects == FINDUSERS) {
+ peer->type = SIP_TYPE_USER;
+ } else if (which_objects == FINDPEERS) {
+ peer->type = SIP_TYPE_PEER;
+ } else {
+ peer->type = SIP_TYPE_PEER | SIP_TYPE_USER;
+ }
+ }
+
ast_debug(3, "-REALTIME- loading peer from database to memory. Name: %s. Peer objects: %d\n", peer->name, rpeerobjs);
if (ast_test_flag(&global_flags[1], SIP_PAGE2_RTCACHEFRIENDS) && !devstate_only) {
Modified: trunk/configs/res_ldap.conf.sample
URL: http://svnview.digium.com/svn/asterisk/trunk/configs/res_ldap.conf.sample?view=diff&rev=372290&r1=372289&r2=372290
==============================================================================
--- trunk/configs/res_ldap.conf.sample (original)
+++ trunk/configs/res_ldap.conf.sample Wed Sep 5 09:12:11 2012
@@ -13,6 +13,8 @@
;
; In the case of LDAP the last keyword in each line above specifies
; a section in this file.
+;
+; LDAP schema and ldif files can be located in contrib/scripts.
; TLS support
; -----------
More information about the asterisk-commits
mailing list