Browse code

htable: Fix spelling errors in error and debug messages

Olle E. Johansson authored on 07/12/2021 07:30:51
Showing 4 changed files
... ...
@@ -41,7 +41,7 @@ int ht_api_set_cell(str *hname, str *name, int type,
41 41
 		return -1;
42 42
 
43 43
 	if (ht->dmqreplicate>0 && ht_dmq_replicate_action(HT_DMQ_SET_CELL, hname, name, type, val, mode)!=0) {
44
-		LM_ERR("dmq relication failed\n");
44
+		LM_ERR("dmq replication failed\n");
45 45
 	}
46 46
 
47 47
 	return ht_set_cell(ht, name, type, val, mode);
... ...
@@ -57,7 +57,7 @@ int ht_api_del_cell(str *hname, str *name)
57 57
 	if(ht==NULL)
58 58
 		return -1;
59 59
 	if (ht->dmqreplicate>0 && ht_dmq_replicate_action(HT_DMQ_DEL_CELL, hname, name, 0, NULL, 0)!=0) {
60
-		LM_ERR("dmq relication failed\n");
60
+		LM_ERR("dmq replication failed\n");
61 61
 	}
62 62
 	return ht_del_cell(ht, name);
63 63
 }
... ...
@@ -73,7 +73,7 @@ int ht_api_set_cell_expire(str *hname, str *name,
73 73
 	if(ht==NULL)
74 74
 		return -1;
75 75
 	if (ht->dmqreplicate>0 && ht_dmq_replicate_action(HT_DMQ_SET_CELL_EXPIRE, hname, name, type, val, 0)!=0) {
76
-		LM_ERR("dmq relication failed\n");
76
+		LM_ERR("dmq replication failed\n");
77 77
 	}
78 78
 	return ht_set_cell_expire(ht, name, type, val);
79 79
 }
... ...
@@ -118,7 +118,7 @@ int ht_api_rm_cell_re(str *hname, str *sre, int mode)
118 118
 		isval.s.s = sre->s;
119 119
 		isval.s.len = sre->len;
120 120
 		if (ht_dmq_replicate_action(HT_DMQ_RM_CELL_RE, hname, NULL, AVP_VAL_STR, &isval, mode)!=0) {
121
-			LM_ERR("dmq relication failed\n");
121
+			LM_ERR("dmq replication failed\n");
122 122
 		}
123 123
 	}
124 124
 	if(ht_rm_cell_re(sre, ht, mode /* 0 - name; 1 - value */)<0)
