Browse code

modules/tsilo: removed MI commands (revert commit a255911902788bf74a7f4279fce4758b2f2a4613)

Federico Cabiddu authored on 13/11/2014 13:41:07
Showing 4 changed files
... ...
@@ -15,7 +15,4 @@ ifeq ($(INSTALL_FLAVOUR),kamailio)
15 15
 DEFS+= -DWITH_EVENT_LOCAL_REQUEST
16 16
 endif # INSTALL_FLAVOUR
17 17
 
18
-SERLIBPATH=../../lib
19
-SER_LIBS+=$(SERLIBPATH)/kmi/kmi
20
-
21 18
 include ../../Makefile.modules
... ...
@@ -33,15 +33,10 @@ Federico Cabiddu
33 33
               4.2. ts_append(domain, ruri)
34 34
               4.3. ts_append_to(tindex, tlabel, domain)
35 35
 
36
-        5. MI Commands
36
+        5. Exported RPC Functions
37 37
 
38
-              5.1. ts_dump
39
-              5.2. ts_lookup
40
-
41
-        6. Exported RPC Functions
42
-
43
-              6.1. ts.dump
44
-              6.2. ts.lookup
38
+              5.1. ts.dump
39
+              5.2. ts.lookup
45 40
 
46 41
    List of Examples
47 42
 
... ...
@@ -70,15 +65,10 @@ Chapter 1. Admin Guide
70 65
         4.2. ts_append(domain, ruri)
71 66
         4.3. ts_append_to(tindex, tlabel, domain)
72 67
 
73
-   5. MI Commands
74
-
75
-        5.1. ts_dump
76
-        5.2. ts_lookup
77
-
78
-   6. Exported RPC Functions
68
+   5. Exported RPC Functions
79 69
 
80
-        6.1. ts.dump
81
-        6.2. ts.lookup
70
+        5.1. ts.dump
71
+        5.2. ts.lookup
82 72
 
83 73
 1. Overview
84 74
 
... ...
@@ -202,33 +192,12 @@ if (is_method("REGISTER")) {
202 192
 }
203 193
 ...
204 194
 
205
-5. MI Commands
206
-
207
-   5.1. ts_dump
208
-   5.2. ts_lookup
209
-
210
-5.1.  ts_dump
211
-
212
-   Dumps the entire content of the TSILO table
213
-
214
-   Parameters:
215
-     * brief - (optional, may not be present); if equals to string
216
-       "brief", a brief dump will be done (only RURI, without the
217
-       transaction(s) details)
218
-
219
-5.2.  ts_lookup
220
-
221
-   Dumps the transactions stored for the given RURI
222
-
223
-   Parameters:
224
-     * ruri - RURI for which we want to show the transactions.
225
-
226
-6. Exported RPC Functions
195
+5. Exported RPC Functions
227 196
 
228
-   6.1. ts.dump
229
-   6.2. ts.lookup
197
+   5.1. ts.dump
198
+   5.2. ts.lookup
230 199
 
231
-6.1. ts.dump
200
+5.1. ts.dump
232 201
 
233 202
    Dumps the content of the TSILO table
234 203
 
... ...
@@ -237,7 +206,7 @@ if (is_method("REGISTER")) {
237 206
    RPC Command Format:
238 207
                         kamcmd ts.dump
239 208
 
240
-6.2. ts.lookup
209
+5.2. ts.lookup
241 210
 
242 211
    Dumps the transactions stored for the given RURI
243 212
 
... ...
@@ -198,39 +198,6 @@ if (is_method("REGISTER")) {
198 198
 	</section>
199 199
 	</section>
200 200
 
201
-	<section>
202
-		<title>MI Commands</title>
203
-		<section id="tsilo.mi.ts_dump">
204
-			<title>
205
-			<function moreinfo="none">ts_dump</function>
206
-			</title>
207
-			<para>
208
-			Dumps the entire content of the TSILO table
209
-			</para>
210
-			<para>Parameters: </para>
211
-			<itemizedlist>
212
-				<listitem><para>
213
-					<emphasis>brief</emphasis> - (optional, may not be present); if
214
-					equals to string <quote>brief</quote>, a brief dump will be
215
-					done (only RURI, without the transaction(s) details)
216
-				</para></listitem>
217
-			</itemizedlist>
218
-		</section>
219
-		<section id="tsilo.mi.ts_lookup">
220
-			<title>
221
-			<function moreinfo="none">ts_lookup</function>
222
-			</title>
223
-			<para>
224
-			Dumps the transactions stored for the given RURI
225
-			</para>
226
-			<para>Parameters: </para>
227
-			<itemizedlist>
228
-				<listitem><para>
229
-					<emphasis>ruri</emphasis> - RURI for which we want to show the transactions.
230
-				</para></listitem>
231
-			</itemizedlist>
232
-		</section>
233
-	</section>
234 201
 	<section>
235 202
 	<title>Exported RPC Functions</title>
236 203
 		<section>
... ...
@@ -33,12 +33,13 @@
33 33
 #include "../../modules/registrar/api.h"
34 34
 #include "../../dset.h"
35 35
 #include "../../lib/kmi/mi.h"
36
+#include "../../rpc_lookup.h"
36 37
 
37 38
 #include "ts_hash.h"
38 39
 #include "ts_handlers.h"
39 40
 #include "ts_append.h"
40 41
 #include "ts_store.h"
41
-#include "ts_mi.h"
42
+#include "ts_rpc.h"
42 43
 
43 44
 MODULE_VERSION
44 45
 
... ...
@@ -71,12 +72,6 @@ static cmd_export_t cmds[]={
71 72
 	{0,0,0,0,0}
72 73
 };
73 74
 
74
-static mi_export_t mi_cmds[] = {
75
-	{ "ts_dump",		mi_tsilo_dump,		0,	0,	0 },
76
-	{ "ts_lookup",		mi_tsilo_lookup,	0,	0,	0 },
77
-    { 0, 0, 0, 0, 0}
78
-};
79
-
80 75
 static param_export_t params[]={
81 76
 	{"hash_size",	INT_PARAM,	&hash_size},
82 77
 	{0,0,0}
... ...
@@ -90,7 +85,7 @@ struct module_exports exports= {
90 85
 	cmds,
91 86
 	params,
92 87
 	0, /* exported statistics */
93
-    mi_cmds,    /* exported MI functions */
88
+    0,    /* exported MI functions */
94 89
     0,
95 90
     0,
96 91
 	mod_init,   /* module initialization function */
... ...
@@ -106,13 +101,12 @@ static int mod_init(void)
106 101
 {
107 102
 	unsigned int n;
108 103
 
109
-	/* register the MI commands */
110
-	if(register_mi_mod(exports.name, mi_cmds)!=0)
104
+	/* register the RPC methods */
105
+	if(rpc_register_array(rpc_methods)!=0)
111 106
     {
112
-        LM_ERR("failed to register MI commands\n");
107
+        LM_ERR("failed to register RPC commands\n");
113 108
         return -1;
114 109
     }
115
-
116 110
 	/* load the TM API */
117 111
 	if (load_tm_api(&_tmb)!=0) {
118 112
 		LM_ERR("can't load TM API\n");