[sr-dev] git:master:fe5027ca: uid_gflags: convert to memory logging helper

Henning Westerholt hw at skalatan.de
Thu Feb 13 23:09:50 CET 2020


Module: kamailio
Branch: master
Commit: fe5027caf30f6ad4ead271aaa73754707ca140f2
URL: https://github.com/kamailio/kamailio/commit/fe5027caf30f6ad4ead271aaa73754707ca140f2

Author: Henning Westerholt <hw at skalatan.de>
Committer: Henning Westerholt <hw at skalatan.de>
Date: 2020-02-13T23:08:35+01:00

uid_gflags: convert to memory logging helper

---

Modified: src/modules/uid_gflags/uid_gflags.c

---

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

---

diff --git a/src/modules/uid_gflags/uid_gflags.c b/src/modules/uid_gflags/uid_gflags.c
index 62f6df0ada..461e9f238b 100644
--- a/src/modules/uid_gflags/uid_gflags.c
+++ b/src/modules/uid_gflags/uid_gflags.c
@@ -271,20 +271,20 @@ static int mod_init(void)
 {
 	gflags=(unsigned int *) shm_malloc(sizeof(unsigned int));
 	if (!gflags) {
-		LM_ERR("no shared memory\n");
+		SHM_MEM_ERROR;
 		return -1;
 	}
 	*gflags=initial;
 
 	avps_1 = shm_malloc(sizeof(*avps_1));
 	if (!avps_1) {
-		LM_ERR("can't allocate memory\n");
+		SHM_MEM_ERROR;
 		return -1;
 	}
 	*avps_1 = NULL;
 	avps_2 = shm_malloc(sizeof(*avps_2));
 	if (!avps_2) {
-		LM_ERR("can't allocate memory\n");
+		SHM_MEM_ERROR;
 		return -1;
 	}
 	*avps_2 = NULL;




More information about the sr-dev mailing list