From fd1c3eb081ff26a2a396fd4739ecad81b3006c23 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Wed, 9 Nov 2016 17:47:54 +0100 Subject: [PATCH] TT#3150 refresh patches and remove already applied upstream Change-Id: I3359360bf675c7ac8700b19cf16e68a7a1781a9c --- debian/patches/no_lib64_on_64_bits.patch | 2 +- debian/patches/series | 1 - .../0001-kex-add-extended-core-stats.patch | 15 +++------ .../do-not-install-default-config.patch | 4 +-- .../sipwise/rtpengine_next_branch_parm.patch | 10 +++--- debian/patches/sipwise/usrloc_dbro.patch | 16 +++++----- ...sh-when-no-dialog.id-on-dialog-info-.patch | 32 ------------------- .../pv-new-function-pv_evalx-dst-fmt.patch | 15 +++------ 8 files changed, 25 insertions(+), 70 deletions(-) delete mode 100644 debian/patches/upstream/presence-fix-crash-when-no-dialog.id-on-dialog-info-.patch diff --git a/debian/patches/no_lib64_on_64_bits.patch b/debian/patches/no_lib64_on_64_bits.patch index 8eac97d1e..1473fb46c 100644 --- a/debian/patches/no_lib64_on_64_bits.patch +++ b/debian/patches/no_lib64_on_64_bits.patch @@ -3,7 +3,7 @@ Author: Victor Seva --- a/Makefile.defs +++ b/Makefile.defs -@@ -362,15 +362,7 @@ +@@ -370,15 +370,7 @@ ARCH:=$(HOST_ARCH) endif $(info target architecture <$(ARCH)>, host architecture <$(HOST_ARCH)>) diff --git a/debian/patches/series b/debian/patches/series index bf386056b..c30f4c2c7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,7 +4,6 @@ # # upsream fixes from master upstream/pv-new-function-pv_evalx-dst-fmt.patch -upstream/presence-fix-crash-when-no-dialog.id-on-dialog-info-.patch # ## no_lib64_on_64_bits.patch diff --git a/debian/patches/sipwise/0001-kex-add-extended-core-stats.patch b/debian/patches/sipwise/0001-kex-add-extended-core-stats.patch index 0c62e2574..099beb279 100644 --- a/debian/patches/sipwise/0001-kex-add-extended-core-stats.patch +++ b/debian/patches/sipwise/0001-kex-add-extended-core-stats.patch @@ -10,11 +10,9 @@ Subject: [PATCH] kex: add extended core stats modules/kex/core_stats.h | 29 +++++++++ 2 files changed, 181 insertions(+), 3 deletions(-) -diff --git a/modules/kex/core_stats.c b/modules/kex/core_stats.c -index ff1ee92..0e426d6 100644 --- a/modules/kex/core_stats.c +++ b/modules/kex/core_stats.c -@@ -54,12 +54,65 @@ stat_var* err_rpls; /*!< error replies */ +@@ -59,12 +59,65 @@ stat_var* err_rpls; /*!< error replie stat_var* bad_URIs; /*!< number of bad URIs */ stat_var* unsupported_methods; /*!< unsupported methods */ stat_var* bad_msg_hdr; /*!< messages with bad header */ @@ -81,7 +79,7 @@ index ff1ee92..0e426d6 100644 {"fwd_requests" , 0, &fwd_reqs }, {"fwd_replies" , 0, &fwd_rpls }, {"drop_requests" , 0, &drp_reqs }, -@@ -119,8 +172,53 @@ static int km_cb_req_stats(struct sip_msg *msg, +@@ -124,8 +177,53 @@ static int km_cb_req_stats(struct sip_ms update_stat(rcv_reqs, 1); if(!IS_SIP(msg)) return 1; @@ -137,7 +135,7 @@ index ff1ee92..0e426d6 100644 return 1; } -@@ -128,6 +226,57 @@ static int km_cb_rpl_stats(struct sip_msg *msg, +@@ -133,6 +231,57 @@ static int km_cb_rpl_stats(struct sip_ms unsigned int flags, void *param) { update_stat(rcv_rpls, 1); @@ -195,11 +193,9 @@ index ff1ee92..0e426d6 100644 return 1; } -diff --git a/modules/kex/core_stats.h b/modules/kex/core_stats.h -index 9ba315e..bd58268 100644 --- a/modules/kex/core_stats.h +++ b/modules/kex/core_stats.h -@@ -38,9 +38,38 @@ extern stat_export_t core_stats[]; +@@ -43,9 +43,38 @@ extern stat_export_t core_stats[]; /*! \brief received requests */ extern stat_var* rcv_reqs; @@ -238,6 +234,3 @@ index 9ba315e..bd58268 100644 /*! \brief forwarded requests */ extern stat_var* fwd_reqs; --- -2.8.1 - diff --git a/debian/patches/sipwise/do-not-install-default-config.patch b/debian/patches/sipwise/do-not-install-default-config.patch index 7dd74749f..b5f606068 100644 --- a/debian/patches/sipwise/do-not-install-default-config.patch +++ b/debian/patches/sipwise/do-not-install-default-config.patch @@ -9,7 +9,7 @@ Subject: do not install default config --- a/Makefile +++ b/Makefile -@@ -647,7 +647,7 @@ +@@ -647,7 +647,7 @@ sunpkg: .PHONY: install install: mk_params="compile_for_install=yes" @@ -20,7 +20,7 @@ Subject: do not install default config .PHONY: dbinstall --- a/utils/kamctl/Makefile +++ b/utils/kamctl/Makefile -@@ -14,7 +14,7 @@ +@@ -13,7 +13,7 @@ all: install-if-newer: install diff --git a/debian/patches/sipwise/rtpengine_next_branch_parm.patch b/debian/patches/sipwise/rtpengine_next_branch_parm.patch index df99a84f3..95916702c 100644 --- a/debian/patches/sipwise/rtpengine_next_branch_parm.patch +++ b/debian/patches/sipwise/rtpengine_next_branch_parm.patch @@ -8,7 +8,7 @@ #include "../../modules/tm/tm_load.h" #include "rtpengine.h" #include "rtpengine_funcs.h" -@@ -184,7 +185,7 @@ +@@ -186,7 +187,7 @@ static int rtpengine_manage1_f(struct si static int parse_flags(struct ng_flags_parse *, struct sip_msg *, enum rtpe_operation *, const char *); @@ -17,7 +17,7 @@ static int fixup_set_id(void ** param, int param_no); static int set_rtpengine_set_f(struct sip_msg * msg, char * str1, char * str2); static struct rtpp_set * select_rtpp_set(int id_set); -@@ -2161,6 +2162,8 @@ +@@ -2170,6 +2171,8 @@ static int parse_flags(struct ng_flags_p ng_flags->via = 3; else if (str_eq(&val, "extra")) ng_flags->via = -1; @@ -26,7 +26,7 @@ else goto error; goto next; -@@ -2230,6 +2233,8 @@ +@@ -2239,6 +2242,8 @@ static bencode_item_t *rtpp_function_cal struct rtpp_node *node; char *cp; pv_value_t pv_val; @@ -35,7 +35,7 @@ /*** get & init basic stuff needed ***/ -@@ -2302,12 +2307,30 @@ +@@ -2311,12 +2316,30 @@ static bencode_item_t *rtpp_function_cal bencode_dictionary_add_str(ng_flags.dict, "call-id", &callid); if (ng_flags.via) { @@ -72,7 +72,7 @@ if (ret == -1 || viabranch.len == 0) { LM_ERR("can't get Via branch/extra ID\n"); goto error; -@@ -3180,7 +3203,7 @@ +@@ -3189,7 +3212,7 @@ rtpengine_answer1_f(struct sip_msg *msg, } static int diff --git a/debian/patches/sipwise/usrloc_dbro.patch b/debian/patches/sipwise/usrloc_dbro.patch index 2e8fbea5c..05a6f62ca 100644 --- a/debian/patches/sipwise/usrloc_dbro.patch +++ b/debian/patches/sipwise/usrloc_dbro.patch @@ -11,7 +11,7 @@ Add ro connection per child --- a/modules/usrloc/ul_mod.c +++ b/modules/usrloc/ul_mod.c -@@ -156,6 +156,7 @@ +@@ -156,6 +156,7 @@ str ulattrs_avalue_col = str_init(ULATTR str ulattrs_last_mod_col = str_init(ULATTRS_LAST_MOD_COL); /*!< Name of column containing the last modified date */ str db_url = str_init(DEFAULT_DB_URL); /*!< Database URL */ @@ -19,7 +19,7 @@ Add ro connection per child int timer_interval = 60; /*!< Timer interval in seconds */ int db_mode = 0; /*!< Database sync scheme: 0-no db, 1-write through, 2-write back, 3-only db */ int use_domain = 0; /*!< Whether usrloc should use domain part of aor */ -@@ -187,6 +188,8 @@ +@@ -187,6 +188,8 @@ static cmd_export_t cmds[] = { {0, 0, 0, 0, 0, 0} }; @@ -28,7 +28,7 @@ Add ro connection per child /*! \brief * Exported parameters -@@ -203,6 +206,7 @@ +@@ -203,6 +206,7 @@ static param_export_t params[] = { {"flags_column", PARAM_STR, &flags_col }, {"cflags_column", PARAM_STR, &cflags_col }, {"db_url", PARAM_STR, &db_url }, @@ -36,7 +36,7 @@ Add ro connection per child {"timer_interval", INT_PARAM, &timer_interval }, {"db_mode", INT_PARAM, &db_mode }, {"use_domain", INT_PARAM, &use_domain }, -@@ -278,6 +282,38 @@ +@@ -278,6 +282,38 @@ struct module_exports exports = { child_init /*!< Child initialization function */ }; @@ -75,7 +75,7 @@ Add ro connection per child /*! \brief * Module initialization function -@@ -370,6 +406,21 @@ +@@ -373,6 +409,21 @@ static int mod_init(void) } } @@ -97,7 +97,7 @@ Add ro connection per child if (nat_bflag==(unsigned int)-1) { nat_bflag = 0; } else if ( nat_bflag>=8*sizeof(nat_bflag) ) { -@@ -443,6 +494,16 @@ +@@ -448,6 +499,16 @@ static int child_init(int _rank) LM_ERR("child(%d): failed to connect to database\n", _rank); return -1; } @@ -114,7 +114,7 @@ Add ro connection per child /* _rank==PROC_SIPINIT is used even when fork is disabled */ if (_rank==PROC_SIPINIT && db_mode!=DB_ONLY) { /* if cache is used, populate domains from DB */ -@@ -498,6 +559,10 @@ +@@ -503,6 +564,10 @@ static void destroy(void) ul_dbf.close(ul_dbh); } @@ -127,7 +127,7 @@ Add ro connection per child --- a/modules/usrloc/ul_mod.h +++ b/modules/usrloc/ul_mod.h -@@ -88,6 +88,8 @@ +@@ -88,6 +88,8 @@ extern int handle_lost_tcp; extern int close_expired_tcp; extern int skip_remote_socket; diff --git a/debian/patches/upstream/presence-fix-crash-when-no-dialog.id-on-dialog-info-.patch b/debian/patches/upstream/presence-fix-crash-when-no-dialog.id-on-dialog-info-.patch deleted file mode 100644 index febd1abdc..000000000 --- a/debian/patches/upstream/presence-fix-crash-when-no-dialog.id-on-dialog-info-.patch +++ /dev/null @@ -1,32 +0,0 @@ -From: Victor Seva -Date: Fri, 23 Sep 2016 11:11:56 +0200 -Subject: presence: fix crash when no dialog.id on dialog-info xml - -Fix #794 ---- - modules/presence/presentity.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/modules/presence/presentity.c b/modules/presence/presentity.c -index b78f84a..629bda4 100644 ---- a/modules/presence/presentity.c -+++ b/modules/presence/presentity.c -@@ -686,13 +686,13 @@ int update_presentity(struct sip_msg* msg, presentity_t* presentity, str* body, - } - - check_if_dialog(*body, &is_dialog, &dialog_id); -+ if (is_dialog == 1) { -+ if (delete_presentity_if_dialog_id_exists(presentity, dialog_id) < 0) { -+ goto error; -+ } - -- if (delete_presentity_if_dialog_id_exists(presentity, dialog_id) < 0) { -- goto error; -+ free(dialog_id); - } -- -- free(dialog_id); -- - LM_DBG("inserting %d cols into table\n",n_query_cols); - - if (pa_dbf.insert(pa_db, query_cols, query_vals, n_query_cols) < 0) diff --git a/debian/patches/upstream/pv-new-function-pv_evalx-dst-fmt.patch b/debian/patches/upstream/pv-new-function-pv_evalx-dst-fmt.patch index 9d7f37b1f..e6537143c 100644 --- a/debian/patches/upstream/pv-new-function-pv_evalx-dst-fmt.patch +++ b/debian/patches/upstream/pv-new-function-pv_evalx-dst-fmt.patch @@ -16,8 +16,6 @@ the valye of $var(z) is "test one" modules/pv/pv.c | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 103 insertions(+), 12 deletions(-) -diff --git a/modules/pv/pv.c b/modules/pv/pv.c -index e8e717b..4862a7d 100644 --- a/modules/pv/pv.c +++ b/modules/pv/pv.c @@ -13,8 +13,8 @@ @@ -73,7 +71,7 @@ index e8e717b..4862a7d 100644 {"shvset", PARAM_STRING|USE_FUNC_PARAM, (void*)param_set_shvar }, {"varset", PARAM_STRING|USE_FUNC_PARAM, (void*)param_set_var }, {"avp_aliases", PARAM_STRING|USE_FUNC_PARAM, (void*)add_avp_aliases }, -@@ -502,16 +503,19 @@ static int w_sbranch_reset(sip_msg_t *msg, char p1, char *p2); +@@ -502,16 +503,19 @@ static int w_sbranch_reset(sip_msg_t *ms static int w_var_to_xavp(sip_msg_t *msg, char *p1, char *p2); static int w_xavp_to_var(sip_msg_t *msg, char *p1); @@ -105,16 +103,16 @@ index e8e717b..4862a7d 100644 /* API exports */ {"pv_register_api", (cmd_function)pv_register_api, NO_SCRIPT, 0, 0}, {0,0,0,0,0,0} -@@ -610,7 +616,7 @@ static int pv_isset(struct sip_msg* msg, char* pvid, char *foo) +@@ -610,7 +616,7 @@ static int pv_isset(struct sip_msg* msg, static int pv_unset(struct sip_msg* msg, char* pvid, char *foo) { pv_spec_t *sp; - + sp = (pv_spec_t*)pvid; - pv_set_spec_value(msg, sp, 0, NULL); - -@@ -786,6 +792,91 @@ static int w_sbranch_reset(sip_msg_t *msg, char p1, char *p2) + if(pv_set_spec_value(msg, sp, 0, NULL)<0) { + LM_ERR("faile to unset variable\n"); +@@ -789,6 +795,91 @@ static int w_sbranch_reset(sip_msg_t *ms return 1; } @@ -206,6 +204,3 @@ index e8e717b..4862a7d 100644 static const char* rpc_shv_set_doc[2] = { "Set a shared variable (args: name type value)", 0 --- -2.8.1 -