... ...
@@ -314,7 +314,7 @@ int ht_add_table(str *name, int autoexp, str *dbtable, str *dbcols, int size,
314 314
 	if(dbcols!=NULL && dbcols->s!=NULL && dbcols->len>0) {
315 315
 		ht->scols[0].s = (char*)shm_malloc((1+dbcols->len)*sizeof(char));
316 316
 		if(ht->scols[0].s==NULL) {
317
-			LM_ERR("no more shm memory\n");
317
+			LM_ERR("no more shared memory\n");
318 318
 			shm_free(ht);
319 319
 			return -1;
320 320
 		}
... ...
@@ -394,7 +394,7 @@ int ht_init_tables(void)
394 394
 		ht->entries = (ht_entry_t*)shm_malloc(ht->htsize*sizeof(ht_entry_t));
395 395
 		if(ht->entries==NULL)
396 396
 		{
397
-			LM_ERR("no more shm for [%.*s]\n", ht->name.len, ht->name.s);
397
+			LM_ERR("no more shared memory for [%.*s]\n", ht->name.len, ht->name.s);
398 398
 			shm_free(ht);
399 399
 			return -1;
400 400
 		}
... ...
@@ -472,7 +472,7 @@ int ht_set_cell_ex(ht_t *ht, str *name, int type, int_str *val, int mode,
472 472
 	time_t now;
473 473
 
474 474
 	if(ht==NULL || ht->entries==NULL) {
475
-		LM_WARN("invalid ht parameter\n");
475
+		LM_WARN("invalid htable parameter\n");
476 476
 		return -1;
477 477
 	}
478 478
 	if(name==NULL || name->s==NULL) {
... ...
@@ -935,7 +935,7 @@ int ht_dbg(void)
935 935
 	ht = _ht_root;
936 936
 	while(ht)
937 937
 	{
938
-		LM_ERR("===== htable[%.*s] hid: %u exp: %u>\n", ht->name.len,
938
+		LM_ERR("htable[%.*s] hid: %u exp: %u>\n", ht->name.len,
939 939
 				ht->name.s, ht->htid, ht->htexpire);
940 940
 		for(i=0; i<ht->htsize; i++)
941 941
 		{
... ...
@@ -1081,7 +1081,7 @@ int ht_db_sync_tables(void)
1081 1081
 					ht->name.len, ht->name.s);
1082 1082
 			ht_db_delete_records(&ht->dbtable);
1083 1083
 			if(ht_db_save_table(ht, &ht->dbtable)!=0)
1084
-				LM_ERR("failed sync'ing hash table [%.*s] to db\n",
1084
+				LM_ERR("failed syncing hash table [%.*s] to db\n",
1085 1085
 					ht->name.len, ht->name.s);
1086 1086
 		}
1087 1087
 		ht = ht->next;
... ...
@@ -94,7 +94,7 @@ int pv_set_ht_cell(struct sip_msg* msg, pv_param_t *param,
94 94
 		if (hpv->ht->dmqreplicate>0
95 95
 				&& ht_dmq_replicate_action(HT_DMQ_DEL_CELL, &hpv->htname,
96 96
 					&htname, 0, NULL, 0)!=0) {
97
-			LM_ERR("dmq relication failed\n");
97
+			LM_ERR("dmq replication failed\n");
98 98
 		}
99 99
 		ht_del_cell(hpv->ht, &htname);
100 100
 		return 0;
... ...
@@ -106,7 +106,7 @@ int pv_set_ht_cell(struct sip_msg* msg, pv_param_t *param,
106 106
 		if (hpv->ht->dmqreplicate>0
107 107
 				&& ht_dmq_replicate_action(HT_DMQ_SET_CELL, &hpv->htname,
108 108
 					&htname, 0, &isval, 1)!=0) {
109
-			LM_ERR("dmq relication failed\n");
109
+			LM_ERR("dmq replication failed\n");
110 110
 		}
111 111
 		if(ht_set_cell(hpv->ht, &htname, 0, &isval, 1)!=0)
112 112
 		{
... ...
@@ -118,7 +118,7 @@ int pv_set_ht_cell(struct sip_msg* msg, pv_param_t *param,
118 118
 		if (hpv->ht->dmqreplicate>0
119 119
 				&& ht_dmq_replicate_action(HT_DMQ_SET_CELL, &hpv->htname,
120 120
 					&htname, AVP_VAL_STR, &isval, 1)!=0) {
121
-			LM_ERR("dmq relication failed\n");
121
+			LM_ERR("dmq replication failed\n");
122 122
 		}
123 123
 		if(ht_set_cell(hpv->ht, &htname, AVP_VAL_STR, &isval, 1)!=0)
124 124
 		{
... ...
@@ -264,7 +264,7 @@ int pv_set_ht_cell_expire(struct sip_msg* msg, pv_param_t *param,
264 264
 			isval.n = val->ri;
265 265
 	}
266 266
 	if (hpv->ht->dmqreplicate>0 && ht_dmq_replicate_action(HT_DMQ_SET_CELL_EXPIRE, &hpv->htname, &htname, 0, &isval, 0)!=0) {
267
-		LM_ERR("dmq relication failed\n");
267
+		LM_ERR("dmq replication failed\n");
268 268
 	}
269 269
 	if(ht_set_cell_expire(hpv->ht, &htname, 0, &isval)!=0)
270 270
 	{
... ...
@@ -366,7 +366,7 @@ int pv_get_ht_add(struct sip_msg *msg,  pv_param_t *param,
366 366
 	/* integer */
367 367
 	if (hpv->ht->dmqreplicate>0) {
368 368
 		if (ht_dmq_replicate_action(HT_DMQ_SET_CELL, &hpv->htname, &htname, 0, &htc->value, 1)!=0) {
369
-			LM_ERR("dmq relication failed\n");
369
+			LM_ERR("dmq replication failed\n");
370 370
 		}
371 371
 	}
372 372
 	return pv_get_sintval(msg, param, res, htc->value.n);
... ...
@@ -391,7 +391,7 @@ static int ht_rm_re_helper(sip_msg_t *msg, ht_t *ht, str *rexp, int rmode)
391 391
 		isval.s = *rexp;
392 392
 		if (ht_dmq_replicate_action(HT_DMQ_RM_CELL_RE, &ht->name, NULL,
393 393
 				AVP_VAL_STR, &isval, rmode)!=0) {
394
-			LM_ERR("dmq relication failed for [%.*s]\n", ht->name.len, ht->name.s);
394
+			LM_ERR("dmq replication failed for [%.*s]\n", ht->name.len, ht->name.s);
395 395
 		}
396 396
 	}
397 397
 	if(ht_rm_cell_re(rexp, ht, rmode)<0)
... ...
@@ -499,7 +499,7 @@ static int ht_rm_items(sip_msg_t* msg, str* hname, str* op, str *val,
499 499
 				isval.s = *val;
500 500
 				if ((ht->dmqreplicate > 0) && ht_dmq_replicate_action(HT_DMQ_RM_CELL_RE, &ht->name, NULL,
501 501
 							AVP_VAL_STR, &isval, mkey)!=0) {
502
-					LM_ERR("dmq relication failed (op %d)\n", mkey);
502
+					LM_ERR("dmq replication failed (op %d)\n", mkey);
503 503
 				}
504 504
 				if(ht_rm_cell_re(val, ht, mkey)<0) {
505 505
 					return -1;
... ...
@@ -509,7 +509,7 @@ static int ht_rm_items(sip_msg_t* msg, str* hname, str* op, str *val,
509 509
 				isval.s = *val;
510 510
 				if ((ht->dmqreplicate > 0) &&ht_dmq_replicate_action(HT_DMQ_RM_CELL_SW, &ht->name, NULL,
511 511
 							AVP_VAL_STR, &isval, mkey)!=0) {
512
-					LM_ERR("dmq relication failed (op %d)\n", mkey);
512
+					LM_ERR("dmq replication failed (op %d)\n", mkey);
513 513
 				}
514 514
 				if(ht_rm_cell_op(val, ht, mkey, HT_RM_OP_SW)<0) {
515 515
 					return -1;
... ...
@@ -582,7 +582,7 @@ static int ki_ht_rm(sip_msg_t* msg, str* hname, str* iname)
582 582
 	if (ht->dmqreplicate>0
583 583
 			&& ht_dmq_replicate_action(HT_DMQ_DEL_CELL, hname,
584 584
 				iname, 0, NULL, 0)!=0) {
585
-		LM_ERR("dmq relication failed\n");
585
+		LM_ERR("dmq replication failed\n");
586 586
 	}
587 587
 	ht_del_cell(ht, iname);
588 588
 	return 1;
... ...
@@ -1183,7 +1183,7 @@ static int ki_ht_sets(sip_msg_t *msg, str *htname, str *itname, str *itval)
1183 1183
 
1184 1184
 	if (ht->dmqreplicate>0 && ht_dmq_replicate_action(HT_DMQ_SET_CELL,
1185 1185
 				&ht->name, itname, AVP_VAL_STR, &isvalue, 1)!=0) {
1186
-		LM_ERR("dmq relication failed\n");
1186
+		LM_ERR("dmq replication failed\n");
1187 1187
 	}
1188 1188
 
1189 1189
 	if(ht_set_cell(ht, itname, AVP_VAL_STR, &isvalue, 1)!=0) {
... ...
@@ -1214,7 +1214,7 @@ static int ki_ht_seti(sip_msg_t *msg, str *htname, str *itname, int itval)
1214 1214
 
1215 1215
 	if (ht->dmqreplicate>0 && ht_dmq_replicate_action(HT_DMQ_SET_CELL,
1216 1216
 				&ht->name, itname, 0, &isvalue, 1)!=0) {
1217
-		LM_ERR("dmq relication failed\n");
1217
+		LM_ERR("dmq replication failed\n");
1218 1218
 	}
1219 1219
 
1220 1220
 	if(ht_set_cell(ht, itname, 0, &isvalue, 1)!=0) {
... ...
@@ -1248,7 +1248,7 @@ static int ki_ht_setex(sip_msg_t *msg, str *htname, str *itname, int itval)
1248 1248
 	if (ht->dmqreplicate>0
1249 1249
 				&& ht_dmq_replicate_action(HT_DMQ_SET_CELL_EXPIRE, htname,
1250 1250
 				itname, 0, &isval, 0)!=0) {
1251
-		LM_ERR("dmq relication failed\n");
1251
+		LM_ERR("dmq replication failed\n");
1252 1252
 	}
1253 1253
 	if(ht_set_cell_expire(ht, itname, 0, &isval)!=0) {
1254 1254
 		LM_ERR("cannot set expire for sht: %.*s key: %.*s\n", htname->len,
... ...
@@ -1375,7 +1375,7 @@ static int ki_ht_add_op(sip_msg_t *msg, str *htname, str *itname, int itval)
1375 1375
 	if (ht->dmqreplicate>0) {
1376 1376
 		if (ht_dmq_replicate_action(HT_DMQ_SET_CELL, htname, itname, 0,
1377 1377
 					&htc->value, 1)!=0) {
1378
-			LM_ERR("dmq relication failed\n");
1378
+			LM_ERR("dmq replication failed\n");
1379 1379
 		}
1380 1380
 	}
1381 1381
 	return htc->value.n;
... ...
@@ -1450,7 +1450,7 @@ static void htable_rpc_delete(rpc_t* rpc, void* c) {
1450 1450
 	}
1451 1451
 
1452 1452
 	if (ht->dmqreplicate>0 && ht_dmq_replicate_action(HT_DMQ_DEL_CELL, &ht->name, &keyname, 0, NULL, 0)!=0) {
1453
-		LM_ERR("dmq relication failed\n");
1453
+		LM_ERR("dmq replication failed\n");
1454 1454
 	}
1455 1455
 
1456 1456
 	ht_del_cell(ht, &keyname);
... ...
@@ -1551,7 +1551,7 @@ static void htable_rpc_sets(rpc_t* rpc, void* c) {
1551 1551
 
1552 1552
 	if (ht->dmqreplicate>0 && ht_dmq_replicate_action(HT_DMQ_SET_CELL,
1553 1553
 				&ht->name, &keyname, AVP_VAL_STR, &keyvalue, 1)!=0) {
1554
-		LM_ERR("dmq relication failed\n");
1554
+		LM_ERR("dmq replication failed\n");
1555 1555
 	}
1556 1556
 
1557 1557
 	if(ht_set_cell(ht, &keyname, AVP_VAL_STR, &keyvalue, 1)!=0)
... ...
@@ -1586,7 +1586,7 @@ static void htable_rpc_seti(rpc_t* rpc, void* c) {
1586 1586
 
1587 1587
 	if (ht->dmqreplicate>0 && ht_dmq_replicate_action(HT_DMQ_SET_CELL,
1588 1588
 				&ht->name, &keyname, 0, &keyvalue, 1)!=0) {
1589
-		LM_ERR("dmq relication failed\n");
1589
+		LM_ERR("dmq replication failed\n");
1590 1590
 	}
1591 1591
 
1592 1592
 	if(ht_set_cell(ht, &keyname, 0, &keyvalue, 1)!=0)