[asterisk-commits] tilghman: trunk r106036 - in /trunk: ./ channels/ include/asterisk/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Mar 5 09:23:33 CST 2008
Author: tilghman
Date: Wed Mar 5 09:23:32 2008
New Revision: 106036
URL: http://svn.digium.com/view/asterisk?view=rev&rev=106036
Log:
Merged revisions 106015 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r106015 | tilghman | 2008-03-05 09:17:16 -0600 (Wed, 05 Mar 2008) | 7 lines
Correctly initialize retransid in SIP, and ensure that the warning when failing to delete a schedule entry can actually hit the log.
(closes issue #12140)
Reported by: slavon
Patches:
sch2.patch uploaded by slavon (license 288)
(Patch slightly modified by me)
........
Modified:
trunk/ (props changed)
trunk/channels/chan_sip.c
trunk/include/asterisk/sched.h
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_sip.c?view=diff&rev=106036&r1=106035&r2=106036
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Wed Mar 5 09:23:32 2008
@@ -2824,6 +2824,7 @@
pkt->next = p->packets;
p->packets = pkt; /* Add it to the queue */
pkt->timer_t1 = p->timer_t1; /* Set SIP timer T1 */
+ pkt->retransid = -1;
if (pkt->timer_t1)
siptimer_a = pkt->timer_t1 * 2;
Modified: trunk/include/asterisk/sched.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/sched.h?view=diff&rev=106036&r1=106035&r2=106036
==============================================================================
--- trunk/include/asterisk/sched.h (original)
+++ trunk/include/asterisk/sched.h Wed Mar 5 09:23:32 2008
@@ -38,8 +38,9 @@
#define AST_SCHED_DEL(sched, id) \
do { \
int _count = 0; \
- while (id > -1 && ast_sched_del(sched, id) && _count++ < 10) \
+ while (id > -1 && ast_sched_del(sched, id) && ++_count < 10) { \
usleep(1); \
+ } \
if (_count == 10) \
ast_log(LOG_WARNING, "Unable to cancel schedule ID %d. This is probably a bug (%s: %s, line %d).\n", id, __FILE__, __PRETTY_FUNCTION__, __LINE__); \
id = -1; \
@@ -48,8 +49,9 @@
#define AST_SCHED_REPLACE_VARIABLE(id, sched, when, callback, data, variable) \
do { \
int _count = 0; \
- while (id > -1 && ast_sched_del(sched, id) && _count++ < 10) \
+ while (id > -1 && ast_sched_del(sched, id) && ++_count < 10) { \
usleep(1); \
+ } \
if (_count == 10) \
ast_log(LOG_WARNING, "Unable to cancel schedule ID %d. This is probably a bug (%s: %s, line %d).\n", id, __FILE__, __PRETTY_FUNCTION__, __LINE__); \
id = ast_sched_add_variable(sched, when, callback, data, variable); \
More information about the asterisk-commits
mailing list