Module: kamailio Branch: master Commit: 1980c2c302f1dfd577391cafcc2849db7ff35a29 URL: https://github.com/kamailio/kamailio/commit/1980c2c302f1dfd577391cafcc2849db7ff35a29
Author: Daniel-Constantin Mierla <mico...@gmail.com> Committer: Daniel-Constantin Mierla <mico...@gmail.com> Date: 2017-03-13T15:14:05+01:00 db_text: rpc command query requires linux for open_memstream() - use the os define to enable/disable it at compile time --- Modified: src/modules/db_text/db_text.c --- Diff: https://github.com/kamailio/kamailio/commit/1980c2c302f1dfd577391cafcc2849db7ff35a29.diff Patch: https://github.com/kamailio/kamailio/commit/1980c2c302f1dfd577391cafcc2849db7ff35a29.patch --- diff --git a/src/modules/db_text/db_text.c b/src/modules/db_text/db_text.c index eaeb408..96d3212 100644 --- a/src/modules/db_text/db_text.c +++ b/src/modules/db_text/db_text.c @@ -164,6 +164,7 @@ static const char *rpc_query_doc[2] = { /* rpc function implementations */ static void rpc_query(rpc_t *rpc, void *ctx) { +#ifdef __OS_linux str sql; db1_con_t *con; db1_res_t* _r; @@ -226,6 +227,9 @@ static void rpc_query(rpc_t *rpc, void *ctx) { end: dbt_close(con); +#else + rpc->fault(ctx, 500, "Command available on Linux only"); +#endif } static rpc_export_t rpc_methods[] = { _______________________________________________ sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev