Skip to content

Commit

Permalink
sqlops: removed ifdefs for WITH_XAVP
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Apr 18, 2019
1 parent 7e8b5ea commit e1a6f39
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 17 deletions.
6 changes: 1 addition & 5 deletions src/modules/sqlops/sql_api.c
Expand Up @@ -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"

Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions src/modules/sqlops/sql_api.h
Expand Up @@ -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,
Expand Down
10 changes: 0 additions & 10 deletions src/modules/sqlops/sqlops.c
Expand Up @@ -62,19 +62,15 @@ 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);
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);

Expand All @@ -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,
Expand Down Expand Up @@ -276,7 +270,6 @@ static int sql_query_async(struct sip_msg *msg, char *dbl, char *query)
}


#ifdef WITH_XAVP
/**
*
*/
Expand All @@ -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

/**
*
Expand Down Expand Up @@ -351,7 +343,6 @@ static int fixup_sql_query(void** param, int param_no)
return 0;
}

#ifdef WITH_XAVP
/**
*
*/
Expand Down Expand Up @@ -389,7 +380,6 @@ static int fixup_sql_xquery(void** param, int param_no)
}
return 0;
}
#endif

/**
*
Expand Down

0 comments on commit e1a6f39

Please sign in to comment.