[sr-dev] git:5.5:3bfb1773: mtree: Fix some typos, adjust some formatting
Daniel-Constantin Mierla
miconda at gmail.com
Tue Jun 1 11:09:27 CEST 2021
Module: kamailio
Branch: 5.5
Commit: 3bfb1773c01731177824b907180a7eeb7e43d3af
URL: https://github.com/kamailio/kamailio/commit/3bfb1773c01731177824b907180a7eeb7e43d3af
Author: Olle E. Johansson <oej at edvina.net>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2021-06-01T10:57:45+02:00
mtree: Fix some typos, adjust some formatting
(cherry picked from commit 316c80607243387015e35ac423238c5a32401a44)
---
Modified: src/modules/mtree/mtree_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/3bfb1773c01731177824b907180a7eeb7e43d3af.diff
Patch: https://github.com/kamailio/kamailio/commit/3bfb1773c01731177824b907180a7eeb7e43d3af.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:
More information about the sr-dev
mailing list