THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task is now closed:
FS#116 - invalid via branch param value
User who did this - Juha Heinanen (jh)
Reason for closing: Fixed
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=116
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.
Juha Heinanen has taken ownership of the following task:
FS#116 - invalid via branch param value
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=116
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: master
Commit: 508ad1c0011352e6d24234dbef70a3f6abbdc276
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=508ad1c…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sat May 21 12:33:00 2011 +0200
core: added some binary operators
- not, xor, left shift and right shift
---
cfg.lex | 8 ++++++++
cfg.y | 9 ++++++++-
rvalue.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
rvalue.h | 4 ++++
4 files changed, 76 insertions(+), 1 deletions(-)
diff --git a/cfg.lex b/cfg.lex
index d8586db..50c23cc 100644
--- a/cfg.lex
+++ b/cfg.lex
@@ -300,6 +300,10 @@ LOG_AND "and"|"&&"
BIN_AND "&"
LOG_OR "or"|"||"
BIN_OR "|"
+BIN_NOT "~"
+BIN_XOR "^"
+BIN_LSHIFT "<<"
+BIN_RSHIFT ">>"
PLUS "+"
MINUS "-"
MODULO "mod"
@@ -935,6 +939,10 @@ SUBST subst
<INITIAL>{BIN_AND} { count(); return BIN_AND; }
<INITIAL>{LOG_OR} { count(); return LOG_OR; }
<INITIAL>{BIN_OR} { count(); return BIN_OR; }
+<INITIAL>{BIN_NOT} { count(); return BIN_NOT; }
+<INITIAL>{BIN_XOR} { count(); return BIN_XOR; }
+<INITIAL>{BIN_LSHIFT} { count(); return BIN_LSHIFT; }
+<INITIAL>{BIN_RSHIFT} { count(); return BIN_RSHIFT; }
<INITIAL>{PLUS} { count(); return PLUS; }
<INITIAL>{MINUS} { count(); return MINUS; }
<INITIAL>{MODULO} { count(); return MODULO; }
diff --git a/cfg.y b/cfg.y
index dde4040..1da6b8c 100644
--- a/cfg.y
+++ b/cfg.y
@@ -567,11 +567,14 @@ extern char *finame;
%left LOG_AND
%left BIN_OR
%left BIN_AND
+%left BIN_XOR
+%left BIN_LSHIFT
+%left BIN_RSHIFT
%left EQUAL_T DIFF MATCH INTEQ INTDIFF STREQ STRDIFF
%left GT LT GTE LTE
%left PLUS MINUS
%left STAR SLASH MODULO
-%right NOT UNARY
+%right NOT UNARY BIN_NOT
%right DEFINED
%right INTCAST STRCAST
%left DOT
@@ -2748,6 +2751,7 @@ rval: intno {$$=mk_rve_rval(RV_INT, (void*)$1); }
rve_un_op: NOT { $$=RVE_LNOT_OP; }
+ | BIN_NOT { $$=RVE_BNOT_OP; }
| MINUS %prec UNARY { $$=RVE_UMINUS_OP; }
/* TODO: RVE_BOOL_OP, RVE_NOT_OP? */
;
@@ -2777,6 +2781,9 @@ rval_expr: rval { $$=$1;
| rval_expr MODULO rval_expr {$$=mk_rve2(RVE_MOD_OP, $1, $3); }
| rval_expr BIN_OR rval_expr {$$=mk_rve2(RVE_BOR_OP, $1, $3); }
| rval_expr BIN_AND rval_expr {$$=mk_rve2(RVE_BAND_OP, $1, $3);}
+ | rval_expr BIN_XOR rval_expr {$$=mk_rve2(RVE_BXOR_OP, $1, $3);}
+ | rval_expr BIN_LSHIFT rval_expr {$$=mk_rve2(RVE_BLSHIFT_OP, $1, $3);}
+ | rval_expr BIN_RSHIFT rval_expr {$$=mk_rve2(RVE_BRSHIFT_OP, $1, $3);}
| rval_expr rve_cmpop rval_expr %prec GT { $$=mk_rve2( $2, $1, $3);}
| rval_expr rve_equalop rval_expr %prec EQUAL_T
{ $$=mk_rve2( $2, $1, $3);}
diff --git a/rvalue.c b/rvalue.c
index 9195972..ea861e6 100644
--- a/rvalue.c
+++ b/rvalue.c
@@ -501,12 +501,16 @@ enum rval_type rve_guess_type( struct rval_expr* rve)
case RVE_UMINUS_OP:
case RVE_BOOL_OP:
case RVE_LNOT_OP:
+ case RVE_BNOT_OP:
case RVE_MINUS_OP:
case RVE_MUL_OP:
case RVE_DIV_OP:
case RVE_MOD_OP:
case RVE_BOR_OP:
case RVE_BAND_OP:
+ case RVE_BXOR_OP:
+ case RVE_BLSHIFT_OP:
+ case RVE_BRSHIFT_OP:
case RVE_LAND_OP:
case RVE_LOR_OP:
case RVE_GT_OP:
@@ -565,6 +569,7 @@ int rve_is_constant(struct rval_expr* rve)
case RVE_UMINUS_OP:
case RVE_BOOL_OP:
case RVE_LNOT_OP:
+ case RVE_BNOT_OP:
case RVE_STRLEN_OP:
case RVE_STREMPTY_OP:
case RVE_DEFINED_OP:
@@ -577,6 +582,9 @@ int rve_is_constant(struct rval_expr* rve)
case RVE_MOD_OP:
case RVE_BOR_OP:
case RVE_BAND_OP:
+ case RVE_BXOR_OP:
+ case RVE_BLSHIFT_OP:
+ case RVE_BRSHIFT_OP:
case RVE_LAND_OP:
case RVE_LOR_OP:
case RVE_GT_OP:
@@ -625,6 +633,7 @@ static int rve_op_unary(enum rval_expr_op op)
case RVE_UMINUS_OP:
case RVE_BOOL_OP:
case RVE_LNOT_OP:
+ case RVE_BNOT_OP:
case RVE_STRLEN_OP:
case RVE_STREMPTY_OP:
case RVE_DEFINED_OP:
@@ -637,6 +646,9 @@ static int rve_op_unary(enum rval_expr_op op)
case RVE_MOD_OP:
case RVE_BOR_OP:
case RVE_BAND_OP:
+ case RVE_BXOR_OP:
+ case RVE_BLSHIFT_OP:
+ case RVE_BRSHIFT_OP:
case RVE_LAND_OP:
case RVE_LOR_OP:
case RVE_GT_OP:
@@ -689,6 +701,7 @@ int rve_check_type(enum rval_type* type, struct rval_expr* rve,
case RVE_UMINUS_OP:
case RVE_BOOL_OP:
case RVE_LNOT_OP:
+ case RVE_BNOT_OP:
*type=RV_INT;
if (rve_check_type(&type1, rve->left.rve, bad_rve, bad_t, exp_t)){
if (type1==RV_STR){
@@ -707,6 +720,9 @@ int rve_check_type(enum rval_type* type, struct rval_expr* rve,
case RVE_MOD_OP:
case RVE_BOR_OP:
case RVE_BAND_OP:
+ case RVE_BXOR_OP:
+ case RVE_BLSHIFT_OP:
+ case RVE_BRSHIFT_OP:
case RVE_LAND_OP:
case RVE_LOR_OP:
case RVE_GT_OP:
@@ -1326,6 +1342,9 @@ inline static int int_intop1(int* res, enum rval_expr_op op, int v)
case RVE_LNOT_OP:
*res=!v;
break;
+ case RVE_BNOT_OP:
+ *res=~v;
+ break;
default:
BUG("rv unsupported intop1 %d\n", op);
return -1;
@@ -1371,6 +1390,15 @@ inline static int int_intop2(int* res, enum rval_expr_op op, int v1, int v2)
case RVE_BAND_OP:
*res=v1&v2;
break;
+ case RVE_BXOR_OP:
+ *res=v1^v2;
+ break;
+ case RVE_BLSHIFT_OP:
+ *res=v1<<v2;
+ break;
+ case RVE_BRSHIFT_OP:
+ *res=v1>>v2;
+ break;
case RVE_LAND_OP:
*res=v1 && v2;
break;
@@ -1870,6 +1898,7 @@ int rval_expr_eval_int( struct run_act_ctx* h, struct sip_msg* msg,
case RVE_UMINUS_OP:
case RVE_BOOL_OP:
case RVE_LNOT_OP:
+ case RVE_BNOT_OP:
if (unlikely(
(ret=rval_expr_eval_int(h, msg, &i1, rve->left.rve)) <0) )
break;
@@ -1886,6 +1915,9 @@ int rval_expr_eval_int( struct run_act_ctx* h, struct sip_msg* msg,
case RVE_IPLUS_OP:
case RVE_BOR_OP:
case RVE_BAND_OP:
+ case RVE_BXOR_OP:
+ case RVE_BLSHIFT_OP:
+ case RVE_BRSHIFT_OP:
case RVE_GT_OP:
case RVE_GTE_OP:
case RVE_LT_OP:
@@ -2154,12 +2186,16 @@ int rval_expr_eval_rvint( struct run_act_ctx* h,
case RVE_UMINUS_OP:
case RVE_BOOL_OP:
case RVE_LNOT_OP:
+ case RVE_BNOT_OP:
case RVE_MINUS_OP:
case RVE_MUL_OP:
case RVE_DIV_OP:
case RVE_MOD_OP:
case RVE_BOR_OP:
case RVE_BAND_OP:
+ case RVE_BXOR_OP:
+ case RVE_BLSHIFT_OP:
+ case RVE_BRSHIFT_OP:
case RVE_LAND_OP:
case RVE_LOR_OP:
case RVE_GT_OP:
@@ -2273,12 +2309,16 @@ struct rvalue* rval_expr_eval(struct run_act_ctx* h, struct sip_msg* msg,
case RVE_UMINUS_OP:
case RVE_BOOL_OP:
case RVE_LNOT_OP:
+ case RVE_BNOT_OP:
case RVE_MINUS_OP:
case RVE_MUL_OP:
case RVE_DIV_OP:
case RVE_MOD_OP:
case RVE_BOR_OP:
case RVE_BAND_OP:
+ case RVE_BXOR_OP:
+ case RVE_BLSHIFT_OP:
+ case RVE_BRSHIFT_OP:
case RVE_LAND_OP:
case RVE_LOR_OP:
case RVE_GT_OP:
@@ -2531,6 +2571,7 @@ struct rval_expr* mk_rval_expr1(enum rval_expr_op op, struct rval_expr* rve1,
case RVE_UMINUS_OP:
case RVE_BOOL_OP:
case RVE_LNOT_OP:
+ case RVE_BNOT_OP:
case RVE_STRLEN_OP:
case RVE_STREMPTY_OP:
case RVE_DEFINED_OP:
@@ -2573,6 +2614,9 @@ struct rval_expr* mk_rval_expr2(enum rval_expr_op op, struct rval_expr* rve1,
case RVE_MINUS_OP:
case RVE_BOR_OP:
case RVE_BAND_OP:
+ case RVE_BXOR_OP:
+ case RVE_BLSHIFT_OP:
+ case RVE_BRSHIFT_OP:
case RVE_LAND_OP:
case RVE_LOR_OP:
case RVE_GT_OP:
@@ -2616,6 +2660,7 @@ static int rve_op_is_assoc(enum rval_expr_op op)
case RVE_UMINUS_OP:
case RVE_BOOL_OP:
case RVE_LNOT_OP:
+ case RVE_BNOT_OP:
case RVE_STRLEN_OP:
case RVE_STREMPTY_OP:
case RVE_DEFINED_OP:
@@ -2626,6 +2671,8 @@ static int rve_op_is_assoc(enum rval_expr_op op)
case RVE_DIV_OP:
case RVE_MOD_OP:
case RVE_MINUS_OP:
+ case RVE_BLSHIFT_OP:
+ case RVE_BRSHIFT_OP:
return 0;
case RVE_PLUS_OP:
/* the generic plus is not assoc, e.g.
@@ -2636,6 +2683,7 @@ static int rve_op_is_assoc(enum rval_expr_op op)
case RVE_MUL_OP:
case RVE_BAND_OP:
case RVE_BOR_OP:
+ case RVE_BXOR_OP:
return 1;
case RVE_LAND_OP:
case RVE_LOR_OP:
@@ -2667,6 +2715,7 @@ static int rve_op_is_commutative(enum rval_expr_op op)
case RVE_UMINUS_OP:
case RVE_BOOL_OP:
case RVE_LNOT_OP:
+ case RVE_BNOT_OP:
case RVE_STRLEN_OP:
case RVE_STREMPTY_OP:
case RVE_DEFINED_OP:
@@ -2677,6 +2726,8 @@ static int rve_op_is_commutative(enum rval_expr_op op)
case RVE_DIV_OP:
case RVE_MOD_OP:
case RVE_MINUS_OP:
+ case RVE_BLSHIFT_OP:
+ case RVE_BRSHIFT_OP:
return 0;
case RVE_PLUS_OP:
/* non commut. when diff. type
@@ -2687,6 +2738,7 @@ static int rve_op_is_commutative(enum rval_expr_op op)
case RVE_MUL_OP:
case RVE_BAND_OP:
case RVE_BOR_OP:
+ case RVE_BXOR_OP:
case RVE_LAND_OP:
case RVE_LOR_OP:
case RVE_IEQ_OP:
@@ -3712,6 +3764,7 @@ int fix_rval_expr(void* p)
case RVE_UMINUS_OP: /* unary operators */
case RVE_BOOL_OP:
case RVE_LNOT_OP:
+ case RVE_BNOT_OP:
case RVE_STRLEN_OP:
case RVE_STREMPTY_OP:
case RVE_DEFINED_OP:
@@ -3726,6 +3779,9 @@ int fix_rval_expr(void* p)
case RVE_MINUS_OP:
case RVE_BOR_OP:
case RVE_BAND_OP:
+ case RVE_BXOR_OP:
+ case RVE_BLSHIFT_OP:
+ case RVE_BRSHIFT_OP:
case RVE_LAND_OP:
case RVE_LOR_OP:
case RVE_GT_OP:
diff --git a/rvalue.h b/rvalue.h
index 8e67c2e..cc9085c 100644
--- a/rvalue.h
+++ b/rvalue.h
@@ -53,12 +53,16 @@ enum rval_expr_op{
RVE_UMINUS_OP, /* one member expression, returns -(val) */
RVE_BOOL_OP, /* one member evaluate as bool. : (val!=0)*/
RVE_LNOT_OP, /* one member evaluate as bool. : (!val)*/
+ RVE_BNOT_OP, /* one member evaluate as binary : (~ val)*/
RVE_MUL_OP, /* 2 members, returns left * right */
RVE_DIV_OP, /* 2 members, returns left / right */
RVE_MOD_OP, /* 2 members, returns left % right */
RVE_MINUS_OP, /* 2 members, returns left - right */
RVE_BAND_OP, /* 2 members, returns left | right */
RVE_BOR_OP, /* 2 members, returns left & right */
+ RVE_BXOR_OP, /* 2 members, returns left XOR right */
+ RVE_BLSHIFT_OP, /* 2 members, returns left << right */
+ RVE_BRSHIFT_OP, /* 2 members, returns left >> right */
RVE_LAND_OP, /* 2 members, returns left && right */
RVE_LOR_OP, /* 2 members, returns left || right */
RVE_GT_OP, /* 2 members, returns left > right */
Module: sip-router
Branch: master
Commit: ebb3b085c15b398192cd8e242d46914252278448
URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ebb3b08…
Author: Juha Heinanen <jh(a)tutpro.com>
Committer: Juha Heinanen <jh(a)tutpro.com>
Date: Fri May 20 23:08:24 2011 +0300
core: fixed via branch value in ack to 200 ok
- By default, sr was using non-rfc3261 compliant via branch value when
it generated ack to 200 ok.
---
forward.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/forward.c b/forward.c
index f073f7c..3e4aecd 100644
--- a/forward.c
+++ b/forward.c
@@ -543,8 +543,8 @@ int forward_request(struct sip_msg* msg, str* dst, unsigned short port,
value in there; better for performance
*/
if (syn_branch ) {
- *msg->add_to_branch_s='0';
- msg->add_to_branch_len=1;
+ memcpy(msg->add_to_branch_s, "z9hG4bKcydzigwkX", 16);
+ msg->add_to_branch_len=16;
} else {
if (!char_msg_val( msg, md5 )) { /* parses transaction key */
LOG(L_ERR, "ERROR: forward_request: char_msg_val failed\n");
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - laura testi (lau.testi)
Attached to Project - sip-router
Summary - kamailio 3.1.3 Presence + XCAP problem, is it a bug?
Task Type - Bug Report
Category - Core
Status - Assigned
Assigned To - Andrei Pelinescu-Onciul
Operating System - Linux
Severity - Medium
Priority - Normal
Reported Version - 3.1
Due in Version - Undecided
Due Date - Undecided
Details - Hello,
I’m wring you again about the Presence = xcap Problem on Kamailio related with the deleting of a contact.
Here a detailed description we have observed:
User Case:
------------------
- user A is a contact of B and viceversa.
- then user A removes B from PC client
1) A sends SUBSCRIBE B to Kamail Presence Server (PS) with even type: presence and Expire:0 without body
a) PS removes A as wacther of B from the active_watchers table
b) PS sends NOTIFY to B (from B to B) with event type: presence.winfo and Subscription State:active,expire=570
c) PS sends NOTIFY to A (from B to A) with event type: Presence and Subscription State: terminated,reason=timeout
2) A sends XCAP PUT to PS with updated pres-rules without B in presence_allow rule
a) PS update xcap table the pres-rules record of A (without B)
3) A sends XCAP PUT to PS with updated resource-lists without B
a) PS update xcap table the resource-lists record of A (without B)
4) the script kamailio.cfg calls pres_update_watchers
a) PS updates watcher table by setting the status = 2(pending) for the record of B is watcher of A (presentity), while the status remains active (1) for the record of A is watcher of B
b) PS sends NOTIFY to B(from A to B) with event type: presence and subscription state: pending
5) the script kamailio.cfg calls pres_refresh_watchers
a) PS sends NOTIFY to B(from A to B) with event type: presence and content type:application:pdif+xml (open, online, pdif entity:A,...)
b) the PC client of B shows a popup by saying 5has authorized the B adds A as contact request
Test environments:
--------------------------
- server: kamailio 3.1.3 with presence, xcap and mysql in Redhat5.6_x64
- transport: tcp
- db: mysql
- client: jitsi (ex SIP communicator)
- kamailio.cfg: please see the attached file kamailio.zip
Questions:
-----------------
1) is it correct the first SUBSCRIBE from the PC client of A?
2) are the over all call flows correct (see the attached wireshark trace)
3) are the steps 2 and 3 correct?
4) the steps 4 and 5 are very strange, is it the bug of xcap module or/and presence module?
Please help!!!!!
Best Regards,
Laura
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=133
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.