Discussion:
[sr-dev] git:5.4:00d71875: mtree: Fix some typos, adjust some formatting
Daniel-Constantin Mierla
2021-06-01 12:24:40 UTC
Permalink
Content preview: Module: kamailio Branch: 5.4 Commit: 00d7187532b87507367b00110f22bd8e0e14db7c
URL: https://github.com/kamailio/kamailio/commit/00d7187532b87507367b00110f22bd8e0e14db7c
Author: Olle E. Johansson <***@edvina.net> Committer: Daniel-Constantin Mierla
<***@gmail.com> Date: 2021-06-01T11:11:43+02:00

Content analysis details: (-2.4 points, 5.5 required)

pts rule name description
---- ---------------------- --------------------------------------------------
-1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
-1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1%
[score: 0.0000]
0.0 DKIM_ADSP_CUSTOM_MED No valid author signature, adsp_override is
CUSTOM_MED
0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail
provider (miconda[at]gmail.com)
0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level
mail domains are different
1.0 FORGED_GMAIL_RCVD 'From' gmail.com does not match 'Received'
headers
0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and
EnvelopeFrom freemail headers are
different
-1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list
manager

Module: kamailio
Branch: 5.4
Commit: 00d7187532b87507367b00110f22bd8e0e14db7c
URL: https://github.com/kamailio/kamailio/commit/00d7187532b87507367b00110f22bd8e0e14db7c

Author: Olle E. Johansson <***@edvina.net>
Committer: Daniel-Constantin Mierla <***@gmail.com>
Date: 2021-06-01T11:11:43+02:00

mtree: Fix some typos, adjust some formatting

(cherry picked from commit 316c80607243387015e35ac423238c5a32401a44)
(cherry picked from commit 3bfb1773c01731177824b907180a7eeb7e43d3af)

---

Modified: src/modules/mtree/mtree_mod.c

---

Diff: https://github.com/kamailio/kamailio/commit/00d7187532b87507367b00110f22bd8e0e14db7c.diff
Patch: https://github.com/kamailio/kamailio/commit/00d7187532b87507367b00110f22bd8e0e14db7c.patch

---

diff --git a/src/modules/mtree/mtree_mod.c b/src/modules/mtree/mtree_mod.c
index badbd09dc8..c04f031cfd 100644
--- a/src/modules/mtree/mtree_mod.c
+++ b/src/modules/mtree/mtree_mod.c
@@ -175,37 +175,37 @@ static int mod_init(void)
return -1;
}

- if(pv_parse_spec(&value_param, &pv_value)<00
+ if(pv_parse_spec(&value_param, &pv_value) < 0
|| !(pv_is_w(&pv_value)))
{
- LM_ERR("cannot parse value pv or is read only\n");
+ LM_ERR("cannot parse value pv or pv is read-only\n");
return -1;
}

- if (pv_parse_spec(&values_param, &pv_values) <0
+ if (pv_parse_spec(&values_param, &pv_values) < 0
|| pv_values.type != PVT_AVP) {
LM_ERR("cannot parse values avp\n");
return -1;
}

- if(pv_parse_spec(&dstid_param, &pv_dstid)<0
+ if(pv_parse_spec(&dstid_param, &pv_dstid) < 0
|| pv_dstid.type!=PVT_AVP)
{
LM_ERR("cannot parse dstid avp\n");
return -1;
}

- if(pv_parse_spec(&weight_param, &pv_weight)<0
+ if(pv_parse_spec(&weight_param, &pv_weight) < 0
|| pv_weight.type!=PVT_AVP)
{
- LM_ERR("cannot parse dstid avp\n");
+ LM_ERR("cannot parse weight avp\n");
return -1;
}

- if(pv_parse_spec(&count_param, &pv_count)<0
+ if(pv_parse_spec(&count_param, &pv_count) < 0
|| !(pv_is_w(&pv_weight)))
{
- LM_ERR("cannot parse count pv or is read-only\n");
+ LM_ERR("cannot parse count pv or pv is read-only\n");
return -1;
}

@@ -220,7 +220,7 @@ static int mod_init(void)
LM_DBG("mt_char_list=%s \n", mt_char_list.s);
mt_char_table_init();

- /* binding to mysql module */
+ /* binding to database module */
if(db_bind_mod(&db_url, &mt_dbf))
{
LM_ERR("database module not found\n");
@@ -614,7 +614,7 @@ static int mt_load_db(m_tree_t *pt)
if(RES_ROWS(db_res)[0].values[0].type != DB1_STRING
|| RES_ROWS(db_res)[0].values[1].type != DB1_STRING)
{
- LM_ERR("wrond column types in db table (%d / %d)\n",
+ LM_ERR("wrong column types in db table (%d / %d)\n",
RES_ROWS(db_res)[0].values[0].type,
RES_ROWS(db_res)[0].values[1].type);
goto error;
@@ -1029,7 +1029,7 @@ void rpc_mtree_match(rpc_t* rpc, void* ctx)
if(tr==NULL)
{
/* no tree with such name*/
- rpc->fault(ctx, 404, "Not found tree");
+ rpc->fault(ctx, 404, "Tree not found");
goto error;
}

@@ -1038,7 +1038,7 @@ void rpc_mtree_match(rpc_t* rpc, void* ctx)
LM_DBG("no prefix found in [%.*s] for [%.*s]\n",
tname.len, tname.s,
tomatch.len, tomatch.s);
- rpc->fault(ctx, 404, "Not found");
+ rpc->fault(ctx, 404, "Prefix not found");
}

error:

Loading...