Browse code

mtree: Fix some typos, adjust some formatting

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

Olle E. Johansson authored on 28/05/2021 07:38:31 • Daniel-Constantin Mierla committed on 01/06/2021 09:11:43
Showing 1 changed files
... ...
@@ -175,37 +175,37 @@ static int mod_init(void)
175 175
 		return -1;
176 176
 	}
177 177
 
178
-	if(pv_parse_spec(&value_param, &pv_value)<00
178
+	if(pv_parse_spec(&value_param, &pv_value) < 0
179 179
 			|| !(pv_is_w(&pv_value)))
180 180
 	{
181
-		LM_ERR("cannot parse value pv or is read only\n");
181
+		LM_ERR("cannot parse value pv or pv is read-only\n");
182 182
 		return -1;
183 183
 	}
184 184
 
185
-	if (pv_parse_spec(&values_param, &pv_values) <0
185
+	if (pv_parse_spec(&values_param, &pv_values) < 0
186 186
 			|| pv_values.type != PVT_AVP) {
187 187
 		LM_ERR("cannot parse values avp\n");
188 188
 		return -1;
189 189
 	}
190 190
 
191
-	if(pv_parse_spec(&dstid_param, &pv_dstid)<0
191
+	if(pv_parse_spec(&dstid_param, &pv_dstid) < 0
192 192
 			|| pv_dstid.type!=PVT_AVP)
193 193
 	{
194 194
 		LM_ERR("cannot parse dstid avp\n");
195 195
 		return -1;
196 196
 	}
197 197
 
198
-	if(pv_parse_spec(&weight_param, &pv_weight)<0
198
+	if(pv_parse_spec(&weight_param, &pv_weight) < 0
199 199
 			|| pv_weight.type!=PVT_AVP)
200 200
 	{
201
-		LM_ERR("cannot parse dstid avp\n");
201
+		LM_ERR("cannot parse weight avp\n");
202 202
 		return -1;
203 203
 	}
204 204
 
205
-	if(pv_parse_spec(&count_param, &pv_count)<0
205
+	if(pv_parse_spec(&count_param, &pv_count) < 0
206 206
 			|| !(pv_is_w(&pv_weight)))
207 207
 	{
208
-		LM_ERR("cannot parse count pv or is read-only\n");
208
+		LM_ERR("cannot parse count pv or pv is read-only\n");
209 209
 		return -1;
210 210
 	}
211 211
 
... ...
@@ -220,7 +220,7 @@ static int mod_init(void)
220 220
 	LM_DBG("mt_char_list=%s \n", mt_char_list.s);
221 221
 	mt_char_table_init();
222 222
 
223
-	/* binding to mysql module */
223
+	/* binding to database module */
224 224
 	if(db_bind_mod(&db_url, &mt_dbf))
225 225
 	{
226 226
 		LM_ERR("database module not found\n");
... ...
@@ -614,7 +614,7 @@ static int mt_load_db(m_tree_t *pt)
614 614
 		if(RES_ROWS(db_res)[0].values[0].type != DB1_STRING
615 615
 				|| RES_ROWS(db_res)[0].values[1].type != DB1_STRING)
616 616
 		{
617
-			LM_ERR("wrond column types in db table (%d / %d)\n",
617
+			LM_ERR("wrong column types in db table (%d / %d)\n",
618 618
 					RES_ROWS(db_res)[0].values[0].type,
619 619
 					RES_ROWS(db_res)[0].values[1].type);
620 620
 			goto error;
... ...
@@ -1029,7 +1029,7 @@ again:
1029 1029
 	if(tr==NULL)
1030 1030
 	{
1031 1031
 		/* no tree with such name*/
1032
-		rpc->fault(ctx, 404, "Not found tree");
1032
+		rpc->fault(ctx, 404, "Tree not found");
1033 1033
 		goto error;
1034 1034
 	}
1035 1035
 
... ...
@@ -1038,7 +1038,7 @@ again:
1038 1038
 		LM_DBG("no prefix found in [%.*s] for [%.*s]\n",
1039 1039
 				tname.len, tname.s,
1040 1040
 				tomatch.len, tomatch.s);
1041
-		rpc->fault(ctx, 404, "Not found");
1041
+		rpc->fault(ctx, 404, "Prefix not found");
1042 1042
 	}
1043 1043
 
1044 1044
 error: