Module: kamailio Branch: master Commit: d45eb770b0a8e17533f12e16dfc1d23dc5e7d951 URL: https://github.com/kamailio/kamailio/commit/d45eb770b0a8e17533f12e16dfc1d23d...
Author: Pantelis Kolatsis pk@gilawa.com Committer: Henning Westerholt hw@gilawa.com Date: 2023-03-22T10:14:39Z
auth_xkeys: convert to memory logging helper
---
Modified: src/modules/auth_xkeys/auth_xkeys.c
---
Diff: https://github.com/kamailio/kamailio/commit/d45eb770b0a8e17533f12e16dfc1d23d... Patch: https://github.com/kamailio/kamailio/commit/d45eb770b0a8e17533f12e16dfc1d23d...
---
diff --git a/src/modules/auth_xkeys/auth_xkeys.c b/src/modules/auth_xkeys/auth_xkeys.c index 6963d4e3132..3f02f0d9bce 100644 --- a/src/modules/auth_xkeys/auth_xkeys.c +++ b/src/modules/auth_xkeys/auth_xkeys.c @@ -61,7 +61,7 @@ int auth_xkeys_list_init(void) return 0; _auth_xkeys_list = shm_malloc(sizeof(auth_xkey_t*)); if(_auth_xkeys_list==NULL) { - LM_ERR("no more shared memory\n"); + SHM_MEM_ERROR; return -1; } memset(_auth_xkeys_list, 0, sizeof(auth_xkey_t*)); @@ -88,7 +88,7 @@ int authx_xkey_insert(auth_xkey_t *nkey) + nkey->kvalue.len + 3; ukey = (auth_xkey_t*)shm_malloc(ksize); if(ukey==NULL) { - LM_ERR("no more shared memory\n"); + SHM_MEM_ERROR; return -1; } memset(ukey, 0, ksize); @@ -269,7 +269,7 @@ int auth_xkeys_add(sip_msg_t* msg, str *hdr, str *key, } p = (char*)pkg_malloc(xdata.len+1); if(p==NULL) { - LM_ERR("no more pkg memory\n"); + PKG_MEM_ERROR; return -2; } memcpy(p, xdata.s, xdata.len);