Hi,
I'll (like in the last years) participate in the annual congress of the
CCC in Berlin next week - the 26c3. More informations can be found on
their site:
http://events.ccc.de/congress/2009/wiki/Welcome
So if you are in Berlin as well in this week (not necessarly on this
event) and are interested in meeting for some discussions, please drop me
a mail.
Best regards,
Henning
Module: sip-router
Branch: kamailio_3.0
Commit: e024da1fb6cd4b74d68760070f9e159356d93b0e
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e024da1…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Dec 23 22:34:28 2009 +0100
tm: further fixes for t_drop_replies()
- use a dedicated variable replies_dropped to signal that replies were
dropped instead of using drop_replies marker
---
modules/tm/t_reply.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index b1b4af9..c37db65 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -612,7 +612,7 @@ static int _reply_light( struct cell *trans, char* buf, unsigned int len,
}
#endif /* TMCB_ONSEND */
}
- DBG("DEBUG: reply sent out. buf=%p: %.9s..., shmem=%p: %.9s\n",
+ DBG("DEBUG: reply sent out. buf=%p: %.20s..., shmem=%p: %.20s\n",
buf, buf, rb->buffer, rb->buffer );
}
if (code>=200) {
@@ -1041,6 +1041,7 @@ static enum rps t_should_relay_response( struct cell *Trans , int new_code,
int inv_through;
int extra_flags;
int i;
+ int replies_dropped;
/* note: this code never lets replies to CANCEL go through;
we generate always a local 200 for CANCEL; 200s are
@@ -1131,6 +1132,7 @@ static enum rps t_should_relay_response( struct cell *Trans , int new_code,
drop_replies = 3;
else
drop_replies = 0;
+ replies_dropped = 0;
/* run ON_FAILURE handlers ( route and callbacks) */
if (unlikely(has_tran_tmcbs( Trans, TMCB_ON_FAILURE_RO|TMCB_ON_FAILURE)
|| Trans->on_negative )) {
@@ -1165,6 +1167,7 @@ static enum rps t_should_relay_response( struct cell *Trans , int new_code,
/* make sure that the selected reply is not relayed even if
there is not any new branch added -- should not happen */
picked_branch = -1;
+ replies_dropped = 1;
}
}
@@ -1193,7 +1196,7 @@ static enum rps t_should_relay_response( struct cell *Trans , int new_code,
if (branch_cnt<Trans->nr_of_outgoings){
/* the new branches might be already "finished" => we
* must use t_pick_branch again */
- new_branch=t_pick_branch((drop_replies==0)?
+ new_branch=t_pick_branch((replies_dropped==0)?
branch :
-1, /* make sure we do not pick
the current branch */
@@ -1202,7 +1205,7 @@ static enum rps t_should_relay_response( struct cell *Trans , int new_code,
&picked_code);
if (new_branch<0){
- if (likely(drop_replies==0)) {
+ if (likely(replies_dropped==0)) {
if (new_branch==-2) { /* branches open yet */
*should_store=1;
*should_relay=-1;
@@ -1228,7 +1231,7 @@ static enum rps t_should_relay_response( struct cell *Trans , int new_code,
/* found a new_branch */
picked_branch=new_branch;
}
- } else if (unlikely(drop_replies)) {
+ } else if (unlikely(replies_dropped)) {
/* Either the script writer did not add new branches
after calling t_drop_replies(), or tm was unable
to add the new branches to the transaction. */
Module: sip-router
Branch: kamailio_3.0
Commit: 6c3356b6605f4e85f0692c6194ad8a5f5ef06fa9
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=6c3356b…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Wed Dec 23 20:44:31 2009 +0100
tm: safer handling for local transactions and drop_replies!=0
- if all the replies are dropped in the failure route and the
transaction is local, return the current reply. This makes the
code more future safe (currently there is no way for the failure
route to be executed and hence for replies to be dropped for
local transactions).
- check for FAKED_REPLY in local_reply() error path.
(cherry picked from commit 0fe25e507eccac409f5094cff4240ee5d3224666)
---
modules/tm/t_reply.c | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index 4f25059..b1b4af9 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -1274,16 +1274,19 @@ discard:
branches_failed:
*should_store=0;
- *should_relay=-1;
- /* We have hopefully set tm_error in failure_route when
- the branches failed. If not, reply with E_UNSPEC */
- if ((kill_transaction_unsafe(Trans,
- tm_error ? tm_error : E_UNSPEC)
- ) <=0 ){
- LOG(L_ERR, "ERROR: t_should_relay_response: "
- "reply generation failed\n");
+ if (is_local(Trans)){
+ /* for local transactions use the current reply */
+ *should_relay=branch;
+ }else{
+ *should_relay=-1;
+ /* We have hopefully set tm_error in failure_route when
+ the branches failed. If not, reply with E_UNSPEC */
+ if ((kill_transaction_unsafe(Trans,
+ tm_error ? tm_error : E_UNSPEC)) <=0 ){
+ LOG(L_ERR, "ERROR: t_should_relay_response: "
+ "reply generation failed\n");
+ }
}
-
return RPS_COMPLETED;
}
@@ -1828,7 +1831,7 @@ error:
prepare_to_cancel(t, cancel_bitmap, 0);
UNLOCK_REPLIES(t);
cleanup_uac_timers(t);
- if ( get_cseq(p_msg)->method.len==INVITE_LEN
+ if (p_msg && p_msg!=FAKED_REPLY && get_cseq(p_msg)->method.len==INVITE_LEN
&& memcmp( get_cseq(p_msg)->method.s, INVITE, INVITE_LEN)==0)
cancel_uacs( t, *cancel_bitmap, F_CANCEL_B_KILL);
*cancel_bitmap=0; /* we've already took care of everything */
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task is now closed:
FS#16 - Local 487 forwarded upstream
User who did this - Andrei Pelinescu-Onciul (andrei)
Reason for closing: Not a bug
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=16
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has been changed. The changes are listed below. For full information about what has changed, visit the URL and click the History tab.
FS#21 - Crash at t_reply.c:668
User who did this: Andrei Pelinescu-Onciul (andrei)
Percent Complete: 0% -> 90%
Status: Assigned -> Requires testing
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=21
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Hi!
I use kamailio-rc3.
After lookup(), sometimes DURI of a branch is populated although
"received" column is null for this contact. Sometimes, DURI is correct
and <null>.
Looks like it contains some old value. Any hints how to debug problem?
regards
klaus
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#21 - Crash at t_reply.c:668
User who did this - Andrei Pelinescu-Onciul (andrei)
----------
It looks there is a local transaction (probably created by one of the modules you use?).
There was a related problem with drop_replies in the kamailio_3.0 branch fixed
earlier today in a883a0b2501ba2b25ca87994d4c211f75a556ebe. This commit should also fix your crash.
The crash happens in the error path for failed branches, when it is executed for a local transaction. The commit above fixed a bug that wrongly triggered the error path.
I've made another fix in the sr_3.0 branch, that should avoid the problem even if the error path would be called sometime in the future (right now it should not be possible to trigger it for local replies).
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=21#comment14
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Module: sip-router
Branch: sr_3.0
Commit: 0fe25e507eccac409f5094cff4240ee5d3224666
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0fe25e5…
Author: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei(a)iptel.org>
Date: Wed Dec 23 20:44:31 2009 +0100
tm: safer handling for local transactions and drop_replies!=0
- if all the replies are dropped in the failure route and the
transaction is local, return the current reply. This makes the
code more future safe (currently there is no way for the failure
route to be executed and hence for replies to be dropped for
local transactions).
- check for FAKED_REPLY in local_reply() error path.
---
modules/tm/t_reply.c | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/modules/tm/t_reply.c b/modules/tm/t_reply.c
index 8dbd1d6..12af017 100644
--- a/modules/tm/t_reply.c
+++ b/modules/tm/t_reply.c
@@ -1248,16 +1248,19 @@ discard:
branches_failed:
*should_store=0;
- *should_relay=-1;
- /* We have hopefully set tm_error in failure_route when
- the branches failed. If not, reply with E_UNSPEC */
- if ((kill_transaction_unsafe(Trans,
- tm_error ? tm_error : E_UNSPEC)
- ) <=0 ){
- LOG(L_ERR, "ERROR: t_should_relay_response: "
- "reply generation failed\n");
+ if (is_local(Trans)){
+ /* for local transactions use the current reply */
+ *should_relay=branch;
+ }else{
+ *should_relay=-1;
+ /* We have hopefully set tm_error in failure_route when
+ the branches failed. If not, reply with E_UNSPEC */
+ if ((kill_transaction_unsafe(Trans,
+ tm_error ? tm_error : E_UNSPEC)) <=0 ){
+ LOG(L_ERR, "ERROR: t_should_relay_response: "
+ "reply generation failed\n");
+ }
}
-
return RPS_COMPLETED;
}
@@ -1802,7 +1805,7 @@ error:
prepare_to_cancel(t, cancel_bitmap, 0);
UNLOCK_REPLIES(t);
cleanup_uac_timers(t);
- if ( get_cseq(p_msg)->method.len==INVITE_LEN
+ if (p_msg && p_msg!=FAKED_REPLY && get_cseq(p_msg)->method.len==INVITE_LEN
&& memcmp( get_cseq(p_msg)->method.s, INVITE, INVITE_LEN)==0)
cancel_uacs( t, *cancel_bitmap, F_CANCEL_B_KILL);
*cancel_bitmap=0; /* we've already took care of everything */
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
Daniel-Constantin Mierla has taken ownership of the following task:
FS#22 - $shv problems
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=22
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#22 - $shv problems
User who did this - Daniel-Constantin Mierla (miconda)
----------
Indeed it is a problem with $sht(). I found where, looking for a solution now. Thanks!
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=22#comment13
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.