[sr-dev] git:master:b06268f0: topos: convert to memory logging helper

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


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

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

topos: convert to memory logging helper

---

Modified: src/modules/topos/tps_msg.c

---

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

---

diff --git a/src/modules/topos/tps_msg.c b/src/modules/topos/tps_msg.c
index 3bb5f12f46..e40a51003e 100644
--- a/src/modules/topos/tps_msg.c
+++ b/src/modules/topos/tps_msg.c
@@ -163,8 +163,7 @@ int tps_add_headers(sip_msg_t *msg, str *hname, str *hbody, int hpos)
 	hs.len = hname->len + 2 + hbody->len;
 	hs.s  = (char*)pkg_malloc(hs.len + 3);
 	if (hs.s==NULL) {
-		LM_ERR("no pkg memory left (%.*s - %d)\n",
-				hname->len, hname->s, hs.len);
+		PKG_MEM_ERROR_FMT("(%.*s - %d)\n", hname->len, hname->s, hs.len);
 		return -1;
 	}
 	memcpy(hs.s, hname->s, hname->len);




More information about the sr-dev mailing list