From fee2de5416296f06e61ceb2924c2848f7959abf9 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Thu, 3 Oct 2013 13:22:16 +0200 Subject: [PATCH] refresh and remove patches --- debian/patches/series | 1 - .../sipwise/accounting_time_precision.patch | 30 ++++++---------- debian/patches/sipwise/add_pcem_module.patch | 31 ++++------------ .../sipwise/dialoginfo_notify_body.patch | 8 ++--- .../sipwise/dialplan_regexp_subst.patch | 30 +++++++--------- .../do-not-install-default-config.patch | 8 ++--- ...se-6th-param-to-set-the-contact-path.patch | 27 +++++--------- .../sipwise/nathelper.contact_only.patch | 36 +++++++------------ .../sipwise/natping_disable_bflag.patch | 4 +-- debian/patches/sipwise/parallel_build.patch | 6 ++-- .../sipwise/unforce_rtp_proxy_one_param.patch | 10 +++--- ...ls-kamctl-Add-contact-path-parameter.patch | 17 +++------ ....xavp.get-function-in-order-to-get-a.patch | 9 ++--- ..._lua-Added-sr.xavp.get_keys-function.patch | 9 ++--- ...w-xavp-semantics-on-second-parameter.patch | 13 +++---- ...d-function-to-get-the-pv-cache-table.patch | 13 ++----- ...free-pvar-spec-is-reference-to-cache.patch | 7 +--- ...xavp-name-is-marked-as-PVT_XAVP-type.patch | 7 +--- ...-to-pv_spec_t-on-lvalue-union.-Use-p.patch | 19 +++------- ...vp_name_t-declaration-to-core-pvar.h.patch | 9 +---- ...-pv-transformation-en-de-code.base64.patch | 13 ++----- ..._redirect-check-reason-value-before-.patch | 35 ------------------ 22 files changed, 92 insertions(+), 250 deletions(-) delete mode 100644 debian/patches/upstream/uac_redirect-get_redirect-check-reason-value-before-.patch diff --git a/debian/patches/series b/debian/patches/series index 65155ca6a..2c0b65288 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -22,7 +22,6 @@ upstream/debug/0001-modules-debugger-trace-msg-out.patch upstream/debug/modules-debugger-add-dbg_pv_dump-config-function.patch upstream/debug/reset_msgid.patch upstream/websocket.patch -upstream/uac_redirect-get_redirect-check-reason-value-before-.patch upstream/avpops-allow-use-of-avps-as-second-parameter-on-re-o.patch upstream/avops-use-pv_cache_get-instead-of-pv_parse_spec.patch upstream/pv-Move-pv_xavp_name_t-declaration-to-core-pvar.h.patch diff --git a/debian/patches/sipwise/accounting_time_precision.patch b/debian/patches/sipwise/accounting_time_precision.patch index 83b2cb8a4..45409d7fe 100644 --- a/debian/patches/sipwise/accounting_time_precision.patch +++ b/debian/patches/sipwise/accounting_time_precision.patch @@ -50,11 +50,9 @@ - #endif /* SQL_ACC */ - - -diff --git a/modules/acc/acc.c b/modules/acc/acc.c -index d4fd89c..e322ba1 100644 --- a/modules/acc/acc.c +++ b/modules/acc/acc.c -@@ -125,6 +125,14 @@ int core2strar(struct sip_msg *req, str *c_vals, int *i_vals, char *t_vals) +@@ -125,6 +125,14 @@ struct hdr_field *from; struct hdr_field *to; @@ -62,14 +60,14 @@ index d4fd89c..e322ba1 100644 + struct timezone tz; + struct tm *tm; + uint64_t time_hires; -+ ++ + gettimeofday(&tv, &tz); + tm = localtime(&tv.tv_sec); + /* method : request/reply - cseq parsed in acc_preparse_req() */ c_vals[0] = get_cseq(req)->method; t_vals[0] = TYPE_STR; -@@ -174,6 +182,10 @@ int core2strar(struct sip_msg *req, str *c_vals, int *i_vals, char *t_vals) +@@ -174,6 +182,10 @@ t_vals[5] = TYPE_STR; acc_env.ts = time(NULL); @@ -80,7 +78,7 @@ index d4fd89c..e322ba1 100644 return ACC_CORE_LEN; } -@@ -306,7 +318,8 @@ static void acc_db_init_keys(void) +@@ -310,7 +322,8 @@ db_keys[n++] = &acc_sipcode_col; db_keys[n++] = &acc_sipreason_col; db_keys[n++] = &acc_time_col; @@ -90,7 +88,7 @@ index d4fd89c..e322ba1 100644 /* init the extra db keys */ for(extra=db_extra; extra ; extra=extra->next) -@@ -322,6 +335,7 @@ static void acc_db_init_keys(void) +@@ -326,6 +339,7 @@ VAL_NULL(db_vals+i)=0; } VAL_TYPE(db_vals+time_idx)=DB1_DATETIME; @@ -98,7 +96,7 @@ index d4fd89c..e322ba1 100644 } -@@ -380,7 +394,8 @@ int acc_db_request( struct sip_msg *rq) +@@ -384,7 +398,8 @@ VAL_STR(db_vals+i) = val_arr[i]; /* time value */ VAL_TIME(db_vals+(m++)) = acc_env.ts; @@ -108,11 +106,9 @@ index d4fd89c..e322ba1 100644 /* extra columns */ m += extra2strar( db_extra, rq, val_arr+m, int_arr+m, type_arr+m); -diff --git a/modules/acc/acc_api.h b/modules/acc/acc_api.h -index bc52eee..61bbb51 100644 --- a/modules/acc/acc_api.h +++ b/modules/acc/acc_api.h -@@ -57,6 +57,7 @@ typedef struct acc_enviroment { +@@ -57,6 +57,7 @@ struct hdr_field *to; str text; time_t ts; @@ -120,11 +116,9 @@ index bc52eee..61bbb51 100644 } acc_enviroment_t; /* acc extra parameter */ -diff --git a/modules/acc/acc_mod.c b/modules/acc/acc_mod.c -index 9f40e14..f8124d5 100644 --- a/modules/acc/acc_mod.c +++ b/modules/acc/acc_mod.c -@@ -195,6 +195,7 @@ str acc_callid_col = str_init("callid"); +@@ -195,6 +195,7 @@ str acc_sipcode_col = str_init("sip_code"); str acc_sipreason_col = str_init("sip_reason"); str acc_time_col = str_init("time"); @@ -132,7 +126,7 @@ index 9f40e14..f8124d5 100644 int acc_db_insert_mode = 0; #endif -@@ -289,6 +290,7 @@ static param_export_t params[] = { +@@ -289,6 +290,7 @@ {"acc_sip_code_column", STR_PARAM, &acc_sipcode_col.s }, {"acc_sip_reason_column",STR_PARAM, &acc_sipreason_col.s }, {"acc_time_column", STR_PARAM, &acc_time_col.s }, @@ -140,7 +134,7 @@ index 9f40e14..f8124d5 100644 {"db_insert_mode", INT_PARAM, &acc_db_insert_mode }, #endif {0,0,0} -@@ -453,6 +455,7 @@ static int mod_init( void ) +@@ -453,6 +455,7 @@ acc_sipcode_col.len = strlen(acc_sipcode_col.s); acc_sipreason_col.len = strlen(acc_sipreason_col.s); acc_time_col.len = strlen(acc_time_col.s); @@ -148,11 +142,9 @@ index 9f40e14..f8124d5 100644 #endif if (log_facility_str) { -diff --git a/modules/acc/acc_mod.h b/modules/acc/acc_mod.h -index 5e7792a..6494a30 100644 --- a/modules/acc/acc_mod.h +++ b/modules/acc/acc_mod.h -@@ -92,6 +92,7 @@ extern str acc_cseqno_col; +@@ -92,6 +92,7 @@ extern str acc_sipcode_col; extern str acc_sipreason_col; extern str acc_time_col; diff --git a/debian/patches/sipwise/add_pcem_module.patch b/debian/patches/sipwise/add_pcem_module.patch index 5b5aa5e8c..af93ae8bb 100644 --- a/debian/patches/sipwise/add_pcem_module.patch +++ b/debian/patches/sipwise/add_pcem_module.patch @@ -1,8 +1,6 @@ -diff --git a/Makefile.groups b/Makefile.groups -index aa41e71..72a29d3 100644 --- a/Makefile.groups +++ b/Makefile.groups -@@ -25,7 +25,7 @@ mod_list_db=acc alias_db auth_db avpops cfg_db db_text db_flatstore \ +@@ -25,7 +25,7 @@ db_cluster dialog dispatcher domain drouting group \ htable imc matrix msilo mtree p_usrloc pdt permissions \ pipelimit prefix_route registrar sipcapture siptrace speeddial \ @@ -11,9 +9,6 @@ index aa41e71..72a29d3 100644 # - common modules depending on database, using UID db schema -diff --git a/modules/pcem/Makefile b/modules/pcem/Makefile -new file mode 100644 -index 0000000..3ab8f8f --- /dev/null +++ b/modules/pcem/Makefile @@ -0,0 +1,18 @@ @@ -35,15 +30,12 @@ index 0000000..3ab8f8f +SER_LIBS+=$(SERLIBPATH)/srdb1/srdb1 $(SERLIBPATH)/kcore/kcore + +include ../../Makefile.modules -diff --git a/modules/pcem/pcem_logic.c b/modules/pcem/pcem_logic.c -new file mode 100644 -index 0000000..1d7607a --- /dev/null +++ b/modules/pcem/pcem_logic.c @@ -0,0 +1,130 @@ +/* + * $Id$ -+ * ++ * + * PacketCable Event Messages module + * + * Copyright (C) 2012 Sipwise GmbH @@ -98,7 +90,7 @@ index 0000000..1d7607a + return -1; + } +*/ -+ return 0; ++ return 0; +} + +void pcem_onreq( struct cell* t, int type, struct tmcb_params *ps ) @@ -116,7 +108,7 @@ index 0000000..1d7607a + return; + + is_invite = (ps->req->REQ_METHOD==METHOD_INVITE)?1:0; -+ ++ + tmcb_types = + /* get completed transactions */ + TMCB_RESPONSE_OUT | @@ -171,9 +163,6 @@ index 0000000..1d7607a + } +} + -diff --git a/modules/pcem/pcem_logic.h b/modules/pcem/pcem_logic.h -new file mode 100644 -index 0000000..9f6a97a --- /dev/null +++ b/modules/pcem/pcem_logic.h @@ -0,0 +1,34 @@ @@ -211,15 +200,12 @@ index 0000000..9f6a97a +void pcem_onreq( struct cell* t, int type, struct tmcb_params *ps ); + +#endif -diff --git a/modules/pcem/pcem_mod.c b/modules/pcem/pcem_mod.c -new file mode 100644 -index 0000000..0d0ea2c --- /dev/null +++ b/modules/pcem/pcem_mod.c @@ -0,0 +1,153 @@ +/* + * $Id$ -+ * ++ * + * PacketCable Event Messages module + * + * Copyright (C) 2012 Sipwise GmbH @@ -317,12 +303,12 @@ index 0000000..0d0ea2c + +static int mod_init( void ) +{ -+ if ((pcem_qos_flag != -1) && ++ if ((pcem_qos_flag != -1) && + !flag_in_range(pcem_qos_flag)) { + LM_ERR("pcem_qos_flag set to invalid value\n"); + return -1; + } -+ if ((pcem_all_flag != -1) && ++ if ((pcem_all_flag != -1) && + !flag_in_range(pcem_all_flag)) { + LM_ERR("pcem_all_flag set to invalid value\n"); + return -1; @@ -370,9 +356,6 @@ index 0000000..0d0ea2c +{ +} + -diff --git a/modules/pcem/pcem_mod.h b/modules/pcem/pcem_mod.h -new file mode 100644 -index 0000000..167fd30 --- /dev/null +++ b/modules/pcem/pcem_mod.h @@ -0,0 +1,33 @@ diff --git a/debian/patches/sipwise/dialoginfo_notify_body.patch b/debian/patches/sipwise/dialoginfo_notify_body.patch index f2eebd64c..875998946 100644 --- a/debian/patches/sipwise/dialoginfo_notify_body.patch +++ b/debian/patches/sipwise/dialoginfo_notify_body.patch @@ -1,8 +1,6 @@ -diff --git a/modules/presence_dialoginfo/notify_body.c b/modules/presence_dialoginfo/notify_body.c -index 6a63d3e..4f49998 100644 --- a/modules/presence_dialoginfo/notify_body.c +++ b/modules/presence_dialoginfo/notify_body.c -@@ -66,8 +66,10 @@ str* dlginfo_agg_nbody(str* pres_user, str* pres_domain, str** body_array, int n +@@ -66,8 +66,10 @@ LM_DBG("[pres_user]=%.*s [pres_domain]= %.*s, [n]=%d\n", pres_user->len, pres_user->s, pres_domain->len, pres_domain->s, n); @@ -15,7 +13,7 @@ index 6a63d3e..4f49998 100644 n_body= agregate_xmls(pres_user, pres_domain, body_array, n); LM_DBG("[n_body]=%p\n", n_body); -@@ -106,13 +108,17 @@ str* agregate_xmls(str* pres_user, str* pres_domain, str** body_array, int n) +@@ -106,13 +108,17 @@ LM_DBG("[pres_user]=%.*s [pres_domain]= %.*s, [n]=%d\n", pres_user->len, pres_user->s, pres_domain->len, pres_domain->s, n); @@ -38,7 +36,7 @@ index 6a63d3e..4f49998 100644 /* parse all the XML documents */ for(i=0; isubst_comp; repl_comp = rule->repl_comp; @@ -60,7 +56,7 @@ index ec2e5bb..63cf7d5 100644 LM_ERR("invalid replacing string\n"); goto error; } -@@ -194,108 +162,156 @@ int rule_translate(struct sip_msg *msg, str string, dpl_node_t * rule, +@@ -194,108 +162,156 @@ return 0; } @@ -88,8 +84,8 @@ index ec2e5bb..63cf7d5 100644 + if (pcre_exec(rule->subst_comp, NULL, string.s, string.len, + 0, 0, ovector, 3 * (MAX_REPLACE_WITH + 1)) <= 0) { + LM_ERR("the string %.*s matched " -+ "the match_exp %.*s but not the subst_exp %.*s!\n", -+ string.len, string.s, ++ "the match_exp %.*s but not the subst_exp %.*s!\n", ++ string.len, string.s, + rule->match_exp.len, rule->match_exp.s, + rule->subst_exp.len, rule->subst_exp.s); + return -1; @@ -117,11 +113,6 @@ index ec2e5bb..63cf7d5 100644 + memcpy(result->s, string.s, ovector[0]); + result->len += ovector[0]; + } -+ -+ if (repl_comp) { -+ /* offset- offset in the replacement string */ -+ repl_nb = offset = 0; -+ p=repl_comp->replacement.s; - switch(token.type) { - case REPLACE_NMATCH: @@ -131,10 +122,15 @@ index ec2e5bb..63cf7d5 100644 - match.len = ovector[match_nb + 1] - ovector[match_nb]; - if(result->len + match.len >= MAX_PHONE_NB_DIGITS){ - LM_ERR("overflow\n"); ++ if (repl_comp) { ++ /* offset- offset in the replacement string */ ++ repl_nb = offset = 0; ++ p=repl_comp->replacement.s; ++ + while( repl_nb < repl_comp->n_escapes){ + + token = repl_comp->replace[repl_nb]; -+ ++ + if(offset< token.offset){ + if((repl_comp->replacement.len < offset)|| + (result->len + token.offset -offset >= MAX_PHONE_NB_DIGITS)){ @@ -157,7 +153,7 @@ index ec2e5bb..63cf7d5 100644 - offset += token.size; + switch(token.type) { + case REPLACE_NMATCH: -+ /*copy from the match subexpression*/ ++ /*copy from the match subexpression*/ + match_nb = token.u.nmatch * 2; + match.s = string.s + ovector[match_nb]; + match.len = ovector[match_nb + 1] - ovector[match_nb]; @@ -195,7 +191,7 @@ index ec2e5bb..63cf7d5 100644 - case REPLACE_URI: - if ( msg== NULL || msg->first_line.type!=SIP_REQUEST){ - LM_CRIT("uri substitution attempt on no request" -+ case REPLACE_URI: ++ case REPLACE_URI: + if ( msg== NULL || msg->first_line.type!=SIP_REQUEST){ + LM_CRIT("uri substitution attempt on no request" " message\n"); diff --git a/debian/patches/sipwise/do-not-install-default-config.patch b/debian/patches/sipwise/do-not-install-default-config.patch index 360ace13c..46f2b198b 100644 --- a/debian/patches/sipwise/do-not-install-default-config.patch +++ b/debian/patches/sipwise/do-not-install-default-config.patch @@ -7,11 +7,9 @@ Subject: do not install default config utils/kamctl/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -diff --git a/Makefile b/Makefile -index b35ce80..8ec62d2 100644 --- a/Makefile +++ b/Makefile -@@ -707,7 +707,7 @@ sunpkg: +@@ -707,7 +707,7 @@ .PHONY: install install: mk_params="compile_for_install=yes" @@ -20,11 +18,9 @@ index b35ce80..8ec62d2 100644 install-doc install-man install-utils install-share .PHONY: dbinstall -diff --git a/utils/kamctl/Makefile b/utils/kamctl/Makefile -index 3056ae0..d0d3fac 100644 --- a/utils/kamctl/Makefile +++ b/utils/kamctl/Makefile -@@ -8,7 +8,7 @@ all: +@@ -8,7 +8,7 @@ install-if-newer: install diff --git a/debian/patches/sipwise/modules-usrloc-use-6th-param-to-set-the-contact-path.patch b/debian/patches/sipwise/modules-usrloc-use-6th-param-to-set-the-contact-path.patch index 4b97adaf5..df04eecf8 100644 --- a/debian/patches/sipwise/modules-usrloc-use-6th-param-to-set-the-contact-path.patch +++ b/debian/patches/sipwise/modules-usrloc-use-6th-param-to-set-the-contact-path.patch @@ -10,11 +10,9 @@ Subject: [PATCH 1/2] modules/usrloc: use 6th param to set the contact path modules/usrloc/ul_rpc.c | 23 +++++++++++++++-------- 4 files changed, 24 insertions(+), 17 deletions(-) -diff --git a/modules/usrloc/README b/modules/usrloc/README -index 0359b4d..7d87c70 100644 --- a/modules/usrloc/README +++ b/modules/usrloc/README -@@ -813,7 +813,7 @@ modparam("usrloc", "db_ops_ruid", 1) +@@ -808,7 +808,7 @@ * contact - contact string to be added * expires - expires value of the contact * Q - Q value of the contact @@ -23,7 +21,7 @@ index 0359b4d..7d87c70 100644 * flags - internal USRLOC flags of the contact * cflags - per branch flags of the contact * methods - mask with supported requests of the contact -@@ -886,7 +886,7 @@ modparam("usrloc", "db_ops_ruid", 1) +@@ -881,7 +881,7 @@ * contact - contact string to be added * expires - expires value of the contact * Q - Q value of the contact @@ -32,11 +30,9 @@ index 0359b4d..7d87c70 100644 * flags - internal USRLOC flags of the contact * cflags - per branch flags of the contact * methods - mask with supported requests of the contact -diff --git a/modules/usrloc/doc/usrloc_admin.xml b/modules/usrloc/doc/usrloc_admin.xml -index 0a8b15f..78be5e8 100644 --- a/modules/usrloc/doc/usrloc_admin.xml +++ b/modules/usrloc/doc/usrloc_admin.xml -@@ -986,8 +986,7 @@ modparam("usrloc", "db_ops_ruid", 1) +@@ -977,8 +977,7 @@ Q - Q value of the contact @@ -46,7 +42,7 @@ index 0a8b15f..78be5e8 100644 flags - internal USRLOC flags of the -@@ -1142,8 +1141,7 @@ modparam("usrloc", "db_ops_ruid", 1) +@@ -1133,8 +1132,7 @@ Q - Q value of the contact @@ -56,11 +52,9 @@ index 0a8b15f..78be5e8 100644 flags - internal USRLOC flags of the -diff --git a/modules/usrloc/ul_mi.c b/modules/usrloc/ul_mi.c -index 3f88a71..3e12bf1 100644 --- a/modules/usrloc/ul_mi.c +++ b/modules/usrloc/ul_mi.c -@@ -491,8 +491,8 @@ struct mi_root* mi_usrloc_flush(struct mi_root *cmd, void *param) +@@ -491,8 +491,8 @@ * \brief Add a new contact for an address of record * \param cmd mi_root containing the parameter * \param param not used @@ -71,7 +65,7 @@ index 3f88a71..3e12bf1 100644 * \return mi_root with the result */ struct mi_root* mi_usrloc_add(struct mi_root *cmd, void *param) -@@ -540,8 +540,10 @@ struct mi_root* mi_usrloc_add(struct mi_root *cmd, void *param) +@@ -540,8 +540,10 @@ if (str2q( &ci.q, node->value.s, node->value.len) < 0) goto bad_syntax; @@ -83,11 +77,9 @@ index 3f88a71..3e12bf1 100644 /* flags value (param 7) */ node = node->next; -diff --git a/modules/usrloc/ul_rpc.c b/modules/usrloc/ul_rpc.c -index d737a93..14e2e0a 100644 --- a/modules/usrloc/ul_rpc.c +++ b/modules/usrloc/ul_rpc.c -@@ -524,14 +524,15 @@ static const char* ul_rpc_flush_doc[2] = { +@@ -524,14 +524,15 @@ /*! * \brief Add a new contact for an address of record * \note Expects 9 parameters: table name, AOR, contact, expires, Q, @@ -105,7 +97,7 @@ index d737a93..14e2e0a 100644 double dtemp; ucontact_info_t ci; urecord_t* r; -@@ -541,18 +542,24 @@ static void ul_rpc_add(rpc_t* rpc, void* ctx) +@@ -541,18 +542,24 @@ memset( &ci, 0, sizeof(ucontact_info_t)); @@ -136,6 +128,3 @@ index d737a93..14e2e0a 100644 /* look for table */ dom = rpc_find_domain( &table ); if (dom == NULL) { --- -1.7.10.4 - diff --git a/debian/patches/sipwise/nathelper.contact_only.patch b/debian/patches/sipwise/nathelper.contact_only.patch index f46b869a7..064a20c16 100644 --- a/debian/patches/sipwise/nathelper.contact_only.patch +++ b/debian/patches/sipwise/nathelper.contact_only.patch @@ -1,8 +1,6 @@ -diff --git a/modules/nathelper/nathelper.c b/modules/nathelper/nathelper.c -index ab1c66a..069bb04 100644 --- a/modules/nathelper/nathelper.c +++ b/modules/nathelper/nathelper.c -@@ -340,6 +340,7 @@ static char *force_socket_str = 0; +@@ -340,6 +340,7 @@ static pid_t mypid; static int sipping_flag = -1; static int natping_processes = 1; @@ -10,7 +8,7 @@ index ab1c66a..069bb04 100644 static str nortpproxy_str = str_init("a=nortpproxy:yes"); -@@ -415,6 +416,7 @@ static param_export_t params[] = { +@@ -415,6 +416,7 @@ {"natping_processes", INT_PARAM, &natping_processes }, {"natping_socket", STR_PARAM, &natping_socket }, {"keepalive_timeout", INT_PARAM, &nh_keepalive_timeout }, @@ -18,7 +16,7 @@ index ab1c66a..069bb04 100644 {0, 0, 0} }; -@@ -1946,9 +1948,10 @@ nh_timer(unsigned int ticks, void *timer_idx) +@@ -1948,9 +1950,10 @@ goto done; } } @@ -31,7 +29,7 @@ index ab1c66a..069bb04 100644 if (rval<0) { LM_ERR("failed to fetch contacts\n"); goto done; -@@ -1962,9 +1965,10 @@ nh_timer(unsigned int ticks, void *timer_idx) +@@ -1964,9 +1967,10 @@ LM_ERR("out of pkg memory\n"); goto done; } @@ -44,11 +42,9 @@ index ab1c66a..069bb04 100644 if (rval != 0) { pkg_free(buf); goto done; -diff --git a/modules/usrloc/dlist.c b/modules/usrloc/dlist.c -index 2f14f16..999fdc1 100644 --- a/modules/usrloc/dlist.c +++ b/modules/usrloc/dlist.c -@@ -88,10 +88,12 @@ static inline int find_dlist(str* _n, dlist_t** _d) +@@ -88,10 +88,12 @@ * \param flags contact flags * \param part_idx part index * \param part_max maximal part @@ -62,7 +58,7 @@ index 2f14f16..999fdc1 100644 { static char query_buf[512]; static str query_str; -@@ -172,7 +174,7 @@ static inline int get_all_db_ucontacts(void *buf, int len, unsigned int flags, +@@ -172,7 +174,7 @@ /* received */ addr.s = (char*)VAL_STRING(ROW_VALUES(row)); @@ -71,7 +67,7 @@ index 2f14f16..999fdc1 100644 /* contact */ addr.s = (char*)VAL_STRING(ROW_VALUES(row)+1); if (VAL_NULL(ROW_VALUES(row)+1) || addr.s==0 || addr.s[0]==0) { -@@ -293,10 +295,12 @@ static inline int get_all_db_ucontacts(void *buf, int len, unsigned int flags, +@@ -293,10 +295,12 @@ * \param flags contact flags * \param part_idx part index * \param part_max maximal part @@ -85,7 +81,7 @@ index 2f14f16..999fdc1 100644 { dlist_t *p; urecord_t *r; -@@ -355,7 +359,7 @@ static inline int get_all_mem_ucontacts(void *buf, int len, unsigned int flags, +@@ -355,7 +359,7 @@ } } @@ -94,7 +90,7 @@ index 2f14f16..999fdc1 100644 needed = (int)(sizeof(c->received.len) + c->received.len + sizeof(c->sock) + sizeof(c->cflags) -@@ -466,15 +470,33 @@ static inline int get_all_mem_ucontacts(void *buf, int len, unsigned int flags, +@@ -466,15 +470,33 @@ * \param flags contact flags * \param part_idx part index * \param part_max maximal part @@ -130,11 +126,9 @@ index 2f14f16..999fdc1 100644 } -diff --git a/modules/usrloc/dlist.h b/modules/usrloc/dlist.h -index 149b84c..e39f09a 100644 --- a/modules/usrloc/dlist.h +++ b/modules/usrloc/dlist.h -@@ -121,6 +121,20 @@ int synchronize_all_udomains(int istart, int istep); +@@ -121,6 +121,20 @@ int get_all_ucontacts(void *buf, int len, unsigned int flags, unsigned int part_idx, unsigned int part_max); @@ -155,11 +149,9 @@ index 149b84c..e39f09a 100644 /*! * \brief Find and return usrloc domain -diff --git a/modules/usrloc/usrloc.c b/modules/usrloc/usrloc.c -index ba0ec1a..716aca5 100644 --- a/modules/usrloc/usrloc.c +++ b/modules/usrloc/usrloc.c -@@ -62,6 +62,7 @@ int bind_usrloc(usrloc_api_t* api) +@@ -62,6 +62,7 @@ api->register_udomain = register_udomain; api->get_udomain = get_udomain; api->get_all_ucontacts = get_all_ucontacts; @@ -167,8 +159,6 @@ index ba0ec1a..716aca5 100644 api->insert_urecord = insert_urecord; api->delete_urecord = delete_urecord; api->get_urecord = get_urecord; -diff --git a/modules/usrloc/usrloc.h b/modules/usrloc/usrloc.h -index 8b96d90..8da7b02 100644 --- a/modules/usrloc/usrloc.h +++ b/modules/usrloc/usrloc.h @@ -41,6 +41,8 @@ @@ -180,7 +170,7 @@ index 8b96d90..8da7b02 100644 /*forward declaration necessary for udomain*/ struct udomain; -@@ -175,6 +177,9 @@ typedef int (*register_udomain_t)(const char* _n, struct udomain** _d); +@@ -175,6 +177,9 @@ typedef int (*get_all_ucontacts_t) (void* buf, int len, unsigned int flags, unsigned int part_idx, unsigned int part_max); @@ -190,7 +180,7 @@ index 8b96d90..8da7b02 100644 typedef int (*get_udomain_t)(const char* _n, udomain_t** _d); typedef unsigned int (*ul_get_aorhash_t)(str *_aor); -@@ -195,6 +200,7 @@ typedef struct usrloc_api { +@@ -195,6 +200,7 @@ register_udomain_t register_udomain; get_udomain_t get_udomain; get_all_ucontacts_t get_all_ucontacts; diff --git a/debian/patches/sipwise/natping_disable_bflag.patch b/debian/patches/sipwise/natping_disable_bflag.patch index 7f00fc94c..8d9e6e12d 100644 --- a/debian/patches/sipwise/natping_disable_bflag.patch +++ b/debian/patches/sipwise/natping_disable_bflag.patch @@ -16,7 +16,7 @@ {"natping_processes", INT_PARAM, &natping_processes }, {"natping_socket", STR_PARAM, &natping_socket }, {"keepalive_timeout", INT_PARAM, &nh_keepalive_timeout }, -@@ -678,6 +680,7 @@ +@@ -677,6 +679,7 @@ } sipping_flag = (sipping_flag==-1)?0:(1< Introduce a temporary usrloc entry @@ -54,11 +50,9 @@ index 61fc55f..83db5d7 100644 .TP 16 .I Fifo commands: -diff --git a/utils/kamctl/kamctl.ctlbase b/utils/kamctl/kamctl.ctlbase -index a5ddf72..a605b10 100644 --- a/utils/kamctl/kamctl.ctlbase +++ b/utils/kamctl/kamctl.ctlbase -@@ -67,11 +67,12 @@ usage_usrloc() { +@@ -67,11 +67,12 @@ mecho " -- command 'ul|alias' - manage user location or aliases" echo cat <u.sval->type==PVT_AVP) -@@ -1138,6 +1221,30 @@ cycle1: +@@ -1138,6 +1221,30 @@ goto error; } check_flags = avp2->flags; @@ -146,7 +144,7 @@ index 65a5239..4fa2a53 100644 } else { avp2 = 0; if(pv_get_spec_value(msg, val->u.sval, &xvalue)!=0) -@@ -1308,6 +1415,11 @@ next: +@@ -1308,6 +1415,11 @@ { check_flags = avp2->flags; goto cycle2; @@ -158,6 +156,3 @@ index 65a5239..4fa2a53 100644 /* cycle for the first value -> next avp */ } else { if(avp1 && val->ops&AVPOPS_FLAG_ALL) --- -1.7.10.4 - diff --git a/debian/patches/upstream/debug/0001-core-added-function-to-get-the-pv-cache-table.patch b/debian/patches/upstream/debug/0001-core-added-function-to-get-the-pv-cache-table.patch index 0298472d5..d8812eb46 100644 --- a/debian/patches/upstream/debug/0001-core-added-function-to-get-the-pv-cache-table.patch +++ b/debian/patches/upstream/debug/0001-core-added-function-to-get-the-pv-cache-table.patch @@ -9,8 +9,6 @@ Subject: [PATCH] core: added function to get the pv cache table pvar.h | 16 ++++++++++++++++ 2 files changed, 24 insertions(+), 9 deletions(-) -diff --git a/pvapi.c b/pvapi.c -index 98b3d90..7f5fcc2 100644 --- a/pvapi.c +++ b/pvapi.c @@ -41,7 +41,6 @@ @@ -21,7 +19,7 @@ index 98b3d90..7f5fcc2 100644 #define TR_TABLE_SIZE 16 /*!< transformations table size */ -@@ -58,14 +57,6 @@ typedef struct _pv_item +@@ -58,14 +57,6 @@ static pv_item_t* _pv_table[PV_TABLE_SIZE]; static int _pv_table_set = 0; @@ -36,7 +34,7 @@ index 98b3d90..7f5fcc2 100644 static pv_cache_t* _pv_cache[PV_CACHE_SIZE]; static int _pv_cache_set = 0; -@@ -87,6 +78,14 @@ void pv_init_cache(void) +@@ -87,6 +78,14 @@ _pv_cache_set = 1; } @@ -51,11 +49,9 @@ index 98b3d90..7f5fcc2 100644 /** * @brief Check if a char is valid according to the PV syntax -diff --git a/pvar.h b/pvar.h -index c3d7b44..75c4914 100644 --- a/pvar.h +++ b/pvar.h -@@ -226,6 +226,22 @@ int pv_get_intstrval(struct sip_msg *msg, pv_param_t *param, +@@ -225,6 +225,22 @@ pv_value_t *res, int ival, str *sval); /** @@ -78,6 +74,3 @@ index c3d7b44..75c4914 100644 * Transformations */ #define TR_LBRACKET_STR "{" --- -1.7.10.4 - diff --git a/debian/patches/upstream/debug/0001-core-don-t-free-pvar-spec-is-reference-to-cache.patch b/debian/patches/upstream/debug/0001-core-don-t-free-pvar-spec-is-reference-to-cache.patch index deb5fea05..d3b9b7b44 100644 --- a/debian/patches/upstream/debug/0001-core-don-t-free-pvar-spec-is-reference-to-cache.patch +++ b/debian/patches/upstream/debug/0001-core-don-t-free-pvar-spec-is-reference-to-cache.patch @@ -8,11 +8,9 @@ Subject: [PATCH] core: don't free pvar spec - is reference to cache cfg.y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/cfg.y b/cfg.y -index 0e5f8b1..5f88d13 100644 --- a/cfg.y +++ b/cfg.y -@@ -2696,7 +2696,7 @@ rval: intno {$$=mk_rve_rval(RV_INT, (void*)$1); } +@@ -2862,7 +2862,7 @@ | STRING { s_tmp.s=$1; s_tmp.len=strlen($1); $$=mk_rve_rval(RV_STR, &s_tmp); } | attr_id_any {$$=mk_rve_rval(RV_AVP, $1); pkg_free($1); } @@ -21,6 +19,3 @@ index 0e5f8b1..5f88d13 100644 | avp_pvar { switch($1->type){ case LV_AVP: --- -1.7.10.4 - diff --git a/debian/patches/upstream/debug/0002-pv-xavp-name-is-marked-as-PVT_XAVP-type.patch b/debian/patches/upstream/debug/0002-pv-xavp-name-is-marked-as-PVT_XAVP-type.patch index b9e558b90..af02b5cfb 100644 --- a/debian/patches/upstream/debug/0002-pv-xavp-name-is-marked-as-PVT_XAVP-type.patch +++ b/debian/patches/upstream/debug/0002-pv-xavp-name-is-marked-as-PVT_XAVP-type.patch @@ -7,11 +7,9 @@ Subject: [PATCH 2/2] pv: $xavp(name) is marked as PVT_XAVP type modules/pv/pv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/modules/pv/pv.c b/modules/pv/pv.c -index fcfea11..2b13ec8 100644 --- a/modules/pv/pv.c +++ b/modules/pv/pv.c -@@ -87,7 +87,7 @@ static pv_export_t mod_pvs[] = { +@@ -82,7 +82,7 @@ pv_parse_snd_name, 0, 0, 0 }, #ifdef WITH_XAVP { {"xavp", sizeof("xavp")-1}, /* xavp */ @@ -20,6 +18,3 @@ index fcfea11..2b13ec8 100644 pv_parse_xavp_name, 0, 0, 0 }, #endif --- -1.7.10.4 - diff --git a/debian/patches/upstream/debug/core-use-pointer-to-pv_spec_t-on-lvalue-union.-Use-p.patch b/debian/patches/upstream/debug/core-use-pointer-to-pv_spec_t-on-lvalue-union.-Use-p.patch index 1a9c9c775..ac2b87e38 100644 --- a/debian/patches/upstream/debug/core-use-pointer-to-pv_spec_t-on-lvalue-union.-Use-p.patch +++ b/debian/patches/upstream/debug/core-use-pointer-to-pv_spec_t-on-lvalue-union.-Use-p.patch @@ -10,11 +10,9 @@ Subject: [PATCH] core: use pointer to pv_spec_t on lvalue union. Use lvalue.h | 2 +- 3 files changed, 11 insertions(+), 23 deletions(-) -diff --git a/cfg.y b/cfg.y -index 968888a..0e5f8b1 100644 --- a/cfg.y +++ b/cfg.y -@@ -2611,17 +2611,10 @@ attr_id_any_str: +@@ -2777,17 +2777,10 @@ ; pvar: PVAR { @@ -35,7 +33,7 @@ index 968888a..0e5f8b1 100644 YYABORT; } $$=pv_spec; -@@ -2636,12 +2629,8 @@ avp_pvar: AVP_OR_PVAR { +@@ -2802,12 +2795,8 @@ } memset(lval_tmp, 0, sizeof(*lval_tmp)); s_tmp.s=$1; s_tmp.len=strlen(s_tmp.s); @@ -50,7 +48,7 @@ index 968888a..0e5f8b1 100644 lval_tmp->lv.avps.type|= AVP_NAME_STR; lval_tmp->lv.avps.name.s.s = s_tmp.s+1; lval_tmp->lv.avps.name.s.len = s_tmp.len-1; -@@ -2688,15 +2677,14 @@ lval: attr_id_ass { +@@ -2854,15 +2843,14 @@ yyerror("Not enough memory"); YYABORT; } @@ -69,7 +67,7 @@ index 968888a..0e5f8b1 100644 yyerror("pvar with transformations in assignment" " left side"); } -@@ -2715,7 +2703,7 @@ rval: intno {$$=mk_rve_rval(RV_INT, (void*)$1); } +@@ -2881,7 +2869,7 @@ $$=mk_rve_rval(RV_AVP, &$1->lv.avps); break; case LV_PVAR: @@ -78,11 +76,9 @@ index 968888a..0e5f8b1 100644 break; default: yyerror("BUG: invalid lvalue type "); -diff --git a/lvalue.c b/lvalue.c -index a89cfce..a235ccc 100644 --- a/lvalue.c +++ b/lvalue.c -@@ -255,7 +255,7 @@ inline static int lval_pvar_assign(struct run_act_ctx* h, struct sip_msg* msg, +@@ -255,7 +255,7 @@ pv_get_null(msg, 0, &pval) destroy_pval=0; @@ -91,8 +87,6 @@ index a89cfce..a235ccc 100644 if (unlikely(!pv_is_w(pvar))){ ERR("read only pvar\n"); goto error; -diff --git a/lvalue.h b/lvalue.h -index 566f84e..3dbbcb1 100644 --- a/lvalue.h +++ b/lvalue.h @@ -35,7 +35,7 @@ @@ -104,6 +98,3 @@ index 566f84e..3dbbcb1 100644 avp_spec_t avps; }; --- -1.7.10.4 - diff --git a/debian/patches/upstream/pv-Move-pv_xavp_name_t-declaration-to-core-pvar.h.patch b/debian/patches/upstream/pv-Move-pv_xavp_name_t-declaration-to-core-pvar.h.patch index 088650f55..9b07edc22 100644 --- a/debian/patches/upstream/pv-Move-pv_xavp_name_t-declaration-to-core-pvar.h.patch +++ b/debian/patches/upstream/pv-Move-pv_xavp_name_t-declaration-to-core-pvar.h.patch @@ -8,8 +8,6 @@ Subject: [PATCH] pv: Move pv_xavp_name_t declaration to core pvar.h pvar.h | 10 ++++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) -diff --git a/modules/pv/pv_xavp.h b/modules/pv/pv_xavp.h -index 2e12870..4851b3f 100644 --- a/modules/pv/pv_xavp.h +++ b/modules/pv/pv_xavp.h @@ -23,12 +23,6 @@ @@ -25,11 +23,9 @@ index 2e12870..4851b3f 100644 int pv_get_xavp(struct sip_msg *msg, pv_param_t *param, pv_value_t *res); int pv_set_xavp(struct sip_msg* msg, pv_param_t *param, -diff --git a/pvar.h b/pvar.h -index c35ae94..4d69a43 100644 --- a/pvar.h +++ b/pvar.h -@@ -288,5 +288,15 @@ void tr_param_free(tr_param_t *tp); +@@ -287,5 +287,15 @@ int register_trans_mod(char *mod_name, tr_export_t *items); @@ -45,6 +41,3 @@ index c35ae94..4d69a43 100644 + #endif --- -1.7.10.4 - diff --git a/debian/patches/upstream/pv-implement-pv-transformation-en-de-code.base64.patch b/debian/patches/upstream/pv-implement-pv-transformation-en-de-code.base64.patch index b1b888a05..18d1ec6cd 100644 --- a/debian/patches/upstream/pv-implement-pv-transformation-en-de-code.base64.patch +++ b/debian/patches/upstream/pv-implement-pv-transformation-en-de-code.base64.patch @@ -8,8 +8,6 @@ Subject: [PATCH] pv: implement pv transformation {en,de}code.base64 modules/pv/pv_trans.h | 1 + 2 files changed, 34 insertions(+) -diff --git a/modules/pv/pv_trans.c b/modules/pv/pv_trans.c -index fc9597b..1e553f1 100644 --- a/modules/pv/pv_trans.c +++ b/modules/pv/pv_trans.c @@ -39,6 +39,7 @@ @@ -20,7 +18,7 @@ index fc9597b..1e553f1 100644 #include "../../parser/parse_param.h" #include "../../parser/parse_uri.h" -@@ -195,6 +196,32 @@ int tr_eval_string(struct sip_msg *msg, tr_param_t *tp, int subtype, +@@ -204,6 +205,32 @@ val->rs.s = _tr_buffer; val->rs.len = i; break; @@ -53,7 +51,7 @@ index fc9597b..1e553f1 100644 case TR_S_ESCAPECOMMON: if(!(val->flags&PV_VAL_STR)) val->rs.s = int2str(val->ri, &val->rs.len); -@@ -1749,6 +1776,12 @@ char* tr_parse_string(str* in, trans_t *t) +@@ -1764,6 +1791,12 @@ } else if(name.len==11 && strncasecmp(name.s, "decode.hexa", 11)==0) { t->subtype = TR_S_DECODEHEXA; goto done; @@ -66,11 +64,9 @@ index fc9597b..1e553f1 100644 } else if(name.len==13 && strncasecmp(name.s, "escape.common", 13)==0) { t->subtype = TR_S_ESCAPECOMMON; goto done; -diff --git a/modules/pv/pv_trans.h b/modules/pv/pv_trans.h -index a34eca2..e2aa494 100644 --- a/modules/pv/pv_trans.h +++ b/modules/pv/pv_trans.h -@@ -37,6 +37,7 @@ enum _tr_type { TR_NONE=0, TR_STRING, TR_URI, TR_PARAMLIST, TR_NAMEADDR, +@@ -37,6 +37,7 @@ enum _tr_s_subtype { TR_S_NONE=0, TR_S_LEN, TR_S_INT, TR_S_MD5, TR_S_SUBSTR, TR_S_SELECT, TR_S_ENCODEHEXA, TR_S_DECODEHEXA, @@ -78,6 +74,3 @@ index a34eca2..e2aa494 100644 TR_S_ESCAPECOMMON, TR_S_UNESCAPECOMMON, TR_S_ESCAPEUSER, TR_S_UNESCAPEUSER, TR_S_ESCAPEPARAM, TR_S_UNESCAPEPARAM, TR_S_TOLOWER, TR_S_TOUPPER, TR_S_STRIP, TR_S_STRIPTAIL, TR_S_PREFIXES, TR_S_PREFIXES_QUOT, TR_S_REPLACE, --- -1.7.10.4 - diff --git a/debian/patches/upstream/uac_redirect-get_redirect-check-reason-value-before-.patch b/debian/patches/upstream/uac_redirect-get_redirect-check-reason-value-before-.patch deleted file mode 100644 index a6ebd6f96..000000000 --- a/debian/patches/upstream/uac_redirect-get_redirect-check-reason-value-before-.patch +++ /dev/null @@ -1,35 +0,0 @@ -From abf0026782c0ba4643feb25ded022e8c12725584 Mon Sep 17 00:00:00 2001 -From: Victor Seva -Date: Mon, 9 Sep 2013 16:52:47 +0200 -Subject: [PATCH] uac_redirect: get_redirect() check reason value before using - it. - -This fix a core dump when get_redirects() config fuction is called with just -the one parameter. ---- - modules/uac_redirect/rd_funcs.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/modules/uac_redirect/rd_funcs.c b/modules/uac_redirect/rd_funcs.c -index ca34e0c..aa8dbd0 100644 ---- a/modules/uac_redirect/rd_funcs.c -+++ b/modules/uac_redirect/rd_funcs.c -@@ -96,9 +96,12 @@ int get_redirect( struct sip_msg *msg , int maxt, int maxb, - } - if (max==0) - continue; -- /* put the response code into the acc_param reason struct */ -- reason->code = t->uac[i].last_received; -- reason->code_s.s = int2bstr((unsigned long)reason->code, code_buf, &reason->code_s.len); -+ if(reason!=NULL) -+ { -+ /* put the response code into the acc_param reason struct */ -+ reason->code = t->uac[i].last_received; -+ reason->code_s.s = int2bstr((unsigned long)reason->code, code_buf, &reason->code_s.len); -+ } - /* get the contact from it */ - n = shmcontact2dset( msg, t->uac[i].reply, max, reason, bflags); - if ( n<0 ) { --- -1.7.10.4 -