Browse code

ser modules ported to sip-router

- added -DSER_MOD_INTERFACE to each module Makefile
- db:
- linked with srdb2 when needed
- fixed db includes path (../../lib/srdb2/*.h)
- fixed db constants
- fixed tm include path (../../modules/tm/*.h)

Andrei Pelinescu-Onciul authored on 15/04/2009 17:16:10
Showing 192 changed files
... ...
@@ -11,4 +11,8 @@ auto_gen=
11 11
 NAME=acc_db.so
12 12
 LIBS=
13 13
 
14
+DEFS+=-DSER_MOD_INTERFACE
15
+
16
+SERLIBPATH=../../lib
17
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
14 18
 include ../../Makefile.modules
... ...
@@ -36,16 +36,16 @@
36 36
 #include "../../sr_module.h"
37 37
 #include "../../dprint.h"
38 38
 #include "../../mem/mem.h"
39
-#include "../tm/t_hooks.h"
40
-#include "../tm/tm_load.h"
41
-#include "../tm/h_table.h"
39
+#include "../../modules/tm/t_hooks.h"
40
+#include "../../modules/tm/tm_load.h"
41
+#include "../../modules/tm/h_table.h"
42 42
 #include "../../parser/msg_parser.h"
43 43
 #include "../../parser/parse_from.h"
44 44
 #include "../../parser/digest/digest.h"
45 45
 #include "../../usr_avp.h"
46
-#include "../tm/tm_load.h"
46
+#include "../../modules/tm/tm_load.h"
47 47
 #include "../../usr_avp.h"
48
-#include "../../db/db.h"
48
+#include "../../lib/srdb2/db.h"
49 49
 #include "../../trim.h"
50 50
 #include "../../id.h"
51 51
 #include "../acc_syslog/attrs.h"
... ...
@@ -11,4 +11,6 @@ include ../../Makefile.radius
11 11
 auto_gen=
12 12
 NAME=acc_radius.so
13 13
 
14
+DEFS+=-DSER_MOD_INTERFACE
15
+
14 16
 include ../../Makefile.modules
... ...
@@ -38,15 +38,15 @@
38 38
 #include "../../sr_module.h"
39 39
 #include "../../dprint.h"
40 40
 #include "../../mem/mem.h"
41
-#include "../tm/t_hooks.h"
42
-#include "../tm/tm_load.h"
43
-#include "../tm/h_table.h"
41
+#include "../../modules/tm/t_hooks.h"
42
+#include "../../modules/tm/tm_load.h"
43
+#include "../../modules/tm/h_table.h"
44 44
 #include "../../parser/msg_parser.h"
45 45
 #include "../../parser/parse_from.h"
46 46
 #include "../../parser/digest/digest.h"
47 47
 #include "../../usr_avp.h"
48 48
 #include "../../id.h"
49
-#include "../tm/tm_load.h"
49
+#include "../../modules/tm/tm_load.h"
50 50
 
51 51
 #include "../../parser/parse_rr.h"
52 52
 #include "../../trim.h"
... ...
@@ -11,4 +11,6 @@ auto_gen=
11 11
 NAME=acc_syslog.so
12 12
 LIBS=
13 13
 
14
+DEFS+=-DSER_MOD_INTERFACE
15
+
14 16
 include ../../Makefile.modules
... ...
@@ -36,16 +36,16 @@
36 36
 #include "../../sr_module.h"
37 37
 #include "../../dprint.h"
38 38
 #include "../../mem/mem.h"
39
-#include "../tm/t_hooks.h"
40
-#include "../tm/tm_load.h"
41
-#include "../tm/h_table.h"
39
+#include "../../modules/tm/t_hooks.h"
40
+#include "../../modules/tm/tm_load.h"
41
+#include "../../modules/tm/h_table.h"
42 42
 #include "../../parser/msg_parser.h"
43 43
 #include "../../parser/parse_from.h"
44 44
 #include "../../parser/digest/digest.h"
45 45
 #include "../../usr_avp.h"
46 46
 #include "../../id.h"
47 47
 #include "attrs.h"
48
-#include "../tm/tm_load.h"
48
+#include "../../modules/tm/tm_load.h"
49 49
 
50 50
 /*
51 51
  * TODO:
... ...
@@ -14,4 +14,6 @@ LIBS=
14 14
 #       -DUSE_OT_NONCE - compile with one-time nonces support
15 15
 DEFS+=-DUSE_NC -DUSE_OT_NONCE
16 16
 
17
+DEFS+=-DSER_MOD_INTERFACE
18
+
17 19
 include ../../Makefile.modules
... ...
@@ -10,4 +10,8 @@ auto_gen=
10 10
 NAME=auth_db.so
11 11
 LIBS=
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
15
+SERLIBPATH=../../lib
16
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
13 17
 include ../../Makefile.modules
... ...
@@ -39,7 +39,7 @@
39 39
 #include <stdio.h>
40 40
 #include <string.h>
41 41
 #include "../../sr_module.h"
42
-#include "../../db/db.h"
42
+#include "../../lib/srdb2/db.h"
43 43
 #include "../../dprint.h"
44 44
 #include "../../error.h"
45 45
 #include "../../mem/mem.h"
... ...
@@ -32,7 +32,7 @@
32 32
 #define AUTHDB_MOD_H
33 33
 
34 34
 #include "../../str.h"
35
-#include "../../db/db.h"
35
+#include "../../lib/srdb2/db.h"
36 36
 #include "../auth/api.h"
37 37
 #include "../sl/sl.h"
38 38
 #include "../../parser/msg_parser.h"
... ...
@@ -40,7 +40,7 @@
40 40
 #include <string.h>
41 41
 #include "../../ut.h"
42 42
 #include "../../str.h"
43
-#include "../../db/db.h"
43
+#include "../../lib/srdb2/db.h"
44 44
 #include "../../dprint.h"
45 45
 #include "../../parser/digest/digest.h"
46 46
 #include "../../parser/hf.h"
... ...
@@ -91,10 +91,10 @@ static inline int get_ha1(struct username* username, str* did, str* realm,
91 91
 			LOG(L_ERR, "auth_db:get_ha1: Credentials for '%.*s'@'%.*s' contain NULL value, skipping\n",
92 92
 				username->user.len, ZSW(username->user.s), realm->len, ZSW(realm->s));
93 93
 		} else {
94
-			if ((*row)->fld[1].v.int4 & DB_DISABLED) {
94
+			if ((*row)->fld[1].v.int4 & SRDB_DISABLED) {
95 95
 				/* disabled rows ignored */
96 96
 			} else {
97
-				if ((*row)->fld[1].v.int4 & DB_LOAD_SER) {
97
+				if ((*row)->fld[1].v.int4 & SRDB_LOAD_SER) {
98 98
 					/* *row = i; */
99 99
 					break;
100 100
 				}
... ...
@@ -269,11 +269,11 @@ static inline int check_all_ha1(struct sip_msg* msg, struct hdr_field* hdr,
269 269
 			    dig->username.user.len, ZSW(dig->username.user.s), realm->len, ZSW(realm->s));
270 270
 		}
271 271
 		else {
272
-			if (row->fld[1].v.int4 & DB_DISABLED) {
272
+			if (row->fld[1].v.int4 & SRDB_DISABLED) {
273 273
 				/* disabled rows ignored */
274 274
 			}
275 275
 			else {
276
-				if (row->fld[1].v.int4 & DB_LOAD_SER) {
276
+				if (row->fld[1].v.int4 & SRDB_LOAD_SER) {
277 277
 					result.s = row->fld[0].v.cstr;
278 278
 					result.len = strlen(result.s);
279 279
 					if (calc_ha1) {
... ...
@@ -15,4 +15,6 @@ LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl -lcrypto -lcurl
15 15
 #
16 16
 #LIBS+= /usr/lib/libcurl.a /usr/lib/libssl.a /usr/lib/libcrypto.a -lkrb5 -lidn -lz -lgssapi_krb5
17 17
 
18
+DEFS+=-DSER_MOD_INTERFACE
19
+
18 20
 include ../../Makefile.modules
... ...
@@ -35,7 +35,7 @@
35 35
 #include "../../parser/keys.h"
36 36
 #include "../../parser/contact/parse_contact.h"
37 37
 
38
-#include "../tm/ut.h"
38
+#include "../../modules/tm/ut.h"
39 39
 #include "../../data_lump.h"
40 40
 #include "../../msg_translator.h"
41 41
 #include "auth_identity.h"
... ...
@@ -12,4 +12,6 @@ auto_gen=
12 12
 NAME=auth_radius.so
13 13
 
14 14
 
15
+DEFS+=-DSER_MOD_INTERFACE
16
+
15 17
 include ../../Makefile.modules
... ...
@@ -9,5 +9,7 @@ include ../../Makefile.defs
9 9
 auto_gen=
10 10
 NAME=avp.so
11 11
 
12
+DEFS+=-DSER_MOD_INTERFACE
13
+
12 14
 include ../../Makefile.modules
13 15
 
... ...
@@ -11,4 +11,8 @@ NAME=avp_db.so
11 11
 LIBS=
12 12
 DEFS += -Wall
13 13
 
14
+DEFS+=-DSER_MOD_INTERFACE
15
+
16
+SERLIBPATH=../../lib
17
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
14 18
 include ../../Makefile.modules
... ...
@@ -40,7 +40,7 @@
40 40
 #include "../../parser/parse_to.h"
41 41
 #include "../../parser/parse_uri.h"
42 42
 #include "../../str.h"
43
-#include "../../db/db.h"
43
+#include "../../lib/srdb2/db.h"
44 44
 #include "../../config.h"
45 45
 #include "../../usr_avp.h"
46 46
 #include "../../ut.h"
... ...
@@ -210,7 +210,7 @@ static void read_attrs(db_res_t *res, unsigned long flags)
210 210
 			continue;
211 211
 		}
212 212
 
213
-		if ((row->fld[3].v.int4 & DB_LOAD_SER) == 0) {
213
+		if ((row->fld[3].v.int4 & SRDB_LOAD_SER) == 0) {
214 214
 			row = db_next(res);
215 215
 			continue;
216 216
 		}
... ...
@@ -25,7 +25,7 @@
25 25
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
26 26
  */
27 27
 
28
-#include "../../db/db.h"
28
+#include "../../lib/srdb2/db.h"
29 29
 
30 30
 extern db_ctx_t* ctx;
31 31
 extern int auto_unlock;
... ...
@@ -299,7 +299,7 @@ static int read_avps(db_res_t *res, avp_flags_t flag) /* id must not be NULL */
299 299
 		get_str_val(row->fld[2], value);
300 300
 		get_int_val(row->fld[3], flags);
301 301
 
302
-		if (flags & DB_LOAD_SER) {
302
+		if (flags & SRDB_LOAD_SER) {
303 303
 			if (type == AVP_VAL_STR) val.s = value;
304 304
 			else str2int(&value, (unsigned int *)&val.n); /* FIXME */
305 305
 
... ...
@@ -3,7 +3,7 @@
3 3
 
4 4
 
5 5
 #include "../../parser/msg_parser.h"
6
-#include "../../db/db.h"
6
+#include "../../lib/srdb2/db.h"
7 7
 #include "../../sr_module.h"
8 8
 
9 9
 int declare_attr_group(modparam_t type, char* param);
... ...
@@ -13,4 +13,6 @@ NAME=avp_radius.so
13 13
 
14 14
 
15 15
 
16
+DEFS+=-DSER_MOD_INTERFACE
17
+
16 18
 include ../../Makefile.modules
... ...
@@ -10,4 +10,8 @@ auto_gen=
10 10
 NAME=avpops.so
11 11
 LIBS= 
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
15
+SERLIBPATH=../../lib
16
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
13 17
 include ../../Makefile.modules
... ...
@@ -36,7 +36,7 @@
36 36
 
37 37
 #include "../../mem/mem.h"
38 38
 #include "../../mem/shm_mem.h"
39
-#include "../../db/db.h"
39
+#include "../../lib/srdb2/db.h"
40 40
 #include "../../dprint.h"
41 41
 #include "avpops_parse.h"
42 42
 #include "avpops_db.h"
... ...
@@ -35,7 +35,7 @@
35 35
 #ifndef _AVP_OPS_DB_H_
36 36
 #define _AVP_OPS_DB_H_
37 37
 
38
-#include "../../db/db.h"
38
+#include "../../lib/srdb2/db.h"
39 39
 #include "../../str.h"
40 40
 #include "../../sr_module.h"
41 41
 
... ...
@@ -19,4 +19,8 @@ DEFS += -I$(LOCALBASE)/include/db44
19 19
 LIBS  = -L$(LOCALBASE)/lib -ldb-4.4
20 20
 
21 21
 
22
+DEFS+=-DSER_MOD_INTERFACE
23
+
24
+SERLIBPATH=../../lib
25
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
22 26
 include ../../Makefile.modules
... ...
@@ -41,8 +41,8 @@
41 41
 #include "../../mem/mem.h"
42 42
 #include "../../str.h"
43 43
 #include "../../timer.h"
44
-#include "../../db/db_con.h"
45
-#include "../../db/db_res.h"
44
+#include "../../lib/srdb2/db_con.h"
45
+#include "../../lib/srdb2/db_res.h"
46 46
 #include "../../db/db_key.h"
47 47
 #include "../../db/db_op.h"
48 48
 #include "../../db/db_val.h"
... ...
@@ -6,5 +6,7 @@ auto_gen=
6 6
 NAME=blst.so
7 7
 LIBS=
8 8
 
9
+DEFS+=-DSER_MOD_INTERFACE
10
+
9 11
 include ../../Makefile.modules
10 12
 
... ...
@@ -9,4 +9,8 @@ auto_gen=
9 9
 NAME=cfg_db.so
10 10
 LIBS=
11 11
 
12
+DEFS+=-DSER_MOD_INTERFACE
13
+
14
+SERLIBPATH=../../lib
15
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
12 16
 include ../../Makefile.modules
... ...
@@ -32,7 +32,7 @@
32 32
 #include "../../sr_module.h"
33 33
 #include "../../cfg/cfg.h"
34 34
 #include "../../cfg/cfg_ctx.h"
35
-#include "../../db/db.h"
35
+#include "../../lib/srdb2/db.h"
36 36
 #include "../../error.h"
37 37
 #include "../../ut.h"
38 38
 #include <unistd.h>
... ...
@@ -9,4 +9,6 @@ auto_gen=
9 9
 NAME=cfg_rpc.so
10 10
 LIBS=
11 11
 
12
+DEFS+=-DSER_MOD_INTERFACE
13
+
12 14
 include ../../Makefile.modules
... ...
@@ -14,4 +14,8 @@ DEFS +=-I/usr/include/libxml2 -I$(LOCALBASE)/include/libxml2 \
14 14
 
15 15
 LIBS= -L$(LOCALBASE)/lib -lxml2
16 16
 
17
+DEFS+=-DSER_MOD_INTERFACE
18
+
19
+SERLIBPATH=../../lib
20
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
17 21
 include ../../Makefile.modules
... ...
@@ -59,7 +59,7 @@
59 59
 #include "../../parser/parse_from.h"
60 60
 #include "../../parser/parse_content.h"
61 61
 #include "../../parser/parse_disposition.h"
62
-#include "../../db/db.h"
62
+#include "../../lib/srdb2/db.h"
63 63
 #include "../../cfg/cfg_struct.h"
64 64
 #include "cpl_run.h"
65 65
 #include "cpl_env.h"
... ...
@@ -31,7 +31,7 @@
31 31
   */
32 32
 
33 33
 #include "../../mem/shm_mem.h"
34
-#include "../../db/db.h"
34
+#include "../../lib/srdb2/db.h"
35 35
 #include "../../dprint.h"
36 36
 #include "cpl_db.h"
37 37
 
... ...
@@ -28,7 +28,7 @@
28 28
 #ifndef _CPL_DB_H
29 29
 #define _CPL_DB_H
30 30
 
31
-#include "../../db/db.h"
31
+#include "../../lib/srdb2/db.h"
32 32
 
33 33
 
34 34
 int cpl_db_bind(char* db_url);
... ...
@@ -35,7 +35,7 @@
35 35
 #include "../../usr_avp.h"
36 36
 #include "../sl/sl.h"
37 37
 #include "../usrloc/usrloc.h"
38
-#include "../tm/tm_load.h"
38
+#include "../../modules/tm/tm_load.h"
39 39
 
40 40
 struct cpl_enviroment {
41 41
 	char  *log_dir;         /* dir where the user log should be dumped */
... ...
@@ -31,7 +31,7 @@
31 31
  *             transaction is created (bogdan)
32 32
  */
33 33
 
34
-#include "../tm/h_table.h"
34
+#include "../../modules/tm/h_table.h"
35 35
 #include "../../parser/contact/parse_contact.h"
36 36
 
37 37
 
... ...
@@ -45,7 +45,7 @@
45 45
 #include "../../dprint.h"
46 46
 #include "../../parser/msg_parser.h"
47 47
 #include "../../data_lump_rpl.h"
48
-#include "../tm/tm_load.h"
48
+#include "../../modules/tm/tm_load.h"
49 49
 #include "../usrloc/usrloc.h"
50 50
 #include "CPL_tree.h"
51 51
 #include "loc_set.h"
... ...
@@ -29,7 +29,7 @@
29 29
 #include "../../action.h"
30 30
 #include "../../dset.h"
31 31
 #include "../../route.h"
32
-#include "../tm/tm_load.h"
32
+#include "../../modules/tm/tm_load.h"
33 33
 #include "loc_set.h"
34 34
 #include "cpl_sig.h"
35 35
 #include "cpl_env.h"
... ...
@@ -10,5 +10,7 @@ LIBS=
10 10
 # fifo support
11 11
 DEFS+=-DUSE_FIFO
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
13 15
 include ../../Makefile.modules
14 16
 
... ...
@@ -12,6 +12,10 @@ NAME=db_ops.so
12 12
 LIBS=
13 13
 
14 14
 
15
+DEFS+=-DSER_MOD_INTERFACE
16
+
17
+SERLIBPATH=../../lib
18
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
15 19
 include ../../Makefile.modules
16 20
 
17 21
 
... ...
@@ -35,7 +35,7 @@
35 35
 #include "../../error.h"
36 36
 #include "../../config.h"
37 37
 #include "../../trim.h"
38
-#include "../../db/db.h"
38
+#include "../../lib/srdb2/db.h"
39 39
 #include "../../select.h"
40 40
 #include "../../script_cb.h"
41 41
 #include "../xlog/xl_lib.h"
... ...
@@ -10,4 +10,6 @@ auto_gen=
10 10
 NAME=dbg.so
11 11
 LIBS=
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
13 15
 include ../../Makefile.modules
... ...
@@ -13,4 +13,8 @@ auto_gen=
13 13
 NAME=dbtext.so
14 14
 LIBS=
15 15
 
16
+DEFS+=-DSER_MOD_INTERFACE
17
+
18
+SERLIBPATH=../../lib
19
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
16 20
 include ../../Makefile.modules
... ...
@@ -39,8 +39,8 @@
39 39
 #define _DBT_API_H_
40 40
 
41 41
 #include "../../db/db_op.h"
42
-#include "../../db/db_res.h"
43
-#include "../../db/db_con.h"
42
+#include "../../lib/srdb2/db_res.h"
43
+#include "../../lib/srdb2/db_con.h"
44 44
 #include "../../db/db_row.h"
45 45
 
46 46
 int dbt_free_columns(db_res_t* _r);
... ...
@@ -39,7 +39,7 @@
39 39
 #define _DBT_RES_H_
40 40
 
41 41
 #include "../../db/db_op.h"
42
-#include "../../db/db_res.h"
42
+#include "../../lib/srdb2/db_res.h"
43 43
 
44 44
 #include "dbt_lib.h"
45 45
 
... ...
@@ -38,8 +38,8 @@
38 38
 #ifndef _DBTEXT_H_
39 39
 #define _DBTEXT_H_
40 40
 
41
-#include "../../db/db_con.h"
42
-#include "../../db/db_res.h"
41
+#include "../../lib/srdb2/db_con.h"
42
+#include "../../lib/srdb2/db_res.h"
43 43
 #include "../../db/db_key.h"
44 44
 #include "../../db/db_op.h"
45 45
 #include "../../db/db_val.h"
... ...
@@ -18,4 +18,7 @@ LIBS =
18 18
 SERLIBPATH=../../lib
19 19
 SER_LIBS=$(SERLIBPATH)/cds/ser_cds
20 20
 
21
+DEFS+=-DSER_MOD_INTERFACE
22
+
23
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
21 24
 include ../../Makefile.modules
... ...
@@ -26,8 +26,8 @@
26 26
 #ifndef __DB_DLG_H
27 27
 #define __DB_DLG_H
28 28
 
29
-#include "../tm/dlg.h"
30
-#include "../../db/db.h"
29
+#include "../../modules/tm/dlg.h"
30
+#include "../../lib/srdb2/db.h"
31 31
 #include <cds/sstr.h>
32 32
 
33 33
 int db_store_dlg(db_con_t* conn, dlg_t *dlg, str *dst_id);
... ...
@@ -27,7 +27,7 @@
27 27
 #include "db_dlg.h"
28 28
 #include "serialize_dlg.h"
29 29
 #include "../../sr_module.h"
30
-#include "../tm/tm_load.h"
30
+#include "../../modules/tm/tm_load.h"
31 31
 #include <cds/sstr.h>
32 32
 #include "dlg_utils.h"
33 33
 #include "dlg_request.h"
... ...
@@ -26,9 +26,9 @@
26 26
 #ifndef __DLG_MOD_H
27 27
 #define __DLG_MOD_H
28 28
 
29
-#include "../tm/dlg.h"
30
-#include "../../db/db.h"
31
-#include "../tm/t_hooks.h"
29
+#include "../../modules/tm/dlg.h"
30
+#include "../../lib/srdb2/db.h"
31
+#include "../../modules/tm/t_hooks.h"
32 32
 #include <cds/serialize.h>
33 33
 
34 34
 /* Prototype of function for storing dialog into database.
... ...
@@ -26,7 +26,7 @@
26 26
 #ifndef __DLG_MOD_INTERNAL_H
27 27
 #define __DLG_MOD_INTERNAL_H
28 28
 
29
-#include "../tm/tm_load.h"
29
+#include "../../modules/tm/tm_load.h"
30 30
 #include "dlg_mod.h"
31 31
 
32 32
 extern struct tm_binds tmb;
... ...
@@ -2,7 +2,7 @@
2 2
 #define __DIALOG_REQUEST_H
3 3
 
4 4
 #include "dlg_mod.h"
5
-#include "../tm/t_hooks.h"
5
+#include "../../modules/tm/t_hooks.h"
6 6
 
7 7
 int request_outside(str* method, str* headers, str* body, dlg_t* dialog, transaction_cb cb, void* cbp);
8 8
 int request_inside(str* method, str* headers, str* body, dlg_t* dialog, transaction_cb completion_cb, void* cbp);
... ...
@@ -26,7 +26,7 @@
26 26
 #ifndef __SERIALIZE_DLG_H
27 27
 #define __SERIALIZE_DLG_H
28 28
 
29
-#include "../tm/dlg.h"
29
+#include "../../modules/tm/dlg.h"
30 30
 #include <cds/serialize.h>
31 31
 
32 32
 int serialize_dlg(sstream_t *ss, dlg_t *dlg);
... ...
@@ -12,4 +12,6 @@ NAME=dispatcher.so
12 12
 
13 13
 LIBS=
14 14
 
15
+DEFS+=-DSER_MOD_INTERFACE
16
+
15 17
 include ../../Makefile.modules
... ...
@@ -10,4 +10,6 @@ auto_gen=
10 10
 NAME=diversion.so
11 11
 LIBS=
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
13 15
 include ../../Makefile.modules
... ...
@@ -10,4 +10,8 @@ auto_gen=
10 10
 NAME=domain.so
11 11
 LIBS=
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
15
+SERLIBPATH=../../lib
16
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
13 17
 include ../../Makefile.modules
... ...
@@ -31,7 +31,7 @@
31 31
 #include "domain_mod.h"
32 32
 #include "../../dprint.h"
33 33
 #include "../../mem/shm_mem.h"
34
-#include "../../db/db.h"
34
+#include "../../lib/srdb2/db.h"
35 35
 #include "../../ut.h"
36 36
 
37 37
 
... ...
@@ -199,7 +199,7 @@ int db_load_domain_attrs(domain_t* d)
199 199
 			goto skip;
200 200
 		}
201 201
 		
202
-		if ((rec->fld[3].v.int4 & DB_LOAD_SER) == 0) goto skip;
202
+		if ((rec->fld[3].v.int4 & SRDB_LOAD_SER) == 0) goto skip;
203 203
 	
204 204
 		/* Get AVP name */
205 205
 		name.s = rec->fld[0].v.lstr;
... ...
@@ -270,9 +270,9 @@ int load_domains(domain_t** dest)
270 270
 		flags = rec->fld[2].v.int4;
271 271
 		
272 272
 		/* Skip entries that are disabled/scheduled for removal */
273
-		if (flags & DB_DISABLED) goto skip;
273
+		if (flags & SRDB_DISABLED) goto skip;
274 274
 		     /* Skip entries that are for serweb/ser-ctl only */
275
-		if (!(flags & DB_LOAD_SER)) goto skip;
275
+		if (!(flags & SRDB_LOAD_SER)) goto skip;
276 276
 		
277 277
 		DBG("domain:load_domains: Processing entry (%.*s, %.*s, %u)\n",
278 278
 		    rec->fld[0].v.lstr.len, ZSW(rec->fld[0].v.lstr.s),
... ...
@@ -413,7 +413,7 @@ static int db_get_did(str* did, str* domain)
413 413
 		/* Test flags first, we are only interested in rows
414 414
 		 * that are not disabled
415 415
 		 */
416
-		if (rec->fld[1].flags & DB_NULL || (rec->fld[1].v.bitmap & DB_DISABLED)) {
416
+		if (rec->fld[1].flags & DB_NULL || (rec->fld[1].v.bitmap & SRDB_DISABLED)) {
417 417
 			db_res_free(res);
418 418
 			return 0;
419 419
 		}
... ...
@@ -31,7 +31,7 @@
31 31
 #ifndef _DOMAIN_MOD_H
32 32
 #define _DOMAIN_MOD_H
33 33
 
34
-#include "../../db/db.h"
34
+#include "../../lib/srdb2/db.h"
35 35
 #include "../../str.h"
36 36
 #include "../../usr_avp.h"
37 37
 #include "../../parser/msg_parser.h"
... ...
@@ -28,7 +28,7 @@
28 28
  */
29 29
 
30 30
 #include "../../dprint.h"
31
-#include "../../db/db.h"
31
+#include "../../lib/srdb2/db.h"
32 32
 #include "../../ut.h"
33 33
 #include "../../mem/mem.h"
34 34
 #include "hash.h"
... ...
@@ -10,4 +10,6 @@ auto_gen=
10 10
 NAME=enum.so
11 11
 LIBS=
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
13 15
 include ../../Makefile.modules
... ...
@@ -10,5 +10,7 @@ include ../../Makefile.defs
10 10
 auto_gen=
11 11
 NAME=eval.so
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
13 15
 include ../../Makefile.modules
14 16
 
... ...
@@ -10,4 +10,6 @@ auto_gen=
10 10
 NAME=exec.so
11 11
 LIBS=
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
13 15
 include ../../Makefile.modules
... ...
@@ -8,5 +8,7 @@ auto_gen=
8 8
 NAME=fifo.so
9 9
 LIBS=
10 10
 
11
+DEFS+=-DSER_MOD_INTERFACE
12
+
11 13
 include ../../Makefile.modules
12 14
 
... ...
@@ -7,4 +7,8 @@ auto_gen=
7 7
 NAME=flatstore.so
8 8
 LIBS=
9 9
 
10
+DEFS+=-DSER_MOD_INTERFACE
11
+
12
+SERLIBPATH=../../lib
13
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
10 14
 include ../../Makefile.modules
... ...
@@ -33,8 +33,8 @@
33 33
  * Inmplementation of flatstore commands.
34 34
  */
35 35
 
36
-#include "../../db/db_drv.h"
37
-#include "../../db/db_cmd.h"
36
+#include "../../lib/srdb2/db_drv.h"
37
+#include "../../lib/srdb2/db_cmd.h"
38 38
 
39 39
 
40 40
 /** Extension structure of db_cmd adding flatstore specific data.
... ...
@@ -33,9 +33,9 @@
33 33
  * Inmplementation of flatstore "connections".
34 34
  */
35 35
 
36
-#include "../../db/db_pool.h"
37
-#include "../../db/db_con.h"
38
-#include "../../db/db_uri.h"
36
+#include "../../lib/srdb2/db_pool.h"
37
+#include "../../lib/srdb2/db_con.h"
38
+#include "../../lib/srdb2/db_uri.h"
39 39
 
40 40
 #include <stdio.h>
41 41
 
... ...
@@ -32,8 +32,8 @@
32 32
  * The functions parsing and interpreting flatstore: URIs.
33 33
  */
34 34
 
35
-#include "../../db/db_uri.h"
36
-#include "../../db/db_drv.h"
35
+#include "../../lib/srdb2/db_uri.h"
36
+#include "../../lib/srdb2/db_drv.h"
37 37
 
38 38
 /** Flatstore driver specific payload to attach to db_uri structures.  
39 39
  * This is the flatstore specific structure that will be attached to generic
... ...
@@ -10,5 +10,9 @@ auto_gen=
10 10
 NAME=gflags.so
11 11
 LIBS=
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
15
+SERLIBPATH=../../lib
16
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
13 17
 include ../../Makefile.modules
14 18
 
... ...
@@ -50,7 +50,7 @@
50 50
 #include "../../sr_module.h"
51 51
 #include "../../error.h"
52 52
 #include "../../ut.h"
53
-#include "../../db/db.h"
53
+#include "../../lib/srdb2/db.h"
54 54
 #include "../../mem/mem.h"
55 55
 #include "../../mem/shm_mem.h"
56 56
 #include "../../usr_avp.h"
... ...
@@ -231,7 +231,7 @@ static int load_attrs(avp_list_t* global_avps)
231 231
 			goto skip;
232 232
 		}
233 233
 
234
-		if ((rec->fld[3].v.int4 & DB_LOAD_SER) == 0) goto skip;
234
+		if ((rec->fld[3].v.int4 & SRDB_LOAD_SER) == 0) goto skip;
235 235
 
236 236
 		name.s = rec->fld[0].v.lstr;
237 237
 
... ...
@@ -365,7 +365,7 @@ int save_gflags(unsigned int flags)
365 365
 	save_gflags_cmd->vals[0].v.cstr = AVP_GFLAGS;
366 366
 	save_gflags_cmd->vals[1].v.int4 = 0;
367 367
 	save_gflags_cmd->vals[2].v.lstr = fl;
368
-	save_gflags_cmd->vals[3].v.bitmap = DB_LOAD_SER;
368
+	save_gflags_cmd->vals[3].v.bitmap = SRDB_LOAD_SER;
369 369
 
370 370
 	if (db_exec(NULL, save_gflags_cmd) < 0) {
371 371
 		LOG(L_ERR, "gflags:save_gflag: Unable to store new value\n");
... ...
@@ -14,5 +14,7 @@ NAME=iptrtpproxy.so
14 14
 LIBS += $(iptdir)/iptables.o -L $(iptdir)/libiptc -liptc -L $(iptdir)/extensions -lext
15 15
 DEFS += -I $(iptdir)/include
16 16
 
17
+DEFS+=-DSER_MOD_INTERFACE
18
+
17 19
 include ../../Makefile.modules
18 20
 
... ...
@@ -17,4 +17,8 @@ DEFS+=-DXJ_EXTRA_DEBUG
17 17
 DEFS+=-I$(LOCALBASE)/include
18 18
 LIBS=-L$(LOCALBASE)/lib -lexpat
19 19
 
20
+DEFS+=-DSER_MOD_INTERFACE
21
+
22
+SERLIBPATH=../../lib
23
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
20 24
 include ../../Makefile.modules
... ...
@@ -63,10 +63,10 @@
63 63
 #include "../../parser/parse_uri.h"
64 64
 #include "../../parser/parse_content.h"
65 65
 #include "../../parser/parse_from.h"
66
-#include "../../db/db.h"
66
+#include "../../lib/srdb2/db.h"
67 67
 #include "../../cfg/cfg_struct.h"
68 68
 
69
-#include "../tm/tm_load.h"
69
+#include "../../modules/tm/tm_load.h"
70 70
 
71 71
 #ifdef HAVE_IHTTP
72 72
 #include "../ihttp/ih_load.h"
... ...
@@ -62,7 +62,7 @@
62 62
 #include "../../mem/mem.h"
63 63
 #include "../../mem/shm_mem.h"
64 64
 #include "../../cfg/cfg_struct.h"
65
-#include "../tm/tm_load.h"
65
+#include "../../modules/tm/tm_load.h"
66 66
 
67 67
 #include "xjab_worker.h"
68 68
 #include "xjab_util.h"
... ...
@@ -40,9 +40,9 @@
40 40
 #define _XJAB_WORKER_H_
41 41
 
42 42
 #include "../../str.h"
43
-#include "../../db/db.h"
43
+#include "../../lib/srdb2/db.h"
44 44
 #include "../../locking.h"
45
-#include "../tm/tm_load.h"
45
+#include "../../modules/tm/tm_load.h"
46 46
 
47 47
 #include "xjab_util.h"
48 48
 #include "tree234.h"
... ...
@@ -9,5 +9,9 @@ auto_gen=
9 9
 NAME=lcr.so
10 10
 LIBS=
11 11
 
12
+DEFS+=-DSER_MOD_INTERFACE
13
+
14
+SERLIBPATH=../../lib
15
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
12 16
 include ../../Makefile.modules
13 17
 
... ...
@@ -44,7 +44,7 @@
44 44
 #include "../../error.h"
45 45
 #include "../../mem/mem.h"
46 46
 #include "../../mem/shm_mem.h"
47
-#include "../../db/db.h"
47
+#include "../../lib/srdb2/db.h"
48 48
 #include "../../usr_avp.h"
49 49
 #include "../../parser/parse_uri.h"
50 50
 #include "../../parser/parse_from.h"
... ...
@@ -16,4 +16,8 @@ DEFS += -Wall -DOPENLDAP23
16 16
 
17 17
 LIBS=-L$(LOCALBASE)/lib -L /usr/lib -lldap
18 18
 
19
+DEFS+=-DSER_MOD_INTERFACE
20
+
21
+SERLIBPATH=../../lib
22
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
19 23
 include ../../Makefile.modules
... ...
@@ -34,9 +34,9 @@
34 34
  * stored in db_cmd structures and related functions.
35 35
  */
36 36
 
37
-#include "../../db/db_drv.h"
38
-#include "../../db/db_cmd.h"
39
-#include "../../db/db_res.h"
37
+#include "../../lib/srdb2/db_drv.h"
38
+#include "../../lib/srdb2/db_cmd.h"
39
+#include "../../lib/srdb2/db_res.h"
40 40
 #include "../../str.h"
41 41
 
42 42
 #include <stdarg.h>
... ...
@@ -33,9 +33,9 @@
33 33
  * Implementation of LDAP per-connection related data structures and functions.
34 34
  */
35 35
 
36
-#include "../../db/db_pool.h"
37
-#include "../../db/db_con.h"
38
-#include "../../db/db_uri.h"
36
+#include "../../lib/srdb2/db_pool.h"
37
+#include "../../lib/srdb2/db_con.h"
38
+#include "../../lib/srdb2/db_uri.h"
39 39
 
40 40
 #include <time.h>
41 41
 #include <ldap.h>
... ...
@@ -38,7 +38,7 @@
38 38
 
39 39
 #include "ld_fld.h"
40 40
 
41
-#include "../../db/db_drv.h"
41
+#include "../../lib/srdb2/db_drv.h"
42 42
 #include "../../mem/mem.h"
43 43
 #include "../../dprint.h"
44 44
 #include "../../ut.h"
... ...
@@ -38,9 +38,9 @@
38 38
 
39 39
 struct ld_cfg;
40 40
 
41
-#include "../../db/db_gen.h"
42
-#include "../../db/db_fld.h"
43
-#include "../../db/db_cmd.h"
41
+#include "../../lib/srdb2/db_gen.h"
42
+#include "../../lib/srdb2/db_fld.h"
43
+#include "../../lib/srdb2/db_cmd.h"
44 44
 
45 45
 #include <ldap.h>
46 46
 
... ...
@@ -41,7 +41,7 @@
41 41
 #include "../../sr_module.h"
42 42
 
43 43
 #ifdef LD_TEST
44
-#include "../../db/db_cmd.h"
44
+#include "../../lib/srdb2/db_cmd.h"
45 45
 #include <limits.h>
46 46
 #include <float.h>
47 47
 #endif
... ...
@@ -37,7 +37,7 @@
37 37
 
38 38
 #include "../../mem/mem.h"
39 39
 #include "../../dprint.h"
40
-#include "../../db/db_gen.h"
40
+#include "../../lib/srdb2/db_gen.h"
41 41
 
42 42
 
43 43
 static void ld_res_free(db_res_t* res, struct ld_res* payload)
... ...
@@ -34,8 +34,8 @@
34 34
  * servers.
35 35
  */
36 36
 
37
-#include "../../db/db_drv.h"
38
-#include "../../db/db_res.h"
37
+#include "../../lib/srdb2/db_drv.h"
38
+#include "../../lib/srdb2/db_res.h"
39 39
 
40 40
 #include <ldap.h>
41 41
 
... ...
@@ -33,8 +33,8 @@
33 33
  * The functions parsing and interpreting ldap: URIs.
34 34
  */
35 35
 
36
-#include "../../db/db_uri.h"
37
-#include "../../db/db_drv.h"
36
+#include "../../lib/srdb2/db_uri.h"
37
+#include "../../lib/srdb2/db_drv.h"
38 38
 
39 39
 #include <ldap.h>
40 40
 
... ...
@@ -10,4 +10,6 @@ auto_gen=
10 10
 NAME=mangler.so
11 11
 LIBS=
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
13 15
 include ../../Makefile.modules
... ...
@@ -52,9 +52,9 @@
52 52
 
53 53
 #ifdef DEMO
54 54
 
55
-#include "../tm/t_hooks.h"
56
-#include "../tm/tm_load.h"
57
-#include "../tm/h_table.h"
55
+#include "../../modules/tm/t_hooks.h"
56
+#include "../../modules/tm/tm_load.h"
57
+#include "../../modules/tm/h_table.h"
58 58
 struct tm_binds tmb;
59 59
 
60 60
 #endif
... ...
@@ -10,4 +10,6 @@ auto_gen=
10 10
 NAME=maxfwd.so
11 11
 LIBS= 
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
13 15
 include ../../Makefile.modules
... ...
@@ -10,5 +10,7 @@ auto_gen=
10 10
 NAME=mediaproxy.so
11 11
 LIBS=
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
13 15
 include ../../Makefile.modules
14 16
 
... ...
@@ -10,4 +10,8 @@ auto_gen=
10 10
 NAME=msilo.so
11 11
 LIBS=
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
15
+SERLIBPATH=../../lib
16
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
13 17
 include ../../Makefile.modules
... ...
@@ -59,14 +59,14 @@
59 59
 #include "../../ut.h"
60 60
 #include "../../timer.h"
61 61
 #include "../../mem/shm_mem.h"
62
-#include "../../db/db.h"
62
+#include "../../lib/srdb2/db.h"
63 63
 #include "../../parser/parse_from.h"
64 64
 #include "../../parser/parse_content.h"
65 65
 #include "../../parser/contact/parse_contact.h"
66 66
 #include "../../resolve.h"
67 67
 #include "../../id.h"
68 68
 
69
-#include "../tm/tm_load.h"
69
+#include "../../modules/tm/tm_load.h"
70 70
 
71 71
 #define CONTACT_PREFIX "Content-Type: text/plain"CRLF"Contact: <"
72 72
 #define CONTACT_SUFFIX  ">;msilo=yes"CRLF
... ...
@@ -19,4 +19,8 @@ LIBS=-L/usr/lib/mysql -L$(LOCALBASE)/lib -L$(LOCALBASE)/lib/mysql \
19 19
 		-L/usr/lib64/mysql \
20 20
 		-lmysqlclient -lz
21 21
 
22
+DEFS+=-DSER_MOD_INTERFACE
23
+
24
+SERLIBPATH=../../lib
25
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
22 26
 include ../../Makefile.modules
... ...
@@ -42,7 +42,7 @@
42 42
 
43 43
 #include "../../mem/mem.h"
44 44
 #include "../../str.h"
45
-#include "../../db/db_cmd.h"
45
+#include "../../lib/srdb2/db_cmd.h"
46 46
 #include "../../ut.h"
47 47
 
48 48
 #include <stdlib.h>
... ...
@@ -29,8 +29,8 @@
29 29
 #ifndef _MY_CMD_H
30 30
 #define _MY_CMD_H  1
31 31
 
32
-#include "../../db/db_drv.h"
33
-#include "../../db/db_cmd.h"
32
+#include "../../lib/srdb2/db_drv.h"
33
+#include "../../lib/srdb2/db_cmd.h"
34 34
 #include <mysql/mysql.h>
35 35
 #include <stdarg.h>
36 36
 
... ...
@@ -29,9 +29,9 @@
29 29
 #ifndef _MY_CON_H
30 30
 #define _MY_CON_H  1
31 31
 
32
-#include "../../db/db_pool.h"
33
-#include "../../db/db_con.h"
34
-#include "../../db/db_uri.h"
32
+#include "../../lib/srdb2/db_pool.h"
33
+#include "../../lib/srdb2/db_con.h"
34
+#include "../../lib/srdb2/db_uri.h"
35 35
 
36 36
 #include <time.h>
37 37
 #include <mysql/mysql.h>
... ...
@@ -30,7 +30,7 @@
30 30
 
31 31
 #include "../../mem/mem.h"
32 32
 #include "../../dprint.h"
33
-#include "../../db/db_gen.h"
33
+#include "../../lib/srdb2/db_gen.h"
34 34
 
35 35
 #include <string.h>
36 36
 
... ...
@@ -33,8 +33,8 @@
33 33
  *  @{
34 34
  */
35 35
 
36
-#include "../../db/db_drv.h"
37
-#include "../../db/db_fld.h"
36
+#include "../../lib/srdb2/db_drv.h"
37
+#include "../../lib/srdb2/db_fld.h"
38 38
 #include <mysql/mysql.h>
39 39
 
40 40
 struct my_fld {
... ...
@@ -32,7 +32,7 @@
32 32
 
33 33
 #include "../../mem/mem.h"
34 34
 #include "../../dprint.h"
35
-#include "../../db/db_gen.h"
35
+#include "../../lib/srdb2/db_gen.h"
36 36
 
37 37
 #include <mysql/mysql.h>
38 38
 
... ...
@@ -29,8 +29,8 @@
29 29
 #ifndef _MY_RES_H
30 30
 #define _MY_RES_H  1
31 31
 
32
-#include "../../db/db_drv.h"
33
-#include "../../db/db_res.h"
32
+#include "../../lib/srdb2/db_drv.h"
33
+#include "../../lib/srdb2/db_res.h"
34 34
 
35 35
 struct my_res {
36 36
 	db_drv_t gen;
... ...
@@ -33,7 +33,7 @@
33 33
 #include "../../dprint.h"
34 34
 #include "../../mem/mem.h"
35 35
 #include "../../ut.h"
36
-#include "../../db/db_gen.h"
36
+#include "../../lib/srdb2/db_gen.h"
37 37
 
38 38
 #include <stdlib.h>
39 39
 #include <string.h>
... ...
@@ -31,8 +31,8 @@
31 31
 #ifndef _MY_URI_H
32 32
 #define _MY_URI_H
33 33
 
34
-#include "../../db/db_uri.h"
35
-#include "../../db/db_drv.h"
34
+#include "../../lib/srdb2/db_uri.h"
35
+#include "../../lib/srdb2/db_drv.h"
36 36
 
37 37
 struct my_uri {
38 38
 	db_drv_t drv;
... ...
@@ -46,7 +46,7 @@
46 46
 #include "my_res.h"
47 47
 
48 48
 #include "../../sr_module.h"
49
-#include "../../db/db.h"
49
+#include "../../lib/srdb2/db.h"
50 50
 
51 51
 int my_ping_interval = 5 * 60; /* Default is 5 minutes */
52 52
 unsigned int my_connect_to = 2; /* 2 s by default */
... ...
@@ -10,5 +10,7 @@ auto_gen=
10 10
 NAME=nathelper.so
11 11
 LIBS=
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
13 15
 include ../../Makefile.modules
14 16
 
... ...
@@ -33,7 +33,7 @@
33 33
 #include <unistd.h>
34 34
 #include <signal.h>
35 35
 #include "../usrloc/usrloc.h"
36
-#include "../tm/tm_load.h"
36
+#include "../../modules/tm/tm_load.h"
37 37
 #include "../../dprint.h"
38 38
 #include "../../parser/parse_hostport.h"
39 39
 #include "../../resolve.h"
... ...
@@ -11,4 +11,6 @@ auto_gen=
11 11
 NAME=options.so
12 12
 LIBS=
13 13
 
14
+DEFS+=-DSER_MOD_INTERFACE
15
+
14 16
 include ../../Makefile.modules
... ...
@@ -17,4 +17,8 @@ ORACLE_INCLUDES = $(ORACLE_ROOT)/rdbms/public
17 17
 DEFS += -I$(ORACLE_INCLUDES)
18 18
 LIBS += -L$(ORACLE_LIBS) -lclntsh
19 19
 
20
+DEFS+=-DSER_MOD_INTERFACE
21
+
22
+SERLIBPATH=../../lib
23
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
20 24
 include ../../Makefile.modules
... ...
@@ -33,8 +33,8 @@
33 33
 
34 34
 #include <oci.h>
35 35
 
36
-#include "../../db/db_con.h"
37
-#include "../../db/db_res.h"
36
+#include "../../lib/srdb2/db_con.h"
37
+#include "../../lib/srdb2/db_res.h"
38 38
 #include "../../db/db_key.h"
39 39
 #include "../../db/db_op.h"
40 40
 #include "../../db/db_val.h"
... ...
@@ -45,5 +45,7 @@ LIBS+=-lssl -lcrypto -lpthread -lm
45 45
 
46 46
 
47 47
 
48
+DEFS+=-DSER_MOD_INTERFACE
49
+
48 50
 include ../../Makefile.modules
49 51
 
... ...
@@ -33,7 +33,7 @@
33 33
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
34 34
  */
35 35
 
36
-#include "../tm/tm_load.h"
36
+#include "../../modules/tm/tm_load.h"
37 37
 #include "tm.h"
38 38
 #include "destination.h"
39 39
 
... ...
@@ -23,4 +23,7 @@ SER_LIBS=$(SERLIBPATH)/cds/ser_cds $(SERLIBPATH)/presence/ser_presence \
23 23
 			$(SERLIBPATH)/xcap/ser_xcap
24 24
 
25 25
 
26
+DEFS+=-DSER_MOD_INTERFACE
27
+
28
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
26 29
 include ../../Makefile.modules
... ...
@@ -33,7 +33,7 @@
33 33
 
34 34
 #include "presentity.h"
35 35
 #include "watcher.h"
36
-#include "../tm/uac.h"
36
+#include "../../modules/tm/uac.h"
37 37
 
38 38
 int send_notify(struct presentity* _p, struct watcher* _w);
39 39
 
... ...
@@ -35,7 +35,7 @@
35 35
 
36 36
 #include <signal.h>
37 37
 
38
-#include "../../db/db.h"
38
+#include "../../lib/srdb2/db.h"
39 39
 #include "../../sr_module.h"
40 40
 #include "../../error.h"
41 41
 #include "subscribe.h"
... ...
@@ -31,8 +31,8 @@
31 31
 #define PA_MOD_H
32 32
 
33 33
 #include "../../parser/msg_parser.h"
34
-#include "../tm/tm_load.h"
35
-#include "../../db/db.h"
34
+#include "../../modules/tm/tm_load.h"
35
+#include "../../lib/srdb2/db.h"
36 36
 #include "../dialog/dlg_mod.h"
37 37
 #include "auth.h"
38 38
 
... ...
@@ -32,7 +32,7 @@
32 32
 #include <stdio.h>
33 33
 #include <stdlib.h>
34 34
 #include <string.h>
35
-#include "../../db/db.h"
35
+#include "../../lib/srdb2/db.h"
36 36
 #include "../../dprint.h"
37 37
 #include "../../id.h"
38 38
 #include "../../mem/shm_mem.h"
... ...
@@ -32,7 +32,7 @@
32 32
 #define PRESENTITY_H
33 33
 
34 34
 #include "../../str.h"
35
-#include "../tm/dlg.h"
35
+#include "../../modules/tm/dlg.h"
36 36
 #include "watcher.h"
37 37
 #include "hslot.h"
38 38
 #include "trace.h"
... ...
@@ -68,13 +68,13 @@
68 68
 #include "../../crc.h"
69 69
 #include "../../ip_addr.h"
70 70
 #include "../../socket_info.h"
71
-#include "../tm/ut.h"
72
-#include "../tm/h_table.h"
73
-#include "../tm/t_hooks.h"
74
-#include "../tm/t_funcs.h"
75
-#include "../tm/t_msgbuilder.h"
76
-#include "../tm/callid.h"
77
-#include "../tm/uac.h"
71
+#include "../../modules/tm/ut.h"
72
+#include "../../modules/tm/h_table.h"
73
+#include "../../modules/tm/t_hooks.h"
74
+#include "../../modules/tm/t_funcs.h"
75
+#include "../../modules/tm/t_msgbuilder.h"
76
+#include "../../modules/tm/callid.h"
77
+#include "../../modules/tm/uac.h"
78 78
 
79 79
 #define DOCUMENT_TYPE "application/cpim-pidf+xml"
80 80
 #define DOCUMENT_TYPE_L (sizeof(DOCUMENT_TYPE) - 1)
... ...
@@ -28,7 +28,7 @@
28 28
  */
29 29
 
30 30
 #include "paerrno.h"
31
-#include "../../db/db.h"
31
+#include "../../lib/srdb2/db.h"
32 32
 #include "../../dprint.h"
33 33
 #include "../../parser/parse_event.h"
34 34
 #include "../../mem/shm_mem.h"
... ...
@@ -31,8 +31,8 @@
31 31
 #define WATCHER_H
32 32
 
33 33
 #include "../../str.h"
34
-#include "../tm/dlg.h"
35
-#include "../../db/db.h"
34
+#include "../../modules/tm/dlg.h"
35
+#include "../../lib/srdb2/db.h"
36 36
 #include "../../parser/parse_content.h"
37 37
 #include "../../parser/parse_event.h" /* EVENT_PRESENCE, EVENT_PRESENCE_WINFO, ... */
38 38
 #include <stdio.h>
... ...
@@ -10,4 +10,8 @@ auto_gen=
10 10
 NAME=pdt.so
11 11
 LIBS=
12 12
 
13
+DEFS+=-DSER_MOD_INTERFACE
14
+
15
+SERLIBPATH=../../lib
16
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
13 17
 include ../../Makefile.modules
... ...
@@ -41,7 +41,7 @@
41 41
 
42 42
 #include "../../sr_module.h"
43 43
 #include "../../parser/parse_fline.h"
44
-#include "../../db/db.h"
44
+#include "../../lib/srdb2/db.h"
45 45
 #include "../../mem/shm_mem.h"
46 46
 #include "../../mem/mem.h"
47 47
 #include "../../dprint.h"
... ...
@@ -46,7 +46,7 @@
46 46
 #include <stdlib.h>
47 47
 
48 48
 #include "../../sr_module.h"
49
-#include "../../db/db.h"
49
+#include "../../lib/srdb2/db.h"
50 50
 #include "../../mem/shm_mem.h"
51 51
 #include "../../mem/mem.h"
52 52
 #include "../../dprint.h"
... ...
@@ -9,4 +9,8 @@ auto_gen=
9 9
 NAME=permissions.so
10 10
 LIBS=
11 11
 
12
+DEFS+=-DSER_MOD_INTERFACE
13
+
14
+SERLIBPATH=../../lib
15
+SER_LIBS+=$(SERLIBPATH)/srdb2/srdb2
12 16
 include ../../Makefile.modules
... ...
@@ -101,8 +101,8 @@ static int load_db(im_entry_t **hash)
101 101
 		/* start with flags */
102 102
 		if (rec->fld[3].flags & DB_NULL) goto skip;
103 103
 		flags = rec->fld[3].v.bitmap;
104
-		if ((flags & DB_DISABLED)
105
-		|| ((flags & DB_LOAD_SER) == 0)) goto skip;
104
+		if ((flags & SRDB_DISABLED)
105
+		|| ((flags & SRDB_LOAD_SER) == 0)) goto skip;
106 106
 
107 107
 		found++;
108 108
 		/* get IP address */
... ...
@@ -29,7 +29,7 @@
29 29
 #ifndef _IM_DB_H
30 30
 #define _IM_DB_H
31 31
 
32
-#include "../../db/db.h"
32
+#include "../../lib/srdb2/db.h"
33 33
 
34 34
 /* prepare the DB cmds */
35 35
 int init_im_db(void);
... ...
@@ -26,7 +26,7 @@
26 26
  *
27 27
  */
28 28
 
29
-#include "../../db/db.h"
29
+#include "../../lib/srdb2/db.h"
30 30
 #include "permissions.h"
31 31
 #include "im_db.h"
32 32
 #include "im_rpc.h"
... ...
@@ -32,7 +32,7 @@
32 32
  */
33 33
 
34 34
 #include "../../dprint.h"
35
-#include "../../db/db.h"
35
+#include "../../lib/srdb2/db.h"
36 36
 #include "../../mem/shm_mem.h"
37 37
 #include "permissions.h"
38 38
 #include "ip_set.h"
... ...
@@ -38,7 +38,7 @@
38 38
 #define PERMISSIONS_H 1
39 39
 
40 40
 #include "../../sr_module.h"
41
-#include "../../db/db.h"
41
+#include "../../lib/srdb2/db.h"
42 42
 #include "rule.h"
43 43
 
44 44
 #define DEFAULT_ALLOW_FILE "permissions.allow"
... ...
@@ -41,7 +41,7 @@
41 41
 #include "permissions.h"
42 42
 #include "trusted_hash.h"
43 43
 #include "../../config.h"
44
-#include "../../db/db.h"
44
+#include "../../lib/srdb2/db.h"
45 45
 #include "../../ip_addr.h"
46 46
 #include "../../mem/shm_mem.h"
47 47
 #include "../../parser/msg_parser.h"
... ...
@@ -34,7 +34,7 @@
34 34
  */
35 35
 
36 36
 #include "../../dprint.h"
<