1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,73 +0,0 @@ |
1 |
-/* |
|
2 |
- * $Id$ |
|
3 |
- * |
|
4 |
- * Copyright (C) 2007 Elena-Ramona Modroiu |
|
5 |
- * |
|
6 |
- * This file is part of Kamailio, a free SIP server. |
|
7 |
- * |
|
8 |
- * Kamailio is free software; you can redistribute it and/or modify |
|
9 |
- * it under the terms of the GNU General Public License as published by |
|
10 |
- * the Free Software Foundation; either version 2 of the License, or |
|
11 |
- * (at your option) any later version |
|
12 |
- * |
|
13 |
- * Kamailio is distributed in the hope that it will be useful, |
|
14 |
- * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
- * GNU General Public License for more details. |
|
17 |
- * |
|
18 |
- * You should have received a copy of the GNU General Public License |
|
19 |
- * along with this program; if not, write to the Free Software |
|
20 |
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
- * |
|
22 |
- */ |
|
23 |
- |
|
24 |
-#ifndef _SHVAR_H_ |
|
25 |
-#define _SHVAR_H_ |
|
26 |
- |
|
27 |
-#include "../../sr_module.h" |
|
28 |
-#include "../../locking.h" |
|
29 |
-#include "../../lib/kmi/mi.h" |
|
30 |
-#include "pv_svar.h" |
|
31 |
- |
|
32 |
-typedef struct sh_var { |
|
33 |
- int n; /* Index of the variable */ |
|
34 |
- str name; /* Name of the variable */ |
|
35 |
- script_val_t v; /* Value of the variable */ |
|
36 |
-#ifdef GEN_LOCK_T_PREFERED |
|
37 |
- gen_lock_t *lock; /* Lock for hash entry - fastlock */ |
|
38 |
-#else |
|
39 |
- int lockidx; /* Lock index for hash entry - the rest*/ |
|
40 |
-#endif |
|
41 |
- struct sh_var *next; |
|
42 |
-} sh_var_t, *sh_var_p; |
|
43 |
- |
|
44 |
-sh_var_t* set_shvar_value(sh_var_t *shv, int_str *value, int flags); |
|
45 |
-sh_var_t* get_shvar_by_name(str *name); |
|
46 |
- |
|
47 |
-void reset_shvars(void); |
|
48 |
-void destroy_shvars(void); |
|
49 |
- |
|
50 |
-#ifndef GEN_LOCK_T_PREFERED |
|
51 |
-void shvar_lock_idx(int idx); |
|
52 |
-void shvar_release_idx(int idx); |
|
53 |
-#endif |
|
54 |
- |
|
55 |
-void lock_shvar(sh_var_t *shv); |
|
56 |
-void unlock_shvar(sh_var_t *shv); |
|
57 |
- |
|
58 |
-int pv_parse_shvar_name(pv_spec_p sp, str *in); |
|
59 |
-int pv_get_shvar(struct sip_msg *msg, pv_param_t *param, pv_value_t *res); |
|
60 |
-int pv_set_shvar(struct sip_msg* msg, pv_param_t *param, int op, |
|
61 |
- pv_value_t *val); |
|
62 |
- |
|
63 |
-int shvar_init_locks(void); |
|
64 |
-void shvar_destroy_locks(void); |
|
65 |
- |
|
66 |
-struct mi_root* mi_shvar_get(struct mi_root* cmd_tree, void* param); |
|
67 |
-struct mi_root* mi_shvar_set(struct mi_root* cmd_tree, void* param); |
|
68 |
- |
|
69 |
-int param_set_var( modparam_t type, void* val); |
|
70 |
-int param_set_shvar( modparam_t type, void* val); |
|
71 |
- |
|
72 |
-#endif |
|
73 |
- |
- shv relies on early shm initialization
- got rid of hacks to define first in pkg and move in shm at mod_init
- fixes 3.0 specific issues reported by Andrey 'Krieger' Utkin
- closes FS#22
(cherry picked from commit b69e1c96bf65a4c4f8fa6bec28699607ea03e24d)
This patch updates the module to link with the shared library libkmi
which contains the management interface from kamailio and fixes
paths to headers in that library.
git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@5295 689a6050-402a-0410-94f2-e92a70836424
... | ... |
@@ -70,10 +70,5 @@ struct mi_root* mi_shvar_set(struct mi_root* cmd_tree, void* param); |
70 | 70 |
int param_set_var( modparam_t type, void* val); |
71 | 71 |
int param_set_shvar( modparam_t type, void* val); |
72 | 72 |
|
73 |
-/*** $time(name) PV class */ |
|
74 |
-int pv_parse_time_name(pv_spec_p sp, str *in); |
|
75 |
-int pv_get_time(struct sip_msg *msg, pv_param_t *param, |
|
76 |
- pv_value_t *res); |
|
77 |
- |
|
78 | 73 |
#endif |
79 | 74 |
|
git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@5291 689a6050-402a-0410-94f2-e92a70836424
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,79 @@ |
1 |
+/* |
|
2 |
+ * $Id$ |
|
3 |
+ * |
|
4 |
+ * Copyright (C) 2007 Elena-Ramona Modroiu |
|
5 |
+ * |
|
6 |
+ * This file is part of Kamailio, a free SIP server. |
|
7 |
+ * |
|
8 |
+ * Kamailio is free software; you can redistribute it and/or modify |
|
9 |
+ * it under the terms of the GNU General Public License as published by |
|
10 |
+ * the Free Software Foundation; either version 2 of the License, or |
|
11 |
+ * (at your option) any later version |
|
12 |
+ * |
|
13 |
+ * Kamailio is distributed in the hope that it will be useful, |
|
14 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 |
+ * GNU General Public License for more details. |
|
17 |
+ * |
|
18 |
+ * You should have received a copy of the GNU General Public License |
|
19 |
+ * along with this program; if not, write to the Free Software |
|
20 |
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
21 |
+ * |
|
22 |
+ */ |
|
23 |
+ |
|
24 |
+#ifndef _SHVAR_H_ |
|
25 |
+#define _SHVAR_H_ |
|
26 |
+ |
|
27 |
+#include "../../sr_module.h" |
|
28 |
+#include "../../locking.h" |
|
29 |
+#include "../../mi/mi.h" |
|
30 |
+#include "pv_svar.h" |
|
31 |
+ |
|
32 |
+typedef struct sh_var { |
|
33 |
+ int n; /* Index of the variable */ |
|
34 |
+ str name; /* Name of the variable */ |
|
35 |
+ script_val_t v; /* Value of the variable */ |
|
36 |
+#ifdef GEN_LOCK_T_PREFERED |
|
37 |
+ gen_lock_t *lock; /* Lock for hash entry - fastlock */ |
|
38 |
+#else |
|
39 |
+ int lockidx; /* Lock index for hash entry - the rest*/ |
|
40 |
+#endif |
|
41 |
+ struct sh_var *next; |
|
42 |
+} sh_var_t, *sh_var_p; |
|
43 |
+ |
|
44 |
+int init_shvars(void); |
|
45 |
+sh_var_t* set_shvar_value(sh_var_t *shv, int_str *value, int flags); |
|
46 |
+sh_var_t* get_shvar_by_name(str *name); |
|
47 |
+ |
|
48 |
+void reset_shvars(void); |
|
49 |
+void destroy_shvars(void); |
|
50 |
+ |
|
51 |
+#ifndef GEN_LOCK_T_PREFERED |
|
52 |
+void shvar_lock_idx(int idx); |
|
53 |
+void shvar_release_idx(int idx); |
|
54 |
+#endif |
|
55 |
+ |
|
56 |
+void lock_shvar(sh_var_t *shv); |
|
57 |
+void unlock_shvar(sh_var_t *shv); |
|
58 |
+ |
|
59 |
+int pv_parse_shvar_name(pv_spec_p sp, str *in); |
|
60 |
+int pv_get_shvar(struct sip_msg *msg, pv_param_t *param, pv_value_t *res); |
|
61 |
+int pv_set_shvar(struct sip_msg* msg, pv_param_t *param, int op, |
|
62 |
+ pv_value_t *val); |
|
63 |
+ |
|
64 |
+int shvar_init_locks(void); |
|
65 |
+void shvar_destroy_locks(void); |
|
66 |
+ |
|
67 |
+struct mi_root* mi_shvar_get(struct mi_root* cmd_tree, void* param); |
|
68 |
+struct mi_root* mi_shvar_set(struct mi_root* cmd_tree, void* param); |
|
69 |
+ |
|
70 |
+int param_set_var( modparam_t type, void* val); |
|
71 |
+int param_set_shvar( modparam_t type, void* val); |
|
72 |
+ |
|
73 |
+/*** $time(name) PV class */ |
|
74 |
+int pv_parse_time_name(pv_spec_p sp, str *in); |
|
75 |
+int pv_get_time(struct sip_msg *msg, pv_param_t *param, |
|
76 |
+ pv_value_t *res); |
|
77 |
+ |
|
78 |
+#endif |
|
79 |
+ |