Browse code

Fixed carrierroute module exports. See http://lists.sip-router.org/pipermail/sr-dev/2009-October/004393.html thread for a complete description

Marius Zbihlei authored on 19/10/2009 09:46:17
Showing 3 changed files
... ...
@@ -87,11 +87,11 @@ static void mod_destroy(void);
87 87
 /************* Module Exports **********************************************/
88 88
 static cmd_export_t cmds[]={
89 89
 	{"cr_user_carrier",  (cmd_function)cr_load_user_carrier,  3, cr_load_user_carrier_fixup, 0, REQUEST_ROUTE | FAILURE_ROUTE },
90
-	{"cr_route",         (cmd_function)cr_route,              5, cr_route_fixup,             0, REQUEST_ROUTE | FAILURE_ROUTE },
90
+	{"cr_route",         (cmd_function)cr_route5,              5, cr_route_fixup,             0, REQUEST_ROUTE | FAILURE_ROUTE },
91 91
 	{"cr_route",         (cmd_function)cr_route,              6, cr_route_fixup,             0, REQUEST_ROUTE | FAILURE_ROUTE },
92
-	{"cr_prime_route",   (cmd_function)cr_prime_route,        5, cr_route_fixup,             0, REQUEST_ROUTE | FAILURE_ROUTE },
92
+	{"cr_prime_route",   (cmd_function)cr_prime_route5,        5, cr_route_fixup,             0, REQUEST_ROUTE | FAILURE_ROUTE },
93 93
 	{"cr_prime_route",   (cmd_function)cr_prime_route,        6, cr_route_fixup,             0, REQUEST_ROUTE | FAILURE_ROUTE },
94
-	{"cr_nofallback_route",(cmd_function)cr_nofallback_route,     5, cr_route_fixup,             0, REQUEST_ROUTE | FAILURE_ROUTE },
94
+	{"cr_nofallback_route",(cmd_function)cr_nofallback_route5,     5, cr_route_fixup,             0, REQUEST_ROUTE | FAILURE_ROUTE },
95 95
 	{"cr_nofallback_route",(cmd_function)cr_nofallback_route,     6, cr_route_fixup,             0, REQUEST_ROUTE | FAILURE_ROUTE },
96 96
 	{"cr_next_domain",   (cmd_function)cr_load_next_domain,   6, cr_load_next_domain_fixup,  0, REQUEST_ROUTE | FAILURE_ROUTE },
97 97
 	{0, 0, 0, 0, 0, 0}
... ...
@@ -677,6 +677,14 @@ int cr_route(struct sip_msg * _msg, gparam_t *_carrier,
677 677
 		_rewrite_user, _hsrc, alg_crc32, _descavp);
678 678
 }
679 679
 
680
+int cr_route5(struct sip_msg * _msg, gparam_t *_carrier,
681
+		gparam_t *_domain, gparam_t *_prefix_matching,
682
+		gparam_t *_rewrite_user, enum hash_source _hsrc)
683
+{
684
+	return cr_do_route(_msg, _carrier, _domain, _prefix_matching,
685
+		_rewrite_user, _hsrc, alg_crc32, NULL);
686
+}
687
+
680 688
 
681 689
 /**
682 690
  * rewrites the request URI of msg after determining the
... ...
@@ -701,6 +709,13 @@ int cr_prime_route(struct sip_msg * _msg, gparam_t *_carrier,
701 709
 		_rewrite_user, _hsrc, alg_prime, _descavp);
702 710
 }
703 711
 
712
+int cr_prime_route5(struct sip_msg * _msg, gparam_t *_carrier,
713
+		gparam_t *_domain, gparam_t *_prefix_matching,
714
+		gparam_t *_rewrite_user, enum hash_source _hsrc)
715
+{
716
+	return cr_do_route(_msg, _carrier, _domain, _prefix_matching,
717
+		_rewrite_user, _hsrc, alg_prime, NULL);
718
+}
704 719
 /**
705 720
  * rewrites the request URI of msg after determining the
706 721
  * new destination URI with the crc32 hash algorithm. The difference
... ...
@@ -726,6 +741,14 @@ int cr_nofallback_route(struct sip_msg * _msg, gparam_t *_carrier,
726 741
 		_rewrite_user, _hsrc, alg_crc32_nofallback, _dstavp);
727 742
 }
728 743
 
744
+int cr_nofallback_route5(struct sip_msg * _msg, gparam_t *_carrier,
745
+		gparam_t *_domain, gparam_t *_prefix_matching,
746
+		gparam_t *_rewrite_user, enum hash_source _hsrc)
747
+{
748
+	return cr_do_route(_msg, _carrier, _domain, _prefix_matching,
749
+		_rewrite_user, _hsrc, alg_crc32_nofallback, NULL);
750
+}
751
+
729 752
 
730 753
 /**
731 754
  * Loads next domain from failure routing table and stores it in an AVP.
... ...
@@ -69,6 +69,9 @@ int cr_route(struct sip_msg * _msg, gparam_t *_carrier,
69 69
 		gparam_t *_domain, gparam_t *_prefix_matching,
70 70
 		gparam_t *_rewrite_user, enum hash_source _hsrc,
71 71
 		gparam_t *_descavp);
72
+int cr_route5(struct sip_msg * _msg, gparam_t *_carrier,
73
+		gparam_t *_domain, gparam_t *_prefix_matching,
74
+		gparam_t *_rewrite_user, enum hash_source _hsrc);
72 75
 
73 76
 
74 77
 /**
... ...
@@ -89,6 +92,9 @@ int cr_prime_route(struct sip_msg * _msg, gparam_t *_carrier,
89 92
 		gparam_t *_domain, gparam_t *_prefix_matching,
90 93
 		gparam_t *_rewrite_user, enum hash_source _hsrc,
91 94
 		gparam_t *_descavp);
95
+int cr_prime_route5(struct sip_msg * _msg, gparam_t *_carrier,
96
+		gparam_t *_domain, gparam_t *_prefix_matching,
97
+		gparam_t *_rewrite_user, enum hash_source _hsrc);
92 98
 
93 99
 /**
94 100
  *
... ...
@@ -111,6 +117,9 @@ int cr_nofallback_route(struct sip_msg * _msg, gparam_t *_carrier,
111 117
 		gparam_t *_domain, gparam_t *_prefix_matching,
112 118
 		gparam_t *_rewrite_user, enum hash_source _hsrc,
113 119
 		gparam_t *_dstavp);
120
+int cr_nofallback_route5(struct sip_msg * _msg, gparam_t *_carrier,
121
+		gparam_t *_domain, gparam_t *_prefix_matching,
122
+		gparam_t *_rewrite_user, enum hash_source _hsrc);
114 123
 
115 124
 
116 125
 /**