Module: sip-router
Branch: master
Commit: 58e87237864ceee603f6f0273019296208542153
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=58e87237864ceee603f6f0273019296208542153

Author: Andrei Pelinescu-Onciul <[email protected]>
Committer: Andrei Pelinescu-Onciul <[email protected]>
Date:   Mon Sep 21 18:37:14 2009 +0200

script paser: snd_proto names not recognized fix

- if (snd_proto==...) did not work anymore when used with proto
  names instead of numbers.

---

 cfg.y |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/cfg.y b/cfg.y
index 9844d5f..fe8cbf2 100644
--- a/cfg.y
+++ b/cfg.y
@@ -1813,7 +1813,6 @@ uri_type:
 eint_op_onsend:
                        SNDPORT         { $$=SNDPORT_O; }
                |       TOPORT          { $$=TOPORT_O; }
-               |       SNDPROTO        { $$=SNDPROTO_O; }
                |       SNDAF           { $$=SNDAF_O; }
                ;
 
@@ -1867,6 +1866,12 @@ exp_elem:
                { $$=mk_elem($2, PROTO_O, 0, RVE_ST, $3 ); }
        | PROTO equalop error
                { $$=0; yyerror("protocol expected (udp, tcp, tls or sctp)"); }
+       | SNDPROTO equalop %prec EQUAL_T proto
+               { $$=mk_elem($2, SNDPROTO_O, 0, NUMBER_ST, (void*)$3 ); }
+       | SNDPROTO equalop %prec EQUAL_T rval_expr
+               { $$=mk_elem($2, SNDPROTO_O, 0, RVE_ST, $3 ); }
+       | SNDPROTO equalop error
+               { $$=0; yyerror("protocol expected (udp, tcp, tls or sctp)"); }
        | eip_op strop %prec EQUAL_T ipnet { $$=mk_elem($2, $1, 0, NET_ST, $3); 
}
        | eip_op strop %prec EQUAL_T rval_expr {
                        s_tmp.s=0;


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to