... | ... |
@@ -29,6 +29,7 @@ |
29 | 29 |
* History: |
30 | 30 |
* ------- |
31 | 31 |
* 2003-03-11: New module interface (janakj) |
32 |
+ * 2003-03-16: flags export parameter added (janakj) |
|
32 | 33 |
*/ |
33 | 34 |
|
34 | 35 |
|
... | ... |
@@ -128,8 +129,8 @@ static void on_missed(struct cell *t, struct sip_msg *reply, |
128 | 129 |
|
129 | 130 |
|
130 | 131 |
static cmd_export_t cmds[] = { |
131 |
- {"acc_request", acc_request, 1, 0}, |
|
132 |
- {0, 0, 0, 0} |
|
132 |
+ {"acc_request", acc_request, 1, 0, REQUEST_ROUTE}, |
|
133 |
+ {0, 0, 0, 0, 0} |
|
133 | 134 |
}; |
134 | 135 |
|
135 | 136 |
static param_export_t params[] = { |
... | ... |
@@ -30,6 +30,7 @@ |
30 | 30 |
* -------- |
31 | 31 |
* 2003-02-26: checks and group moved to separate modules (janakj) |
32 | 32 |
* 2003-03-10: New module interface (janakj) |
33 |
+ * 2003-03-16: flags export parameter added (janakj) |
|
33 | 34 |
*/ |
34 | 35 |
|
35 | 36 |
#include <stdio.h> |
... | ... |
@@ -87,12 +88,12 @@ char* sec_rand = 0; |
87 | 88 |
* Exported functions |
88 | 89 |
*/ |
89 | 90 |
static cmd_export_t cmds[] = { |
90 |
- {"www_challenge", www_challenge, 2, challenge_fixup}, |
|
91 |
- {"proxy_challenge", proxy_challenge, 2, challenge_fixup}, |
|
92 |
- {"consume_credentials", consume_credentials, 0, 0 }, |
|
93 |
- {"~pre_auth", (cmd_function)pre_auth, 0, 0 }, |
|
94 |
- {"~post_auth", (cmd_function)post_auth, 0, 0 }, |
|
95 |
- {0, 0, 0,0} |
|
91 |
+ {"www_challenge", www_challenge, 2, challenge_fixup, REQUEST_ROUTE}, |
|
92 |
+ {"proxy_challenge", proxy_challenge, 2, challenge_fixup, REQUEST_ROUTE}, |
|
93 |
+ {"consume_credentials", consume_credentials, 0, 0 , REQUEST_ROUTE}, |
|
94 |
+ {"~pre_auth", (cmd_function)pre_auth, 0, 0 , 0 }, |
|
95 |
+ {"~post_auth", (cmd_function)post_auth, 0, 0 , 0 }, |
|
96 |
+ {0, 0, 0, 0, 0} |
|
96 | 97 |
}; |
97 | 98 |
|
98 | 99 |
|
... | ... |
@@ -134,18 +134,24 @@ static inline int challenge(struct sip_msg* _msg, str* _realm, int _qop, |
134 | 134 |
struct hdr_field* h; |
135 | 135 |
auth_body_t* cred = 0; |
136 | 136 |
char *auth_hf; |
137 |
- int ret; |
|
137 |
+ int ret, hftype = 0; /* Makes gcc happy */ |
|
138 | 138 |
struct sip_uri uri; |
139 | 139 |
|
140 | 140 |
switch(_code) { |
141 |
- case 401: get_authorized_cred(_msg->authorization, &h); break; |
|
142 |
- case 407: get_authorized_cred(_msg->proxy_auth, &h); break; |
|
141 |
+ case 401: |
|
142 |
+ get_authorized_cred(_msg->authorization, &h); |
|
143 |
+ hftype = HDR_AUTHORIZATION; |
|
144 |
+ break; |
|
145 |
+ case 407: |
|
146 |
+ get_authorized_cred(_msg->proxy_auth, &h); |
|
147 |
+ hftype = HDR_PROXYAUTH; |
|
148 |
+ break; |
|
143 | 149 |
} |
144 | 150 |
|
145 | 151 |
if (h) cred = (auth_body_t*)(h->parsed); |
146 | 152 |
|
147 | 153 |
if (_realm->len == 0) { |
148 |
- if (get_realm(_msg, &uri) < 0) { |
|
154 |
+ if (get_realm(_msg, hftype, &uri) < 0) { |
|
149 | 155 |
LOG(L_ERR, "challenge(): Error while extracting URI\n"); |
150 | 156 |
if (send_resp(_msg, 400, MESSAGE_400, 0, 0) == -1) { |
151 | 157 |
LOG(L_ERR, "challenge(): Error while sending response\n"); |
... | ... |
@@ -30,6 +30,7 @@ |
30 | 30 |
* -------- |
31 | 31 |
* 2003-02-26: checks and group moved to separate modules (janakj) |
32 | 32 |
* 2003-03-11: New module interface (janakj) |
33 |
+ * 2003-03-16: flags export parameter added (janakj) |
|
33 | 34 |
*/ |
34 | 35 |
|
35 | 36 |
#include <stdio.h> |
... | ... |
@@ -88,9 +89,9 @@ db_con_t* db_handle; /* Database connection handle */ |
88 | 89 |
* Exported functions |
89 | 90 |
*/ |
90 | 91 |
static cmd_export_t cmds[] = { |
91 |
- {"www_authorize", www_authorize, 2, str_fixup}, |
|
92 |
- {"proxy_authorize", proxy_authorize, 2, str_fixup}, |
|
93 |
- {0, 0, 0, 0} |
|
92 |
+ {"www_authorize", www_authorize, 2, str_fixup, REQUEST_ROUTE}, |
|
93 |
+ {"proxy_authorize", proxy_authorize, 2, str_fixup, REQUEST_ROUTE}, |
|
94 |
+ {0, 0, 0, 0, 0} |
|
94 | 95 |
}; |
95 | 96 |
|
96 | 97 |
|
... | ... |
@@ -30,6 +30,7 @@ |
30 | 30 |
* ------- |
31 | 31 |
* 2003-03-09: Based on auth_mod.c from radius_auth (janakj) |
32 | 32 |
* 2003-03-11: New module interface (janakj) |
33 |
+ * 2003-03-16: flags export parameter added (janakj) |
|
33 | 34 |
*/ |
34 | 35 |
|
35 | 36 |
|
... | ... |
@@ -60,9 +61,9 @@ char* radius_config = "/usr/local/etc/radiusclient/radiusclient.conf"; |
60 | 61 |
* Exported functions |
61 | 62 |
*/ |
62 | 63 |
static cmd_export_t cmds[] = { |
63 |
- {"radius_www_authorize", radius_www_authorize, 1, str_fixup}, |
|
64 |
- {"radius_proxy_authorize", radius_proxy_authorize, 1, str_fixup}, |
|
65 |
- {0, 0, 0, 0} |
|
64 |
+ {"radius_www_authorize", radius_www_authorize, 1, str_fixup, REQUEST_ROUTE}, |
|
65 |
+ {"radius_proxy_authorize", radius_proxy_authorize, 1, str_fixup, REQUEST_ROUTE}, |
|
66 |
+ {0, 0, 0, 0, 0} |
|
66 | 67 |
}; |
67 | 68 |
|
68 | 69 |
|
... | ... |
@@ -27,6 +27,7 @@ |
27 | 27 |
* History: |
28 | 28 |
* ------- |
29 | 29 |
* 2003-03-11: New module interface (janakj) |
30 |
+ * 2003-03-16: flags export parameter added (janakj) |
|
30 | 31 |
*/ |
31 | 32 |
|
32 | 33 |
|
... | ... |
@@ -69,12 +70,12 @@ static int mod_init(void); |
69 | 70 |
* Exported functions |
70 | 71 |
*/ |
71 | 72 |
static cmd_export_t cmds[] = { |
72 |
- {"cpl_run_script", cpl_run_script, 0, 0}, |
|
73 |
- {"cpl_is_response_accept", cpl_is_response_accept, 0, 0}, |
|
74 |
- {"cpl_is_response_reject", cpl_is_response_reject, 0, 0}, |
|
75 |
- {"cpl_is_response_redirect", cpl_is_response_redirect, 0, 0}, |
|
76 |
- {"cpl_update_contact", cpl_update_contact, 0, 0}, |
|
77 |
- {0, 0, 0, 0} |
|
73 |
+ {"cpl_run_script", cpl_run_script, 0, 0, REQUEST_ROUTE}, |
|
74 |
+ {"cpl_is_response_accept", cpl_is_response_accept, 0, 0, REQUEST_ROUTE}, |
|
75 |
+ {"cpl_is_response_reject", cpl_is_response_reject, 0, 0, REQUEST_ROUTE}, |
|
76 |
+ {"cpl_is_response_redirect", cpl_is_response_redirect, 0, 0, REQUEST_ROUTE}, |
|
77 |
+ {"cpl_update_contact", cpl_update_contact, 0, 0, REQUEST_ROUTE}, |
|
78 |
+ {0, 0, 0, 0, 0} |
|
78 | 79 |
}; |
79 | 80 |
|
80 | 81 |
|
... | ... |
@@ -27,6 +27,7 @@ |
27 | 27 |
* History: |
28 | 28 |
* ------- |
29 | 29 |
* 2003-03-11: New module interface (janakj) |
30 |
+ * 2003-03-16: flags export parameter added (janakj) |
|
30 | 31 |
*/ |
31 | 32 |
|
32 | 33 |
|
... | ... |
@@ -64,12 +65,12 @@ static int mod_init(void); |
64 | 65 |
* Exported functions |
65 | 66 |
*/ |
66 | 67 |
static cmd_export_t cmds[] = { |
67 |
- {"cpl_run_script", cpl_run_script, 0, 0}, |
|
68 |
- {"cpl_is_response_accept", cpl_is_response_accept, 0, 0}, |
|
69 |
- {"cpl_is_response_reject", cpl_is_response_reject, 0, 0}, |
|
70 |
- {"cpl_is_response_redirect", cpl_is_response_redirect, 0, 0}, |
|
71 |
- {"cpl_update_contact", cpl_update_contact, 0, 0}, |
|
72 |
- {0, 0, 0, 0} |
|
68 |
+ {"cpl_run_script", cpl_run_script, 0, 0, REQUEST_ROUTE}, |
|
69 |
+ {"cpl_is_response_accept", cpl_is_response_accept, 0, 0, REQUEST_ROUTE}, |
|
70 |
+ {"cpl_is_response_reject", cpl_is_response_reject, 0, 0, REQUEST_ROUTE}, |
|
71 |
+ {"cpl_is_response_redirect", cpl_is_response_redirect, 0, 0, REQUEST_ROUTE}, |
|
72 |
+ {"cpl_update_contact", cpl_update_contact, 0, 0, REQUEST_ROUTE}, |
|
73 |
+ {0, 0, 0, 0, 0} |
|
73 | 74 |
}; |
74 | 75 |
|
75 | 76 |
|
... | ... |
@@ -31,6 +31,7 @@ |
31 | 31 |
* |
32 | 32 |
* 2003-01-30 created by Daniel |
33 | 33 |
* 2003-03-11 New module interface (janakj) |
34 |
+ * 2003-03-16 flags export parameter added (janakj) |
|
34 | 35 |
* |
35 | 36 |
*/ |
36 | 37 |
|
... | ... |
@@ -48,16 +49,16 @@ void destroy(void); |
48 | 49 |
* Exported functions |
49 | 50 |
*/ |
50 | 51 |
static cmd_export_t cmds[] = { |
51 |
- {"~db_use_table", (cmd_function)use_table, 2, 0}, |
|
52 |
- {"~db_init", (cmd_function)dbt_init, 1, 0}, |
|
53 |
- {"~db_close", (cmd_function)dbt_close, 2, 0}, |
|
54 |
- {"~db_query", (cmd_function)dbt_query, 2, 0}, |
|
55 |
- {"~db_raw_query", (cmd_function)dbt_raw_query, 2, 0}, |
|
56 |
- {"~db_free_query", (cmd_function)dbt_free_query, 2, 0}, |
|
57 |
- {"~db_insert", (cmd_function)dbt_insert, 2, 0}, |
|
58 |
- {"~db_delete", (cmd_function)dbt_delete, 2, 0}, |
|
59 |
- {"~db_update", (cmd_function)dbt_update, 2, 0}, |
|
60 |
- {0, 0, 0, 0} |
|
52 |
+ {"~db_use_table", (cmd_function)use_table, 2, 0, 0}, |
|
53 |
+ {"~db_init", (cmd_function)dbt_init, 1, 0, 0}, |
|
54 |
+ {"~db_close", (cmd_function)dbt_close, 2, 0, 0}, |
|
55 |
+ {"~db_query", (cmd_function)dbt_query, 2, 0, 0}, |
|
56 |
+ {"~db_raw_query", (cmd_function)dbt_raw_query, 2, 0, 0}, |
|
57 |
+ {"~db_free_query", (cmd_function)dbt_free_query, 2, 0, 0}, |
|
58 |
+ {"~db_insert", (cmd_function)dbt_insert, 2, 0, 0}, |
|
59 |
+ {"~db_delete", (cmd_function)dbt_delete, 2, 0, 0}, |
|
60 |
+ {"~db_update", (cmd_function)dbt_update, 2, 0, 0}, |
|
61 |
+ {0, 0, 0, 0, 0} |
|
61 | 62 |
}; |
62 | 63 |
|
63 | 64 |
|
... | ... |
@@ -29,6 +29,7 @@ |
29 | 29 |
* History: |
30 | 30 |
* ------- |
31 | 31 |
* 2003-03-11: New module interface (janakj) |
32 |
+ * 2003-03-16: flags export parameter added (janakj) |
|
32 | 33 |
*/ |
33 | 34 |
|
34 | 35 |
|
... | ... |
@@ -68,9 +69,9 @@ struct domain_list **hash_table_2; /* Pointer to hash table 2 */ |
68 | 69 |
* Exported functions |
69 | 70 |
*/ |
70 | 71 |
static cmd_export_t cmds[] = { |
71 |
- {"is_from_local", is_from_local, 0, 0}, |
|
72 |
- {"is_uri_host_local", is_uri_host_local, 0, 0}, |
|
73 |
- {0, 0, 0, 0} |
|
72 |
+ {"is_from_local", is_from_local, 0, 0, REQUEST_ROUTE}, |
|
73 |
+ {"is_uri_host_local", is_uri_host_local, 0, 0, REQUEST_ROUTE}, |
|
74 |
+ {0, 0, 0, 0, 0} |
|
74 | 75 |
}; |
75 | 76 |
|
76 | 77 |
|
... | ... |
@@ -29,6 +29,7 @@ |
29 | 29 |
* History: |
30 | 30 |
* ------- |
31 | 31 |
* 2003-03-11: New module interface (janakj) |
32 |
+ * 2003-03-16: flags export parameter added (janakj) |
|
32 | 33 |
*/ |
33 | 34 |
|
34 | 35 |
|
... | ... |
@@ -46,9 +47,9 @@ static int mod_init(void); |
46 | 47 |
* Exported functions |
47 | 48 |
*/ |
48 | 49 |
static cmd_export_t cmds[] = { |
49 |
- {"enum_query", enum_query, 0, 0}, |
|
50 |
- {"is_from_user_e164", is_from_user_e164, 0, 0}, |
|
51 |
- {0, 0, 0, 0} |
|
50 |
+ {"enum_query", enum_query, 0, 0, REQUEST_ROUTE}, |
|
51 |
+ {"is_from_user_e164", is_from_user_e164, 0, 0, REQUEST_ROUTE}, |
|
52 |
+ {0, 0, 0, 0, 0} |
|
52 | 53 |
}; |
53 | 54 |
|
54 | 55 |
|
... | ... |
@@ -29,6 +29,7 @@ |
29 | 29 |
* History: |
30 | 30 |
* ------- |
31 | 31 |
* 2003-03-11: New module interface (janakj) |
32 |
+ * 2003-03-16: flags export parameter added (janakj) |
|
32 | 33 |
*/ |
33 | 34 |
|
34 | 35 |
|
... | ... |
@@ -57,9 +58,9 @@ inline static void exec_shutdown(); |
57 | 58 |
* Exported functions |
58 | 59 |
*/ |
59 | 60 |
static cmd_export_t cmds[] = { |
60 |
- {"exec_dset", w_exec_dset, 1, 0}, |
|
61 |
- {"exec_msg", w_exec_msg, 1, 0}, |
|
62 |
- {0, 0, 0, 0} |
|
61 |
+ {"exec_dset", w_exec_dset, 1, 0, REQUEST_ROUTE}, |
|
62 |
+ {"exec_msg", w_exec_msg, 1, 0, REQUEST_ROUTE}, |
|
63 |
+ {0, 0, 0, 0, 0} |
|
63 | 64 |
}; |
64 | 65 |
|
65 | 66 |
|
... | ... |
@@ -28,6 +28,7 @@ |
28 | 28 |
* History: |
29 | 29 |
* ------- |
30 | 30 |
* 2003-03-11: New module interface (janakj) |
31 |
+ * 2003-03-16: flags export parameter added (janakj) |
|
31 | 32 |
*/ |
32 | 33 |
|
33 | 34 |
#include <stdio.h> |
... | ... |
@@ -62,9 +63,9 @@ static int fixup_ext_rewrite(void** param, int param_no); |
62 | 63 |
* Exported functions |
63 | 64 |
*/ |
64 | 65 |
static cmd_export_t cmds[] = { |
65 |
- {"ext_rewriteuser", ext_rewriteuser, 1, fixup_ext_rewrite}, |
|
66 |
- {"ext_rewriteuri", ext_rewriteuri, 1, fixup_ext_rewrite}, |
|
67 |
- {0, 0, 0, 0} |
|
66 |
+ {"ext_rewriteuser", ext_rewriteuser, 1, fixup_ext_rewrite, REQUEST_ROUTE}, |
|
67 |
+ {"ext_rewriteuri", ext_rewriteuri, 1, fixup_ext_rewrite, REQUEST_ROUTE}, |
|
68 |
+ {0, 0, 0, 0, 0} |
|
68 | 69 |
}; |
69 | 70 |
|
70 | 71 |
|
... | ... |
@@ -28,6 +28,7 @@ |
28 | 28 |
* History: |
29 | 29 |
* ------- |
30 | 30 |
* 2003-03-11: New module interface (janakj) |
31 |
+ * 2003-03-16: flags export parameter added (janakj) |
|
31 | 32 |
*/ |
32 | 33 |
|
33 | 34 |
|
... | ... |
@@ -81,8 +82,8 @@ int req_pipe[2]; |
81 | 82 |
*/ |
82 | 83 |
|
83 | 84 |
static cmd_export_t cmds[] = { |
84 |
- {"extcmd_dump_req", dump_request, 0, 0}, |
|
85 |
- {0, 0, 0, 0} |
|
85 |
+ {"extcmd_dump_req", dump_request, 0, 0, REQUEST_ROUTE}, |
|
86 |
+ {0, 0, 0, 0, 0} |
|
86 | 87 |
}; |
87 | 88 |
|
88 | 89 |
|
... | ... |
@@ -30,6 +30,7 @@ |
30 | 30 |
* -------- |
31 | 31 |
* 2003-02-25 - created by janakj |
32 | 32 |
* 2003-03-11 - New module interface (janakj) |
33 |
+ * 2003-03-16 - flags export parameter added (janakj) |
|
33 | 34 |
*/ |
34 | 35 |
|
35 | 36 |
|
... | ... |
@@ -85,8 +86,8 @@ db_con_t* db_handle = 0; /* Database connection handle */ |
85 | 86 |
* Exported functions |
86 | 87 |
*/ |
87 | 88 |
static cmd_export_t cmds[] = { |
88 |
- {"is_user_in", is_user_in, 2, hf_fixup}, |
|
89 |
- {0, 0, 0, 0} |
|
89 |
+ {"is_user_in", is_user_in, 2, hf_fixup, REQUEST_ROUTE}, |
|
90 |
+ {0, 0, 0, 0, 0} |
|
90 | 91 |
}; |
91 | 92 |
|
92 | 93 |
|
... | ... |
@@ -29,6 +29,7 @@ |
29 | 29 |
* History: |
30 | 30 |
* -------- |
31 | 31 |
* 2003-02-25 - created by janakj |
32 |
+ * 2003-03-16 - flags export parameter added (janakj) |
|
32 | 33 |
*/ |
33 | 34 |
|
34 | 35 |
#include <string.h> |
... | ... |
@@ -56,8 +57,8 @@ int use_domain = 1; /* By default we use domain */ |
56 | 57 |
* Exported functions |
57 | 58 |
*/ |
58 | 59 |
static cmd_export_t cmds[] = { |
59 |
- {"radius_is_user_in", radius_is_user_in, 2, hf_fixup}, |
|
60 |
- {0, 0, 0, 0} |
|
60 |
+ {"radius_is_user_in", radius_is_user_in, 2, hf_fixup, REQUEST_ROUTE}, |
|
61 |
+ {0, 0, 0, 0, 0} |
|
61 | 62 |
}; |
62 | 63 |
|
63 | 64 |
|
... | ... |
@@ -35,6 +35,7 @@ |
35 | 35 |
* 2003-02-24 first version of callback functions for ihttp (dcm) |
36 | 36 |
* 2003-02-13 lot of comments enclosed in #ifdef XJ_EXTRA_DEBUG (dcm) |
37 | 37 |
* 2003-03-11 New module interface (janakj) |
38 |
+ * 2003-03-16 flags export parameter added (janakj) |
|
38 | 39 |
* |
39 | 40 |
*/ |
40 | 41 |
|
... | ... |
@@ -131,15 +132,15 @@ void destroy(void); |
131 | 132 |
* Exported functions |
132 | 133 |
*/ |
133 | 134 |
static cmd_export_t cmds[] = { |
134 |
- {"jab_send_message", xj_send_message, 0, 0}, |
|
135 |
- {"jab_join_jconf", xj_join_jconf, 0, 0}, |
|
136 |
- {"jab_exit_jconf", xj_exit_jconf, 0, 0}, |
|
137 |
- {"jab_go_online", xj_go_online, 0, 0}, |
|
138 |
- {"jab_go_offline", xj_go_offline, 0, 0}, |
|
139 |
- {"jab_register_watcher", (cmd_function)xj_register_watcher, XJ_NO_SCRIPT_F, 0}, |
|
140 |
- {"jab_unregister_watcher", (cmd_function)xj_unregister_watcher, XJ_NO_SCRIPT_F, 0}, |
|
141 |
- {"load_xjab", (cmd_function)load_xjab, XJ_NO_SCRIPT_F, 0}, |
|
142 |
- {0, 0, 0, 0} |
|
135 |
+ {"jab_send_message", xj_send_message, 0, 0, REQUEST_ROUTE}, |
|
136 |
+ {"jab_join_jconf", xj_join_jconf, 0, 0, REQUEST_ROUTE}, |
|
137 |
+ {"jab_exit_jconf", xj_exit_jconf, 0, 0, REQUEST_ROUTE}, |
|
138 |
+ {"jab_go_online", xj_go_online, 0, 0, REQUEST_ROUTE}, |
|
139 |
+ {"jab_go_offline", xj_go_offline, 0, 0, REQUEST_ROUTE}, |
|
140 |
+ {"jab_register_watcher", (cmd_function)xj_register_watcher, XJ_NO_SCRIPT_F, 0, 0 }, |
|
141 |
+ {"jab_unregister_watcher", (cmd_function)xj_unregister_watcher, XJ_NO_SCRIPT_F, 0, 0 }, |
|
142 |
+ {"load_xjab", (cmd_function)load_xjab, XJ_NO_SCRIPT_F, 0, 0 }, |
|
143 |
+ {0, 0, 0, 0, 0} |
|
143 | 144 |
}; |
144 | 145 |
|
145 | 146 |
|
... | ... |
@@ -31,6 +31,7 @@ |
31 | 31 |
* History: |
32 | 32 |
* -------- |
33 | 33 |
* 2003-03-11 updated to the new module interface (andrei) |
34 |
+ * 2003-03-16 flags export parameter added (janakj) |
|
34 | 35 |
*/ |
35 | 36 |
|
36 | 37 |
|
... | ... |
@@ -51,8 +52,8 @@ static int mod_init(void); |
51 | 52 |
|
52 | 53 |
static cmd_export_t cmds[]={ |
53 | 54 |
{"mf_process_maxfwd_header", w_process_maxfwd_header, 1, |
54 |
- fixup_maxfwd_header }, |
|
55 |
- {0,0,0,0} |
|
55 |
+ fixup_maxfwd_header, REQUEST_ROUTE}, |
|
56 |
+ {0,0,0,0,0} |
|
56 | 57 |
}; |
57 | 58 |
|
58 | 59 |
|
... | ... |
@@ -31,6 +31,7 @@ |
31 | 31 |
* 2003-01-23 switched from t_uac to t_uac_dlg, by dcm |
32 | 32 |
* 2003-03-11 updated to the new module interface (andrei) |
33 | 33 |
* removed non-constant intializers to some strs (andrei) |
34 |
+ * 2003-03-16 flags parameter added (janakj) |
|
34 | 35 |
*/ |
35 | 36 |
|
36 | 37 |
#include <stdio.h> |
... | ... |
@@ -152,9 +153,9 @@ static void m_tm_callback( struct cell *t, struct sip_msg *msg, |
152 | 153 |
int code, void *param); |
153 | 154 |
|
154 | 155 |
static cmd_export_t cmds[]={ |
155 |
- {"m_store", m_store, 0, 0}, |
|
156 |
- {"m_dump", m_dump, 0, 0}, |
|
157 |
- {0,0,0,0} |
|
156 |
+ {"m_store", m_store, 0, 0, REQUEST_ROUTE}, |
|
157 |
+ {"m_dump", m_dump, 0, 0, REQUEST_ROUTE}, |
|
158 |
+ {0,0,0,0,0} |
|
158 | 159 |
}; |
159 | 160 |
|
160 | 161 |
|
... | ... |
@@ -30,6 +30,7 @@ |
30 | 30 |
* History: |
31 | 31 |
* -------- |
32 | 32 |
* 2003-03-11 updated to the new module exports interface (andrei) |
33 |
+ * 2003-03-16 flags export parameter added (janakj) |
|
33 | 34 |
*/ |
34 | 35 |
|
35 | 36 |
#include <stdio.h> |
... | ... |
@@ -46,16 +47,16 @@ static int mod_init(void); |
46 | 47 |
|
47 | 48 |
|
48 | 49 |
static cmd_export_t cmds[]={ |
49 |
- {"~db_use_table", (cmd_function)use_table, 2, 0}, |
|
50 |
- {"~db_init", (cmd_function)db_init, 1, 0}, |
|
51 |
- {"~db_close", (cmd_function)db_close, 2, 0}, |
|
52 |
- {"~db_query", (cmd_function)db_query, 2, 0}, |
|
53 |
- {"~db_raw_query", (cmd_function)db_raw_query, 2, 0}, |
|
54 |
- {"~db_free_query", (cmd_function)db_free_query, 2, 0}, |
|
55 |
- {"~db_insert", (cmd_function)db_insert, 2, 0}, |
|
56 |
- {"~db_delete", (cmd_function)db_delete, 2, 0}, |
|
57 |
- {"~db_update", (cmd_function)db_update, 2, 0}, |
|
58 |
- {0,0,0,0} |
|
50 |
+ {"~db_use_table", (cmd_function)use_table, 2, 0, 0}, |
|
51 |
+ {"~db_init", (cmd_function)db_init, 1, 0, 0}, |
|
52 |
+ {"~db_close", (cmd_function)db_close, 2, 0, 0}, |
|
53 |
+ {"~db_query", (cmd_function)db_query, 2, 0, 0}, |
|
54 |
+ {"~db_raw_query", (cmd_function)db_raw_query, 2, 0, 0}, |
|
55 |
+ {"~db_free_query", (cmd_function)db_free_query, 2, 0, 0}, |
|
56 |
+ {"~db_insert", (cmd_function)db_insert, 2, 0, 0}, |
|
57 |
+ {"~db_delete", (cmd_function)db_delete, 2, 0, 0}, |
|
58 |
+ {"~db_update", (cmd_function)db_update, 2, 0, 0}, |
|
59 |
+ {0,0,0,0,0} |
|
59 | 60 |
}; |
60 | 61 |
|
61 | 62 |
|
... | ... |
@@ -28,6 +28,7 @@ |
28 | 28 |
*/ |
29 | 29 |
/* |
30 | 30 |
* 2003-03-11 updated to the new module exports interface (andrei) |
31 |
+ * 2003-03-16 flags export parameter added (janakj) |
|
31 | 32 |
*/ |
32 | 33 |
|
33 | 34 |
|
... | ... |
@@ -49,8 +50,8 @@ static int default_expires = 3600; |
49 | 50 |
static struct tm_binds tmb; |
50 | 51 |
|
51 | 52 |
static cmd_export_t cmds[]={ |
52 |
- {"subscribe", subscribe, 1, subscribe_fixup}, |
|
53 |
- {0,0,0,0} |
|
53 |
+ {"subscribe", subscribe, 1, subscribe_fixup, REQUEST_ROUTE}, |
|
54 |
+ {0,0,0,0,0} |
|
54 | 55 |
}; |
55 | 56 |
|
56 | 57 |
static param_export_t params[]={ |
... | ... |
@@ -32,6 +32,7 @@ |
32 | 32 |
* 2003-03-11 updated to the new module exports interface (andrei) |
33 | 33 |
* 2003-03-11 converted to the new locking interface: locking.h -- |
34 | 34 |
* major changes (andrei) |
35 |
+ * 2003-03-16 flags export parameter added (janakj) |
|
35 | 36 |
*/ |
36 | 37 |
|
37 | 38 |
|
... | ... |
@@ -70,8 +71,8 @@ struct pike_timer_head *timer; |
70 | 71 |
|
71 | 72 |
|
72 | 73 |
static cmd_export_t cmds[]={ |
73 |
- {"pike_check_req", pike_check_req, 0, 0}, |
|
74 |
- {0,0,0,0} |
|
74 |
+ {"pike_check_req", pike_check_req, 0, 0, REQUEST_ROUTE}, |
|
75 |
+ {0,0,0,0,0} |
|
75 | 76 |
}; |
76 | 77 |
|
77 | 78 |
static param_export_t params[]={ |
... | ... |
@@ -30,6 +30,7 @@ |
30 | 30 |
* History: |
31 | 31 |
* -------- |
32 | 32 |
* 2003-03-10 module export interface updated to the new format (andrei) |
33 |
+ * 2003-03-11 flags export parameter added (janakj) |
|
33 | 34 |
*/ |
34 | 35 |
|
35 | 36 |
|
... | ... |
@@ -46,11 +47,16 @@ char* str_param; |
46 | 47 |
int int_param; |
47 | 48 |
|
48 | 49 |
|
49 |
-static cmd_export_t cmds[]={ {"print", print_f, 1, 0}, {0, 0, 0, 0} }; |
|
50 |
+static cmd_export_t cmds[]={ |
|
51 |
+ {"print", print_f, 1, 0, REQUEST_ROUTE}, |
|
52 |
+ {0, 0, 0, 0, 0} |
|
53 |
+}; |
|
50 | 54 |
|
51 |
-static param_export_t params[]={ {"str_param", STR_PARAM, &str_param}, |
|
52 |
- {"int_param", INT_PARAM, &int_param}, |
|
53 |
- {0,0,0} }; |
|
55 |
+static param_export_t params[]={ |
|
56 |
+ {"str_param", STR_PARAM, &str_param}, |
|
57 |
+ {"int_param", INT_PARAM, &int_param}, |
|
58 |
+ {0,0,0} |
|
59 |
+}; |
|
54 | 60 |
|
55 | 61 |
struct module_exports exports = { |
56 | 62 |
"print_stdout", |
... | ... |
@@ -29,6 +29,7 @@ |
29 | 29 |
/* History: |
30 | 30 |
* -------- |
31 | 31 |
* 2003-03-11 updated to the new module exports interface (andrei) |
32 |
+ * 2003-03-16 flags export parameter added (janakj) |
|
32 | 33 |
*/ |
33 | 34 |
|
34 | 35 |
|
... | ... |
@@ -99,8 +100,8 @@ static void rad_acc_onreq( struct cell* t, struct sip_msg *msg, |
99 | 100 |
|
100 | 101 |
|
101 | 102 |
static cmd_exports_t cmds[]={ |
102 |
- {"rad_acc_request", rad_acc_request, 1, 0 }, |
|
103 |
- {0,0,0,0} |
|
103 |
+ {"rad_acc_request", rad_acc_request, 1, 0, REQUEST_ROUTE}, |
|
104 |
+ {0,0,0,0,0} |
|
104 | 105 |
}; |
105 | 106 |
|
106 | 107 |
static param_exports_t params[]={ |
... | ... |
@@ -30,6 +30,7 @@ |
30 | 30 |
* History: |
31 | 31 |
* -------- |
32 | 32 |
* 2003-03-11 updated to the new module exports interface (andrei) |
33 |
+ * 2003-03-16 flags export parameter added (janakj) |
|
33 | 34 |
*/ |
34 | 35 |
|
35 | 36 |
|
... | ... |
@@ -63,9 +64,9 @@ float def_q; /* default_q converted to float in mod_init */ |
63 | 64 |
int (*sl_reply)(struct sip_msg* _m, char* _s1, char* _s2); |
64 | 65 |
|
65 | 66 |
static cmd_export_t cmds[]={ |
66 |
- {"save", save, 1, domain_fixup}, |
|
67 |
- {"lookup", lookup, 1, domain_fixup}, |
|
68 |
- {0,0,0,0} |
|
67 |
+ {"save", save, 1, domain_fixup, REQUEST_ROUTE}, |
|
68 |
+ {"lookup", lookup, 1, domain_fixup, REQUEST_ROUTE}, |
|
69 |
+ {0,0,0,0,0} |
|
69 | 70 |
}; |
70 | 71 |
|
71 | 72 |
static param_export_t params[]={ |
... | ... |
@@ -29,6 +29,7 @@ |
29 | 29 |
/* History: |
30 | 30 |
* -------- |
31 | 31 |
* 2003-03-11 updated to the new module interface (andrei) |
32 |
+ * 2003-03-16 flags export parameter added (janakj) |
|
32 | 33 |
*/ |
33 | 34 |
|
34 | 35 |
|
... | ... |
@@ -55,10 +56,10 @@ static int int_fixup(void** param, int param_no); |
55 | 56 |
* Exported functions |
56 | 57 |
*/ |
57 | 58 |
static cmd_export_t cmds[]={ |
58 |
- {"loose_route", loose_route, 0, 0 }, |
|
59 |
- {"strict_route", strict_route, 0, 0 }, |
|
60 |
- {"record_route", record_route, 1, int_fixup}, |
|
61 |
- {0,0,0,0} |
|
59 |
+ {"loose_route", loose_route, 0, 0, REQUEST_ROUTE}, |
|
60 |
+ {"strict_route", strict_route, 0, 0, REQUEST_ROUTE}, |
|
61 |
+ {"record_route", record_route, 1, int_fixup, REQUEST_ROUTE}, |
|
62 |
+ {0,0,0,0,0} |
|
62 | 63 |
}; |
63 | 64 |
|
64 | 65 |
|
... | ... |
@@ -51,6 +51,7 @@ |
51 | 51 |
* History: |
52 | 52 |
* -------- |
53 | 53 |
* 2003-03-11 updated to the new module exports interface (andrei) |
54 |
+ * 2003-03-16 flags export parameter added (janakj) |
|
54 | 55 |
*/ |
55 | 56 |
|
56 | 57 |
|
... | ... |
@@ -75,9 +76,9 @@ static void mod_destroy(); |
75 | 76 |
|
76 | 77 |
|
77 | 78 |
static cmd_export_t cmds[]={ |
78 |
- {"sl_send_reply", w_sl_send_reply, 2, fixup_sl_send_reply}, |
|
79 |
- {"sl_reply_error", w_sl_reply_error, 0, 0}, |
|
80 |
- {0,0,0,0} |
|
79 |
+ {"sl_send_reply", w_sl_send_reply, 2, fixup_sl_send_reply, REQUEST_ROUTE}, |
|
80 |
+ {"sl_reply_error", w_sl_reply_error, 0, 0, REQUEST_ROUTE}, |
|
81 |
+ {0,0,0,0,0} |
|
81 | 82 |
}; |
82 | 83 |
|
83 | 84 |
|
... | ... |
@@ -29,6 +29,7 @@ |
29 | 29 |
* History: |
30 | 30 |
* -------- |
31 | 31 |
* 2003-03-11 updated to the new module exports interface (andrei) |
32 |
+ * 2003-03-16 flags export parameter added (janakj) |
|
32 | 33 |
*/ |
33 | 34 |
|
34 | 35 |
|
... | ... |
@@ -79,10 +80,11 @@ struct tm_binds tmb; |
79 | 80 |
|
80 | 81 |
|
81 | 82 |
static cmd_export_t cmds[]={ |
82 |
- {"sms_send_msg_to_net", w_sms_send_msg_to_net, 1, |
|
83 |
- fixup_sms_send_msg_to_net }, |
|
84 |
- {"sms_send_msg", w_sms_send_msg, 0, 0}, |
|
85 |
- {0,0,0,0} |
|
83 |
+ {"sms_send_msg_to_net", w_sms_send_msg_to_net, 1, |
|
84 |
+ fixup_sms_send_msg_to_net, REQUEST_ROUTE}, |
|
85 |
+ {"sms_send_msg", w_sms_send_msg, 0, |
|
86 |
+ 0, REQUEST_ROUTE}, |
|
87 |
+ {0,0,0,0,0} |
|
86 | 88 |
}; |
87 | 89 |
|
88 | 90 |
|
... | ... |
@@ -44,6 +44,7 @@ |
44 | 44 |
* 2003-01-28 scratchpad removed (jiri) |
45 | 45 |
* 2003-01-18 append_urihf introduced (jiri) |
46 | 46 |
* 2003-03-10 module export interface updated to the new format (andrei) |
47 |
+ * 2003-03-16 flags export parameter added (janakj) |
|
47 | 48 |
*/ |
48 | 49 |
|
49 | 50 |
|
... | ... |
@@ -78,14 +79,14 @@ static int mod_init(void); |
78 | 79 |
|
79 | 80 |
|
80 | 81 |
static cmd_export_t cmds[]={ |
81 |
- {"search", search_f, 1, fixup_regex}, |
|
82 |
- {"search_append", search_append_f, 2, fixup_regex}, |
|
83 |
- {"replace", replace_f, 2, fixup_regex}, |
|
84 |
- {"replace_all", replace_all_f, 2, fixup_regex}, |
|
85 |
- {"append_to_reply", append_to_reply_f, 1, 0 }, |
|
86 |
- {"append_hf", append_hf, 1, str_fixup }, |
|
87 |
- {"append_urihf", append_urihf, 2, str_fixup }, |
|
88 |
- {0,0,0,0} |
|
82 |
+ {"search", search_f, 1, fixup_regex, REQUEST_ROUTE}, |
|
83 |
+ {"search_append", search_append_f, 2, fixup_regex, REQUEST_ROUTE}, |
|
84 |
+ {"replace", replace_f, 2, fixup_regex, REQUEST_ROUTE}, |
|
85 |
+ {"replace_all", replace_all_f, 2, fixup_regex, REQUEST_ROUTE}, |
|
86 |
+ {"append_to_reply", append_to_reply_f, 1, 0, REQUEST_ROUTE}, |
|
87 |
+ {"append_hf", append_hf, 1, str_fixup, REQUEST_ROUTE}, |
|
88 |
+ {"append_urihf", append_urihf, 2, str_fixup, REQUEST_ROUTE}, |
|
89 |
+ {0,0,0,0,0} |
|
89 | 90 |
}; |
90 | 91 |
|
91 | 92 |
static param_export_t params[]={ {0,0,0} }; /* no params */ |
... | ... |
@@ -29,6 +29,7 @@ |
29 | 29 |
* History: |
30 | 30 |
* ------- |
31 | 31 |
* 2003-03-11: New module interface (janakj) |
32 |
+ * 2003-03-16: flags export parameter added (janakj) |
|
32 | 33 |
*/ |
33 | 34 |
|
34 | 35 |
|
... | ... |
@@ -71,11 +72,11 @@ db_con_t* db_handle = 0; /* Database connection handle */ |
71 | 72 |
* Exported functions |
72 | 73 |
*/ |
73 | 74 |
static cmd_export_t cmds[] = { |
74 |
- {"is_user", is_user, 1, str_fixup}, |
|
75 |
- {"check_to", check_to, 0, 0 }, |
|
76 |
- {"check_from", check_from, 0, 0 }, |
|
77 |
- {"does_uri_exist", does_uri_exist, 0, 0 }, |
|
78 |
- {0, 0, 0, 0} |
|
75 |
+ {"is_user", is_user, 1, str_fixup, REQUEST_ROUTE}, |
|
76 |
+ {"check_to", check_to, 0, 0, REQUEST_ROUTE}, |
|
77 |
+ {"check_from", check_from, 0, 0, REQUEST_ROUTE}, |
|
78 |
+ {"does_uri_exist", does_uri_exist, 0, 0, REQUEST_ROUTE}, |
|
79 |
+ {0, 0, 0, 0, 0} |
|
79 | 80 |
}; |
80 | 81 |
|
81 | 82 |
|
... | ... |
@@ -29,6 +29,7 @@ |
29 | 29 |
* History: |
30 | 30 |
* -------- |
31 | 31 |
* 2003-03-15 - created by janakj |
32 |
+ * 2003-03-16 - flags export parameter added (janakj) |
|
32 | 33 |
*/ |
33 | 34 |
|
34 | 35 |
#include <radiusclient.h> |
... | ... |
@@ -51,8 +52,8 @@ char* radius_config = "/usr/local/etc/radiusclient/radiusclient.conf"; |
51 | 52 |
* Exported functions |
52 | 53 |
*/ |
53 | 54 |
static cmd_export_t cmds[] = { |
54 |
- {"radius_does_uri_exist", radius_does_uri_exist, 0, 0}, |
|
55 |
- {0, 0, 0, 0} |
|
55 |
+ {"radius_does_uri_exist", radius_does_uri_exist, 0, 0, REQUEST_ROUTE}, |
|
56 |
+ {0, 0, 0, 0, 0} |
|
56 | 57 |
}; |
57 | 58 |
|
58 | 59 |
|
... | ... |
@@ -32,6 +32,7 @@ |
32 | 32 |
* 2003-01-27 timer activity printing #ifdef-ed to EXTRA_DEBUG (jiri) |
33 | 33 |
* 2003-03-11 New module interface (janakj) |
34 | 34 |
* 2003-03-12 added replication and state columns (nils) |
35 |
+ * 2003-03-16 flags export parameter added (janakj) |
|
35 | 36 |
*/ |
36 | 37 |
|
37 | 38 |
|
... | ... |
@@ -80,20 +81,20 @@ db_con_t* db; /* Database connection handle */ |
80 | 81 |
* Exported functions |
81 | 82 |
*/ |
82 | 83 |
static cmd_export_t cmds[] = { |
83 |
- {"~ul_register_udomain", (cmd_function)register_udomain, 1, 0}, |
|
84 |
- {"~ul_insert_urecord", (cmd_function)insert_urecord, 1, 0}, |
|
85 |
- {"~ul_delete_urecord", (cmd_function)delete_urecord, 1, 0}, |
|
86 |
- {"~ul_get_urecord", (cmd_function)get_urecord, 1, 0}, |
|
87 |
- {"~ul_lock_udomain", (cmd_function)lock_udomain, 1, 0}, |
|
88 |
- {"~ul_unlock_udomain", (cmd_function)unlock_udomain, 1, 0}, |
|
89 |
- {"~ul_release_urecord", (cmd_function)release_urecord, 1, 0}, |
|
90 |
- {"~ul_insert_ucontact", (cmd_function)insert_ucontact, 1, 0}, |
|
91 |
- {"~ul_delete_ucontact", (cmd_function)delete_ucontact, 1, 0}, |
|
92 |
- {"~ul_get_ucontact", (cmd_function)get_ucontact, 1, 0}, |
|
93 |
- {"~ul_update_ucontact", (cmd_function)update_ucontact, 1, 0}, |
|
94 |
- {"~ul_register_watcher", (cmd_function)register_watcher, 1, 0}, |
|
95 |
- {"~ul_unregister_watcher", (cmd_function)unregister_watcher, 1, 0}, |
|
96 |
- {0, 0, 0, 0} |
|
84 |
+ {"~ul_register_udomain", (cmd_function)register_udomain, 1, 0, 0}, |
|
85 |
+ {"~ul_insert_urecord", (cmd_function)insert_urecord, 1, 0, 0}, |
|
86 |
+ {"~ul_delete_urecord", (cmd_function)delete_urecord, 1, 0, 0}, |
|
87 |
+ {"~ul_get_urecord", (cmd_function)get_urecord, 1, 0, 0}, |
|
88 |
+ {"~ul_lock_udomain", (cmd_function)lock_udomain, 1, 0, 0}, |
|
89 |
+ {"~ul_unlock_udomain", (cmd_function)unlock_udomain, 1, 0, 0}, |
|
90 |
+ {"~ul_release_urecord", (cmd_function)release_urecord, 1, 0, 0}, |
|
91 |
+ {"~ul_insert_ucontact", (cmd_function)insert_ucontact, 1, 0, 0}, |
|
92 |
+ {"~ul_delete_ucontact", (cmd_function)delete_ucontact, 1, 0, 0}, |
|
93 |
+ {"~ul_get_ucontact", (cmd_function)get_ucontact, 1, 0, 0}, |
|
94 |
+ {"~ul_update_ucontact", (cmd_function)update_ucontact, 1, 0, 0}, |
|
95 |
+ {"~ul_register_watcher", (cmd_function)register_watcher, 1, 0, 0}, |
|
96 |
+ {"~ul_unregister_watcher", (cmd_function)unregister_watcher, 1, 0, 0}, |
|
97 |
+ {0, 0, 0, 0, 0} |
|
97 | 98 |
}; |
98 | 99 |
|
99 | 100 |
|
... | ... |
@@ -27,6 +27,7 @@ |
27 | 27 |
* History: |
28 | 28 |
* ------- |
29 | 29 |
* 2003-03-11 New module interface (janakj) |
30 |
+ * 2003-03-16 flags export parameter added (janakj) |
|
30 | 31 |
*/ |
31 | 32 |
|
32 | 33 |
#include "../../fifo_server.h" |
... | ... |
@@ -81,9 +82,9 @@ db_con_t* db_handle = 0; |
81 | 82 |
* Exported functions |
82 | 83 |
*/ |
83 | 84 |
static cmd_export_t cmds[] = { |
84 |
- {"vm_start", vm_start, 1, 0}, |
|
85 |
- {"vm_stop", vm_stop, 1, 0}, |
|
86 |
- {0, 0, 0, 0} |
|
85 |
+ {"vm_start", vm_start, 1, 0, REQUEST_ROUTE}, |
|
86 |
+ {"vm_stop", vm_stop, 1, 0, REQUEST_ROUTE}, |
|
87 |
+ {0, 0, 0, 0, 0} |
|
87 | 88 |
}; |
88 | 89 |
|
89 | 90 |
|