[SR-Dev] git:janakj/ldap: Changes necessary to make the module compile in sip-router .

Jan Janak jan at iptel.org
Fri Feb 13 00:57:05 CET 2009


Module: sip-router
Branch: janakj/ldap
Commit: 3de896c99dfa637f3f169fb20d5d1d399e3335a8
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3de896c99dfa637f3f169fb20d5d1d399e3335a8

Author: Jan Janak <jan at iptel.org>
Committer: Jan Janak <jan at iptel.org>
Date:   Fri Feb 13 00:55:49 2009 +0100

Changes necessary to make the module compile in sip-router.

This is a set of changes necessary to make the LDAP module compile
in the sip-router tree. This includes:
 * Extra stuff in the Makefile to link with libsrdb2
 * Defined SER_MOD_INTERFACE in the  makefile
 * Updated relative paths to srdb2 header files

---

 modules/db_ldap/Makefile |    5 ++++-
 modules/db_ldap/ld_cmd.h |    6 +++---
 modules/db_ldap/ld_con.h |    6 +++---
 modules/db_ldap/ld_fld.c |    2 +-
 modules/db_ldap/ld_fld.h |    4 ++--
 modules/db_ldap/ld_mod.c |    2 +-
 modules/db_ldap/ld_res.c |    2 +-
 modules/db_ldap/ld_res.h |    4 ++--
 modules/db_ldap/ld_uri.h |    4 ++--
 9 files changed, 19 insertions(+), 16 deletions(-)

diff --git a/modules/db_ldap/Makefile b/modules/db_ldap/Makefile
index e9309e2..dafe3c2 100644
--- a/modules/db_ldap/Makefile
+++ b/modules/db_ldap/Makefile
@@ -8,7 +8,7 @@ NAME=ldap.so
 
 #DEFS += -DLD_TEST
 
-DEFS += -Wall -DOPENLDAP23
+DEFS += -Wall -DOPENLDAP23 -DSER_MOD_INTERFACE
 
 # Uncomment this if you have a recent version of libldap with
 # LD_SCOPE_CHILDREN defined
@@ -16,4 +16,7 @@ DEFS += -Wall -DOPENLDAP23
 
 LIBS=-L$(LOCALBASE)/lib -L /usr/lib -lldap
 
+SERLIBPATH=../../lib
+SER_LIBS=$(SERLIBPATH)/srdb2/srdb2
+
 include ../../Makefile.modules
diff --git a/modules/db_ldap/ld_cmd.h b/modules/db_ldap/ld_cmd.h
index 861da67..d820bc9 100644
--- a/modules/db_ldap/ld_cmd.h
+++ b/modules/db_ldap/ld_cmd.h
@@ -34,9 +34,9 @@
  * stored in db_cmd structures and related functions.
  */
 
-#include "../../db/db_drv.h"
-#include "../../db/db_cmd.h"
-#include "../../db/db_res.h"
+#include "../../lib/srdb2/db_drv.h"
+#include "../../lib/srdb2/db_cmd.h"
+#include "../../lib/srdb2/db_res.h"
 #include "../../str.h"
 
 #include <stdarg.h>
diff --git a/modules/db_ldap/ld_con.h b/modules/db_ldap/ld_con.h
index 2fdb2d7..b4ca92b 100644
--- a/modules/db_ldap/ld_con.h
+++ b/modules/db_ldap/ld_con.h
@@ -33,9 +33,9 @@
  * Implementation of LDAP per-connection related data structures and functions.
  */
 
-#include "../../db/db_pool.h"
-#include "../../db/db_con.h"
-#include "../../db/db_uri.h"
+#include "../../lib/srdb2/db_pool.h"
+#include "../../lib/srdb2/db_con.h"
+#include "../../lib/srdb2/db_uri.h"
 
 #include <time.h>
 #include <ldap.h>
diff --git a/modules/db_ldap/ld_fld.c b/modules/db_ldap/ld_fld.c
index 3e599ed..a62da62 100644
--- a/modules/db_ldap/ld_fld.c
+++ b/modules/db_ldap/ld_fld.c
@@ -40,7 +40,7 @@
 
 #include "ld_fld.h"
 
-#include "../../db/db_drv.h"
+#include "../../lib/srdb2/db_drv.h"
 #include "../../mem/mem.h"
 #include "../../dprint.h"
 #include "../../ut.h"
diff --git a/modules/db_ldap/ld_fld.h b/modules/db_ldap/ld_fld.h
index ebad50f..da295c0 100644
--- a/modules/db_ldap/ld_fld.h
+++ b/modules/db_ldap/ld_fld.h
@@ -38,8 +38,8 @@
 
 struct ld_cfg;
 
-#include "../../db/db_gen.h"
-#include "../../db/db_fld.h"
+#include "../../lib/srdb2/db_gen.h"
+#include "../../lib/srdb2/db_fld.h"
 
 #include <ldap.h>
 
diff --git a/modules/db_ldap/ld_mod.c b/modules/db_ldap/ld_mod.c
index 8a21095..0e8ce06 100644
--- a/modules/db_ldap/ld_mod.c
+++ b/modules/db_ldap/ld_mod.c
@@ -41,7 +41,7 @@
 #include "../../sr_module.h"
 
 #ifdef LD_TEST
-#include "../../db/db_cmd.h"
+#include "../../lib/srdb2/db_cmd.h"
 #include <limits.h>
 #include <float.h>
 #endif
diff --git a/modules/db_ldap/ld_res.c b/modules/db_ldap/ld_res.c
index ba7049e..0f1401d 100644
--- a/modules/db_ldap/ld_res.c
+++ b/modules/db_ldap/ld_res.c
@@ -37,7 +37,7 @@
 
 #include "../../mem/mem.h"
 #include "../../dprint.h"
-#include "../../db/db_gen.h"
+#include "../../lib/srdb2/db_gen.h"
 
 
 static void ld_res_free(db_res_t* res, struct ld_res* payload)
diff --git a/modules/db_ldap/ld_res.h b/modules/db_ldap/ld_res.h
index 051b009..3c48ace 100644
--- a/modules/db_ldap/ld_res.h
+++ b/modules/db_ldap/ld_res.h
@@ -34,8 +34,8 @@
  * servers.
  */
 
-#include "../../db/db_drv.h"
-#include "../../db/db_res.h"
+#include "../../lib/srdb2/db_drv.h"
+#include "../../lib/srdb2/db_res.h"
 
 #include <ldap.h>
 
diff --git a/modules/db_ldap/ld_uri.h b/modules/db_ldap/ld_uri.h
index 43155f3..5afca46 100644
--- a/modules/db_ldap/ld_uri.h
+++ b/modules/db_ldap/ld_uri.h
@@ -33,8 +33,8 @@
  * The functions parsing and interpreting ldap: URIs.
  */
 
-#include "../../db/db_uri.h"
-#include "../../db/db_drv.h"
+#include "../../lib/srdb2/db_uri.h"
+#include "../../lib/srdb2/db_drv.h"
 
 #include <ldap.h>
 




More information about the sr-dev mailing list