kamailio.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
List overview
Download
sr-dev
January 2013
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
sr-dev@lists.kamailio.org
46 participants
325 discussions
Start a n
N
ew thread
git:master: modules/ims_qos: Added documentation
by Richard Good
Module: sip-router Branch: master Commit: 3b575a618545dcd65362ea6de972222703d824d9 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=3b575a6…
Author: Richard Good <richard.good(a)smilecoms.com> Committer: Richard Good <richard.good(a)smilecoms.com> Date: Thu Jan 10 16:28:07 2013 +0200 modules/ims_qos: Added documentation Added admin documentation and README for ims_qos module --- modules/ims_qos/README | 282 ++++++++++++++++++++++++++++++ modules/ims_qos/doc/Makefile | 4 + modules/ims_qos/doc/ims_qos.xml | 65 +++++++ modules/ims_qos/doc/ims_qos_admin.xml | 305 +++++++++++++++++++++++++++++++++ 4 files changed, 656 insertions(+), 0 deletions(-) Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=3b5…
11 years, 10 months
1
0
0
0
git:master: modules/ims_usrloc_pcscf: Updated documentation
by Richard Good
Module: sip-router Branch: master Commit: e7b5f667a4b094c1aa1c426fe33648db782f9190 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=e7b5f66…
Author: Richard Good <richard.good(a)smilecoms.com> Committer: Richard Good <richard.good(a)smilecoms.com> Date: Thu Jan 10 16:08:54 2013 +0200 modules/ims_usrloc_pcscf: Updated documentation Updated documentation and added README for ims_usrloc_pcscf module --- modules/ims_usrloc_pcscf/README | 214 ++++++ modules/ims_usrloc_pcscf/doc/ims_usrloc_pcscf.xml | 5 +- .../ims_usrloc_pcscf/doc/usrloc_pcscf_devel.xml | 682 -------------------- 3 files changed, 215 insertions(+), 686 deletions(-) Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=e7b…
11 years, 10 months
1
0
0
0
git:master: modules/ims_auth: Updated documentation
by Richard Good
Module: sip-router Branch: master Commit: 743c1f7f9645ce760f5f1892fbee187f96c8513a URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=743c1f7…
Author: Richard Good <richard.good(a)smilecoms.com> Committer: Richard Good <richard.good(a)smilecoms.com> Date: Thu Jan 10 15:50:01 2013 +0200 modules/ims_auth: Updated documentation Updated documentation and added README for ims_auth modules --- modules/ims_auth/README | 402 +++++++++++++++++++++++++++++++ modules/ims_auth/doc/ims_auth_admin.xml | 20 -- 2 files changed, 402 insertions(+), 20 deletions(-) Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=743…
11 years, 10 months
1
0
0
0
git:master: modules/ims_icscf: documentation updated
by Richard Good
Module: sip-router Branch: master Commit: 0b476ea4981b750e3f5974f5fd1e3b8fb39ed8fa URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0b476ea…
Author: Richard Good <richard.good(a)smilecoms.com> Committer: Richard Good <richard.good(a)smilecoms.com> Date: Thu Jan 10 15:40:00 2013 +0200 modules/ims_icscf: documentation updated Documentation for IMS ICSCF modules updated and README added --- modules/ims_icscf/README | 310 +++++++++++++++++++++++++++++ modules/ims_icscf/doc/ims_icscf.xml | 2 +- modules/ims_icscf/doc/ims_icscf_admin.xml | 197 ++++--------------- 3 files changed, 347 insertions(+), 162 deletions(-) Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=0b4…
11 years, 10 months
1
0
0
0
git:master: modules/ims_qos: Added IMS QoS module
by Jason Penton
Module: sip-router Branch: master Commit: 06fb17e57e871e99eb251e3243f70652e92a013d URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=06fb17e…
Author: Jason Penton <jason.penton(a)smilecoms.com> Committer: Jason Penton <jason.penton(a)smilecoms.com> Date: Thu Jan 10 15:25:56 2013 +0200 modules/ims_qos: Added IMS QoS module - This module provides Diameter Rx IMS interface between PCSCF and PCRF functions --- modules/ims_qos/Makefile | 18 + modules/ims_qos/cdpeventprocessor.c | 294 ++++++++++++ modules/ims_qos/cdpeventprocessor.h | 78 +++ modules/ims_qos/mod.c | 875 +++++++++++++++++++++++++++++++++++ modules/ims_qos/mod.h | 80 ++++ modules/ims_qos/rx_aar.c | 588 +++++++++++++++++++++++ modules/ims_qos/rx_aar.h | 112 +++++ modules/ims_qos/rx_asr.c | 101 ++++ modules/ims_qos/rx_asr.h | 57 +++ modules/ims_qos/rx_authdata.c | 152 ++++++ modules/ims_qos/rx_authdata.h | 78 +++ modules/ims_qos/rx_avp.c | 771 ++++++++++++++++++++++++++++++ modules/ims_qos/rx_avp.h | 93 ++++ modules/ims_qos/rx_str.c | 170 +++++++ modules/ims_qos/rx_str.h | 62 +++ modules/ims_qos/sem.h | 90 ++++ modules/ims_qos/stats.c | 76 +++ modules/ims_qos/stats.h | 63 +++ 18 files changed, 3758 insertions(+), 0 deletions(-) Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=06f…
11 years, 10 months
1
0
0
0
git:master: parser/sdp: fast-access pointer for raw SDP stream string
by Jason Penton
Module: sip-router Branch: master Commit: cbf2cb0c1d0301d63154834fbd9220e334b9c64c URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cbf2cb0…
Author: Jason Penton <jaybeepee(a)jaybeepee-laptop.(none)> Committer: Jason Penton <jason.penton(a)smilecoms.com> Date: Thu Jan 10 14:33:54 2013 +0200 parser/sdp: fast-access pointer for raw SDP stream string - basically a pointer to the raw SDP stream --- parser/sdp/sdp.c | 4 ++++ parser/sdp/sdp.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/parser/sdp/sdp.c b/parser/sdp/sdp.c index 67174b5..f46b8de 100644 --- a/parser/sdp/sdp.c +++ b/parser/sdp/sdp.c @@ -481,6 +481,10 @@ static int parse_sdp_session(str *sdp_body, int session_num, str *cnt_disp, sdp_ stream = add_sdp_stream(session, stream_num, &sdp_media, &sdp_port, &sdp_transport, &sdp_payload, is_rtp, pf, &sdp_ip); if (stream == 0) return -1; + /* Store fast access ptr to raw stream */ + stream->raw_stream.s = tmpstr1.s; + stream->raw_stream.len = tmpstr1.len; + /* increment total number of streams */ _sdp->streams_num++; diff --git a/parser/sdp/sdp.h b/parser/sdp/sdp.h index 550a2d3..6521b2f 100644 --- a/parser/sdp/sdp.h +++ b/parser/sdp/sdp.h @@ -81,7 +81,8 @@ typedef struct sdp_stream_cell { str max_size; /**< RFC4975: max-size attribute */ str accept_types; /**< RFC4975: accept-types attribute */ str accept_wrapped_types; /**< RFC4975: accept-wrapped-types attribute */ - struct sdp_payload_attr **p_payload_attr; /**< fast access pointers to payloads */ + str raw_stream; /**< fast access to raw stream string */ + struct sdp_payload_attr **p_payload_attr; /**< fast access pointers to payloads */ struct sdp_payload_attr *payload_attr; int ice_attrs_num; /**< number of ICE attrs inside a stream */ /* add fast access pointers to ice attributes if you need them */
11 years, 10 months
1
0
0
0
git:master: modules/ims_isc: documentation added
by Richard Good
Module: sip-router Branch: master Commit: f0cb7735b766e14ba142a45064e254d82d079746 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=f0cb773…
Author: Richard Good <richard.good(a)smilecoms.com> Committer: Richard Good <richard.good(a)smilecoms.com> Date: Thu Jan 10 14:29:38 2013 +0200 modules/ims_isc: documentation added Added documentation including README for ims_isc module --- modules/ims_isc/README | 222 +++++++++++++++++++++++++++++ modules/ims_isc/doc/Makefile | 4 + modules/ims_isc/doc/ims_isc.xml | 65 +++++++++ modules/ims_isc/doc/ims_isc_admin.xml | 251 +++++++++++++++++++++++++++++++++ 4 files changed, 542 insertions(+), 0 deletions(-) Diff:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commitdiff;h=f0c…
11 years, 10 months
1
0
0
0
git:alexh/master DELETED: core: allow negative decimal numbers in configuration file parser
by Alex Hermann
Module: sip-router Branch: alexh/master DELETED Commit: 99f314429cea4341240836e9c9d62c38176eae12 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=99f3144…
Author: Alex Hermann <alex(a)speakup.nl> Committer: Alex Hermann <alex(a)speakup.nl> Date: Fri Aug 5 15:32:14 2011 +0200 core: allow negative decimal numbers in configuration file parser --- cfg.lex | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/cfg.lex b/cfg.lex index ff35a8a..ecf92db 100644 --- a/cfg.lex +++ b/cfg.lex @@ -525,7 +525,7 @@ NUM_ID {ALPHANUM}+ HEX [0-9a-fA-F] HEXNUMBER 0x{HEX}+ OCTNUMBER 0[0-7]+ -DECNUMBER 0|([1-9]{DIGIT}*) +DECNUMBER 0|(-?[1-9]{DIGIT}*) BINNUMBER [0-1]+b HEX4 {HEX}{1,4} IPV6ADDR ({HEX4}":"){7}{HEX4}|({HEX4}":"){1,7}(":"{HEX4}){1,7}|":"(":"{HEX4}){1,7}|({HEX4}":"){1,7}":"|"::"
11 years, 10 months
1
0
0
0
git:alexh/3.1/xavp DELETED: modules_k/sqlops: Add xavp support to sqlops
by Alex Hermann
Module: sip-router Branch: alexh/3.1/xavp DELETED Commit: b01c6a7ea86ef3c85652da198ba5405e049c988b URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=b01c6a7…
Author: Alex Hermann <alex(a)speakup.nl> Committer: Alex Hermann <alex(a)speakup.nl> Date: Tue Dec 21 10:06:29 2010 +0100 modules_k/sqlops: Add xavp support to sqlops Introduce a new function sql_xquery that stores the result in an xavp. --- modules_k/sqlops/doc/sqlops_admin.xml | 54 ++++++++++++++ modules_k/sqlops/sql_api.c | 130 +++++++++++++++++++++++++++++++++ modules_k/sqlops/sql_api.h | 4 + modules_k/sqlops/sqlops.c | 56 ++++++++++++++ 4 files changed, 244 insertions(+), 0 deletions(-) diff --git a/modules_k/sqlops/doc/sqlops_admin.xml b/modules_k/sqlops/doc/sqlops_admin.xml index 0c0a444..24a6d8c 100644 --- a/modules_k/sqlops/doc/sqlops_admin.xml +++ b/modules_k/sqlops/doc/sqlops_admin.xml @@ -60,6 +60,14 @@ times. </para> </listitem> + <listitem> + <para> + <emphasis>alternatively, results can be stored in xavps. Columns are + accessed by their names, rows by xavp index. Xavp's are automatically + available during the transactions lifetime and don't need to be + destroyed manually. + </para> + </listitem> </itemizedlist> </section> @@ -192,6 +200,52 @@ sql_result_free("ra"); </section> <section> <title> + <function moreinfo="none">sql_xquery(connection, query, result)</function> + </title> + <para> + Make a SQL query using 'connection' and store data in 'result' xavp. + </para> + <itemizedlist> + <listitem> + <para> + <emphasis>connection</emphasis> - the name of the connection + to be used for query (defined via the <quote>sqlcon</quote> parameter). + </para> + </listitem> + <listitem> + <para> + <emphasis>query</emphasis> - SQL query string or pseudo-variables containing SQL query. + </para> + </listitem> + <listitem> + <para> + <emphasis>result</emphasis> - string name to identify the + result xavp. Each row will be added to this xavp, each column can + be accessed by its name. + </para> + </listitem> + </itemizedlist> + <para> + This function can be used from REQUEST_ROUTE, FAILURE_ROUTE, + ONREPLY_ROUTE, BRANCH_ROUTE. + </para> + <example> + <title><function>sql_xquery()</function> usage</title> + <programlisting format="linespecific"> +... +modparam("sqlops","sqlcon","ca=>&exampledb;") +... +sql_xquery("ca", "select * from domain", "ra"); + xlog("first domain: $xavp(ra=>domain) with id: $xavp(ra=>domain_id)\n"); + pv_unset("$xavp(ra)"); + xlog("second domain: $xavp(ra=>domain) with id: $xavp(ra=>domain_id)\n"); + +... +</programlisting> + </example> + </section> + <section> + <title> <function moreinfo="none">sql_result_free(result)</function> </title> <para> diff --git a/modules_k/sqlops/sql_api.c b/modules_k/sqlops/sql_api.c index 5b69108..7f77d37 100644 --- a/modules_k/sqlops/sql_api.c +++ b/modules_k/sqlops/sql_api.c @@ -32,6 +32,9 @@ #include "../../dprint.h" #include "../../lib/kcore/hash_func.h" #include "../../ut.h" +#ifdef WITH_XAVP +#include "../../xavp.h" +#endif #include "sql_api.h" @@ -345,6 +348,133 @@ error: return -1; } +#ifdef WITH_XAVP +int sql_do_xquery(struct sip_msg *msg, sql_con_t *con, pv_elem_t *query, + pv_elem_t *res) +{ + db1_res_t* db_res = NULL; + sr_xavp_t *row = NULL; + sr_xval_t val; + int i, j; + str sq, xavp; + + if(msg==NULL || query==NULL) + { + LM_ERR("bad parameters\n"); + return -1; + } + if(pv_printf_s(msg, query, &sq)!=0) + { + LM_ERR("cannot print the sql query\n"); + return -1; + } + if(con->dbf.raw_query(con->dbh, &sq, &db_res)!=0) + { + LM_ERR("cannot do the query\n"); + return -1; + } + + if(db_res==NULL || RES_ROW_N(db_res)<=0 || RES_COL_N(db_res)<=0) + { + LM_DBG("no result after query\n"); + con->dbf.free_result(con->dbh, db_res); + return 2; + } + + if(pv_printf_s(msg, res, &xavp)!=0) + { + LM_ERR("cannot print the result parameter\n"); + return -1; + } + + for(i=RES_ROW_N(db_res)-1; i>=0; i--) + { + row = NULL; + for(j=RES_COL_N(db_res)-1; j>=0; j--) + { + if(RES_ROWS(db_res)[i].values[j].nul) + { + val.type = SR_XTYPE_NULL; + } else + { + switch(RES_ROWS(db_res)[i].values[j].type) + { + case DB1_STRING: + val.type = SR_XTYPE_STR; + sq.s= + (char*)RES_ROWS(db_res)[i].values[j].val.string_val; + sq.len=strlen(sq.s); + break; + case DB1_STR: + val.type = SR_XTYPE_STR; + sq.len= + RES_ROWS(db_res)[i].values[j].val.str_val.len; + sq.s= + (char*)RES_ROWS(db_res)[i].values[j].val.str_val.s; + break; + case DB1_BLOB: + val.type = SR_XTYPE_STR; + sq.len= + RES_ROWS(db_res)[i].values[j].val.blob_val.len; + sq.s= + (char*)RES_ROWS(db_res)[i].values[j].val.blob_val.s; + break; + case DB1_INT: + val.type = SR_XTYPE_INT; + val.v.i + = (int)RES_ROWS(db_res)[i].values[j].val.int_val; + break; + case DB1_DATETIME: + val.type = SR_XTYPE_INT; + val.v.i + = (int)RES_ROWS(db_res)[i].values[j].val.time_val; + break; + case DB1_BITMAP: + val.type = SR_XTYPE_INT; + val.v.i + = (int)RES_ROWS(db_res)[i].values[j].val.bitmap_val; + break; + default: + val.type = SR_XTYPE_NULL; + } + if(val.type == SR_XTYPE_STR) + { + if(sq.len==0) + { + val.v.s = _sql_empty_str; + } else { + val.v.s.s = (char*)pkg_malloc(sq.len*sizeof(char)); + if(val.v.s.s == NULL) + { + LM_ERR("no more memory\n"); + goto error; + } + memcpy(val.v.s.s, sq.s, sq.len); + val.v.s.len = sq.len; + } + } + } + /* Add column to current row, under the column's name */ + LM_DBG("Adding column: %.*s\n", RES_NAMES(db_res)[j]->len, RES_NAMES(db_res)[j]->s); + xavp_add_value(RES_NAMES(db_res)[j], &val, &row); + } + /* Add row to result xavp */ + val.type = SR_XTYPE_XAVP; + val.v.xavp = row; + LM_DBG("Adding row\n"); + xavp_add_value(&xavp, &val, NULL); + } + + con->dbf.free_result(con->dbh, db_res); + return 1; + +error: + con->dbf.free_result(con->dbh, db_res); + return -1; + +} +#endif + int sql_parse_param(char *val) { str name; diff --git a/modules_k/sqlops/sql_api.h b/modules_k/sqlops/sql_api.h index 1b19526b..1b4eb20 100644 --- a/modules_k/sqlops/sql_api.h +++ b/modules_k/sqlops/sql_api.h @@ -72,6 +72,10 @@ void sql_destroy(void); int sql_connect(void); int sql_do_query(struct sip_msg *msg, sql_con_t *con, pv_elem_t *query, sql_result_t *res); +#ifdef WITH_XAVP +int sql_do_xquery(struct sip_msg *msg, sql_con_t *con, pv_elem_t *query, + pv_elem_t *res); +#endif sql_con_t* sql_get_connection(str *name); sql_result_t* sql_get_result(str *name); diff --git a/modules_k/sqlops/sqlops.c b/modules_k/sqlops/sqlops.c index a9fa054..18293ff 100644 --- a/modules_k/sqlops/sqlops.c +++ b/modules_k/sqlops/sqlops.c @@ -58,11 +58,17 @@ MODULE_VERSION /** module functions */ static int sql_query(struct sip_msg*, char*, char*, char*); +#ifdef WITH_XAVP +static int sql_xquery(struct sip_msg *msg, char *dbl, char *query, char *res); +#endif static int sql_rfree(struct sip_msg*, char*, char*); 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_rfree(void** param, int param_no); static int sql_param(modparam_t type, void* val); @@ -77,6 +83,11 @@ static cmd_export_t cmds[]={ {"sql_query", (cmd_function)sql_query, 3, fixup_sql_query, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE | LOCAL_ROUTE}, +#ifdef WITH_XAVP + {"sql_xquery", (cmd_function)sql_xquery, 3, fixup_sql_xquery, 0, + REQUEST_ROUTE | FAILURE_ROUTE | + ONREPLY_ROUTE | BRANCH_ROUTE | LOCAL_ROUTE}, +#endif {"sql_result_free", (cmd_function)sql_rfree, 1, fixup_sql_rfree, 0, REQUEST_ROUTE | FAILURE_ROUTE | ONREPLY_ROUTE | BRANCH_ROUTE | LOCAL_ROUTE}, @@ -137,6 +148,14 @@ static int sql_query(struct sip_msg *msg, char *dbl, char *query, char *res) (sql_result_t*)res); } +#ifdef WITH_XAVP +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 + static int sql_rfree(struct sip_msg *msg, char *res, char *s2) { sql_reset_result((sql_result_t*)res); @@ -180,6 +199,43 @@ static int fixup_sql_query(void** param, int param_no) return 0; } +#ifdef WITH_XAVP +static int fixup_sql_xquery(void** param, int param_no) +{ + sql_con_t *con = NULL; + pv_elem_t *pv = NULL; + str s; + + s.s = (char*)(*param); + s.len = strlen(s.s); + + if (param_no==1) { + con = sql_get_connection(&s); + if(con==NULL) + { + LM_ERR("invalid connection [%s]\n", s.s); + return E_UNSPEC; + } + *param = (void*)con; + } else if (param_no==2) { + if(pv_parse_format(&s, &pv)<0) + { + LM_ERR("invalid query string [%s]\n", s.s); + return E_UNSPEC; + } + *param = (void*)pv; + } else if (param_no==3) { + if(pv_parse_format(&s, &pv)<0) + { + LM_ERR("invalid result [%s]\n", s.s); + return E_UNSPEC; + } + *param = (void*)pv; + } + return 0; +} +#endif + static int fixup_sql_rfree(void** param, int param_no) { sql_result_t *res = NULL;
11 years, 10 months
1
0
0
0
git:alexh/for4.0 DELETED: modules_k/kex: call pkg_proc_stats_destroy in module destroy function to free memory
by Alex Hermann
Module: sip-router Branch: alexh/for4.0 DELETED Commit: 7ca4fb63f87c686f29f1a19715a014db2ebda703 URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=7ca4fb6…
Author: Alex Hermann <alex(a)speakup.nl> Committer: Alex Hermann <alex(a)speakup.nl> Date: Mon Nov 5 13:33:27 2012 +0100 modules_k/kex: call pkg_proc_stats_destroy in module destroy function to free memory --- modules_k/kex/kex_mod.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/modules_k/kex/kex_mod.c b/modules_k/kex/kex_mod.c index 8dafb7f..fe3c8eb 100644 --- a/modules_k/kex/kex_mod.c +++ b/modules_k/kex/kex_mod.c @@ -167,6 +167,7 @@ static int child_init(int rank) */ static void destroy(void) { + pkg_proc_stats_destroy(); return; }
11 years, 10 months
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
33
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
Results per page:
10
25
50
100
200