[svn-commits] rizzo: branch rizzo/astobj2 r47875 - /team/rizzo/astobj2/channels/chan_sip.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Tue Nov 21 03:02:04 MST 2006


Author: rizzo
Date: Tue Nov 21 04:02:04 2006
New Revision: 47875

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47875
Log:
more comments on the assumptions we can make on the code.


Modified:
    team/rizzo/astobj2/channels/chan_sip.c

Modified: team/rizzo/astobj2/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/rizzo/astobj2/channels/chan_sip.c?view=diff&rev=47875&r1=47874&r2=47875
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Tue Nov 21 04:02:04 2006
@@ -8712,6 +8712,9 @@
 
 /*! \brief Find out who the call is for 
 	We use the INVITE uri to find out
+	\return 0 on success (found a matching extension),
+	1 for pickup extension or overlap dialling support (if we support it),
+	-1 on error.
 */
 static int get_destination(struct sip_pvt *p, struct sip_request *oreq)
 {
@@ -14618,7 +14621,7 @@
 	/* Handle authentication */
 	res = check_user_full(p, req, SIP_SUBSCRIBE, e, 0, sin, &authpeer);
 	/* if an authentication response was sent, we are done here */
-	if (res == AUTH_CHALLENGE_SENT)
+	if (res == AUTH_CHALLENGE_SENT)	/* authpeer = NULL here */
 		return 0;
 	if (res < 0) {
 		if (res == AUTH_FAKE_AUTH) {
@@ -14632,7 +14635,9 @@
 		return 0;
 	}
 
-	/* At this point, authpeer cannot be NULL. */
+	/* At this point, authpeer cannot be NULL. Remember we hold a reference,
+	 * so we must release it when done.
+	 */
 
 	/* Check if this user/peer is allowed to subscribe at all */
 	if (!ast_test_flag(&p->flags[1], SIP_PAGE2_ALLOWSUBSCRIBE)) {



More information about the svn-commits mailing list