Module: kamailio Branch: master Commit: 19c9d56f3f6a53433949d2dac5494ad7b3b393a0 URL: https://github.com/kamailio/kamailio/commit/19c9d56f3f6a53433949d2dac5494ad7...
Author: Pantelis Kolatsis pk@gilawa.com Committer: Henning Westerholt hw@gilawa.com Date: 2023-03-29T09:14:24Z
auth_ephemeral: convert to memory logging helper
---
Modified: src/modules/auth_ephemeral/auth_ephemeral_mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/19c9d56f3f6a53433949d2dac5494ad7... Patch: https://github.com/kamailio/kamailio/commit/19c9d56f3f6a53433949d2dac5494ad7...
---
diff --git a/src/modules/auth_ephemeral/auth_ephemeral_mod.c b/src/modules/auth_ephemeral/auth_ephemeral_mod.c index 2a00c7879d9..717432caa89 100644 --- a/src/modules/auth_ephemeral/auth_ephemeral_mod.c +++ b/src/modules/auth_ephemeral/auth_ephemeral_mod.c @@ -223,7 +223,7 @@ static inline int add_secret(str _secret_key) secret_struct = (struct secret *) shm_malloc(sizeof(struct secret)); if (secret_struct == NULL) { - LM_ERR("unable to allocate shared memory\n"); + SHM_MEM_ERROR; return -1; }
@@ -313,7 +313,7 @@ static int secret_param(modparam_t _type, void *_val) sval.s = (char *) shm_malloc(sizeof(char) * sval.len); if (sval.s == NULL) { - LM_ERR("unable to allocate shared memory\n"); + SHM_MEM_ERROR; return -1; } memcpy(sval.s, (char *) _val, sval.len); @@ -363,7 +363,7 @@ void autheph_rpc_add_secret(rpc_t* rpc, void* ctx) sval.s = shm_malloc(sizeof(char) * sval.len); if (sval.s == NULL) { - LM_ERR("Unable to allocate shared memory\n"); + SHM_MEM_ERROR; rpc->fault(ctx, 500, "Not enough memory"); return; }