From d84f619c3a5f8eabab9999f04abbb7f1af8a5d82 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Tue, 16 Nov 2010 15:13:07 +0100 Subject: [PATCH] cc: don't stop completion timer if not running PP: CC-SETUP FP: CC-CONNECT results in: src/timer.c:99: dect_timer_stop: assertion `timer->state == DECT_TIMER_RUNNING' failed. #0 0xb76b1548 in dect_backtrace() from /home/kaber/dect/libdect/src/libdect.so.0 at debug.c:136 #1 0xb76b1614 in __dect_assert_fail() from /home/kaber/dect/libdect/src/libdect.so.0 at debug.c:148 #2 0xb76b0a85 in dect_timer_stop() from /home/kaber/dect/libdect/src/libdect.so.0 at timer.c:102 #3 0xb76a343c in dect_cc_rcv_connect() from /home/kaber/dect/libdect/src/libdect.so.0 at cc.c:1468 #4 0xb76a0162 in dect_ddl_rcv_msg() from /home/kaber/dect/libdect/src/libdect.so.0 at lce.c:746 #5 0xb76a039b in dect_lce_data_link_event() from /home/kaber/dect/libdect/src/libdect.so.0 at lce.c:898 #6 0xb76b04cf in dect_fd_process() from /home/kaber/dect/libdect/src/libdect.so.0 at io.c:132 #7 0xb7690bdf in event_del() from /usr/lib/libev.so.3 at ??:0 #8 0xb7689934 in ev_invoke_pending() from /usr/lib/libev.so.3 at ??:0 #9 0xb768ef34 in ev_loop() from /usr/lib/libev.so.3 at ??:0 #10 0xb7690874 in event_base_loop() from /usr/lib/libev.so.3 at ??:0 #11 0xb7690907 in event_loop() from /usr/lib/libev.so.3 at ??:0 #12 0x080496dd in dect_event_loop() from /proc/self/exe at event_ops.c:112 #13 0x0804b67c in main() from /proc/self/exe at pp-cc.c:88 Signed-off-by: Patrick McHardy --- src/cc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cc.c b/src/cc.c index 351d66e..93e27e5 100644 --- a/src/cc.c +++ b/src/cc.c @@ -1463,7 +1463,8 @@ static void dect_cc_rcv_connect(struct dect_handle *dh, struct dect_call *call, if (dect_timer_running(call->setup_timer)) dect_timer_stop(dh, call->setup_timer); - dect_timer_stop(dh, call->completion_timer); + if (dect_timer_running(call->completion_timer)) + dect_timer_stop(dh, call->completion_timer); if (dh->mode == DECT_MODE_PP) call->state = DECT_CC_ACTIVE;