[asterisk-commits] rizzo: branch rizzo/astobj2 r47900 - /team/rizzo/astobj2/channels/chan_sip.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Tue Nov 21 10:58:28 MST 2006


Author: rizzo
Date: Tue Nov 21 11:58:27 2006
New Revision: 47900

URL: http://svn.digium.com/view/asterisk?view=rev&rev=47900
Log:
Initial attempt at documenting the handling of sip_registry objects
and timeouts.


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=47900&r1=47899&r2=47900
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Tue Nov 21 11:58:27 2006
@@ -1201,7 +1201,17 @@
 
 
 
-/*! \brief Registrations with other SIP proxies */
+/*!
+ * Registrations with other SIP proxies.
+ * Created by sip_registry(), the entry is linked in the 'regl' list,
+ * and never deleted.
+ * The entry always has a pending timeout, either waiting for an ACK to
+ * the REGISTER message (in which case we have to retransmit the request),
+ * or waiting for the next REGISTER message to be sent (either the initial one,
+ * or once the previously completed registration one expires).
+ * The registration can be in one of many states, though at the moment
+ * the handling is a bit mixed.
+ */
 struct sip_registry {
 	ASTOBJ_COMPONENTS_FULL(struct sip_registry,1,1);
 	AST_DECLARE_STRING_FIELDS(
@@ -7336,7 +7346,13 @@
 	}
 }
 
-/*! \brief Update registration with SIP Proxy */
+/*!
+ * Update registration with SIP Proxy.
+ * Called from the scheduler when the previous registration expires,
+ * so we don't have to cancel the pending event.
+ * XXX The handling of sip_registry references is wrong here - the pointer is in
+ * the scheduled event, so grabbing and releasing the reference here is too late.
+ */
 static int sip_reregister(void *data) 
 {
 	/* if we are here, we know that we need to reregister. */



More information about the asterisk-commits mailing list