Module: kamailio
Branch: master
Commit: e1a6f39a7366d9275f4a2bca1affbf04be459de8
URL:
https://github.com/kamailio/kamailio/commit/e1a6f39a7366d9275f4a2bca1affbf0…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2019-04-18T14:08:49+02:00
sqlops: removed ifdefs for WITH_XAVP
---
Modified: src/modules/sqlops/sql_api.c
Modified: src/modules/sqlops/sql_api.h
Modified: src/modules/sqlops/sqlops.c
---
Diff:
https://github.com/kamailio/kamailio/commit/e1a6f39a7366d9275f4a2bca1affbf0…
Patch:
https://github.com/kamailio/kamailio/commit/e1a6f39a7366d9275f4a2bca1affbf0…
---
diff --git a/src/modules/sqlops/sql_api.c b/src/modules/sqlops/sql_api.c
index f39da7fed8..54c123f85e 100644
--- a/src/modules/sqlops/sql_api.c
+++ b/src/modules/sqlops/sql_api.c
@@ -31,9 +31,7 @@
#include "../../core/hashes.h"
#include "../../core/ut.h"
#include "../../lib/srdb1/db_ut.h"
-#ifdef WITH_XAVP
#include "../../core/xavp.h"
-#endif
#include "sql_api.h"
@@ -461,7 +459,6 @@ int sql_do_query_async(sql_con_t *con, str *query)
return 1;
}
-#ifdef WITH_XAVP
int sql_exec_xquery(struct sip_msg *msg, sql_con_t *con, str *query,
str *xavp)
{
@@ -560,6 +557,7 @@ int sql_exec_xquery(struct sip_msg *msg, sql_con_t *con, str *query,
return 1;
}
+
int sql_do_xquery(struct sip_msg *msg, sql_con_t *con, pv_elem_t *query,
pv_elem_t *res)
{
@@ -583,8 +581,6 @@ int sql_do_xquery(struct sip_msg *msg, sql_con_t *con, pv_elem_t
*query,
return sql_exec_xquery(msg, con, &sv, &xavp);
}
-#endif
-
int sql_do_pvquery(struct sip_msg *msg, sql_con_t *con, pv_elem_t *query,
pvname_list_t *res)
diff --git a/src/modules/sqlops/sql_api.h b/src/modules/sqlops/sql_api.h
index 9502de91a6..ec7a55eb8b 100644
--- a/src/modules/sqlops/sql_api.h
+++ b/src/modules/sqlops/sql_api.h
@@ -72,10 +72,8 @@ int sql_reconnect(sql_con_t *sc);
int sql_do_query(sql_con_t *con, str *query, sql_result_t *res);
int sql_do_query_async(sql_con_t *con, str *query);
-#ifdef WITH_XAVP
int sql_do_xquery(sip_msg_t *msg, sql_con_t *con, pv_elem_t *query,
pv_elem_t *res);
-#endif
int sql_do_pvquery(sip_msg_t *msg, sql_con_t *con, pv_elem_t *query,
pvname_list_t *res);
int pv_get_sqlrows(sip_msg_t *msg, pv_param_t *param,
diff --git a/src/modules/sqlops/sqlops.c b/src/modules/sqlops/sqlops.c
index 7c248ab887..1b16c06ed7 100644
--- a/src/modules/sqlops/sqlops.c
+++ b/src/modules/sqlops/sqlops.c
@@ -62,9 +62,7 @@ static int sql_check_connection(sql_con_t*);
static int sql_query(struct sip_msg*, char*, char*, char*);
static int sql_query2(struct sip_msg*, char*, char*);
static int sql_query_async(struct sip_msg*, char*, char*);
-#ifdef WITH_XAVP
static int sql_xquery(struct sip_msg *msg, char *dbl, char *query, char *res);
-#endif
static int sql_pvquery(struct sip_msg *msg, char *dbl, char *query, char *res);
static int sql_rfree(struct sip_msg*, char*, char*);
static int mod_init(void);
@@ -72,9 +70,7 @@ static int child_init(int rank);
static void destroy(void);
static int fixup_sql_query(void** param, int param_no);
-#ifdef WITH_XAVP
static int fixup_sql_xquery(void** param, int param_no);
-#endif
static int fixup_sql_pvquery(void** param, int param_no);
static int fixup_sql_rfree(void** param, int param_no);
@@ -100,10 +96,8 @@ static cmd_export_t cmds[]={
ANY_ROUTE},
{"sql_query_async", (cmd_function)sql_query_async, 2, fixup_sql_query, 0,
ANY_ROUTE},
-#ifdef WITH_XAVP
{"sql_xquery", (cmd_function)sql_xquery, 3, fixup_sql_xquery, 0,
ANY_ROUTE},
-#endif
{"sql_pvquery", (cmd_function)sql_pvquery, 3, fixup_sql_pvquery, 0,
ANY_ROUTE},
{"sql_result_free", (cmd_function)sql_rfree, 1, fixup_sql_rfree, 0,
@@ -276,7 +270,6 @@ static int sql_query_async(struct sip_msg *msg, char *dbl, char
*query)
}
-#ifdef WITH_XAVP
/**
*
*/
@@ -288,7 +281,6 @@ static int sql_xquery(struct sip_msg *msg, char *dbl, char *query,
char *res)
}
return sql_do_xquery(msg, (sql_con_t*)dbl, (pv_elem_t*)query, (pv_elem_t*)res);
}
-#endif
/**
*
@@ -351,7 +343,6 @@ static int fixup_sql_query(void** param, int param_no)
return 0;
}
-#ifdef WITH_XAVP
/**
*
*/
@@ -389,7 +380,6 @@ static int fixup_sql_xquery(void** param, int param_no)
}
return 0;
}
-#endif
/**
*