[asterisk-commits] rizzo: branch rizzo/astobj2 r47943 -
/team/rizzo/astobj2/channels/chan_sip.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Nov 22 14:34:57 MST 2006
Author: rizzo
Date: Wed Nov 22 15:34:57 2006
New Revision: 47943
URL: http://svn.digium.com/view/asterisk?view=rev&rev=47943
Log:
normalize __sip_semi_ack in preparation for normaliztion.
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=47943&r1=47942&r2=47943
==============================================================================
--- team/rizzo/astobj2/channels/chan_sip.c (original)
+++ team/rizzo/astobj2/channels/chan_sip.c Wed Nov 22 15:34:57 2006
@@ -2312,15 +2312,19 @@
}
}
-/*! \brief Acks receipt of packet, keep it around (used for provisional responses) */
+/*! \brief Acks receipt of packet, keep it around (used for provisional responses)
+ * this is basically the same as __sip_ack without removing the packet from the list,
+ * so the two should be merged. Btw why this is not locking the channel ?
+ */
static int __sip_semi_ack(struct sip_pvt *p, int seqno, int resp, int sipmethod)
{
struct sip_pkt *cur;
int res = -1;
for (cur = p->packets; cur; cur = cur->next) {
- if (cur->seqno == seqno && ast_test_flag(cur, FLAG_RESPONSE) == resp &&
- (ast_test_flag(cur, FLAG_RESPONSE) || method_match(sipmethod, cur->data))) {
+ if (cur->seqno != seqno || ast_test_flag(cur, FLAG_RESPONSE) != resp)
+ continue;
+ if (ast_test_flag(cur, FLAG_RESPONSE) || cur->method == sipmethod) {
/* this is our baby */
if (cur->retransid > -1) {
if (option_debug > 3 && sipdebug)
More information about the asterisk-commits
mailing list