Module: kamailio Branch: master Commit: 3d60451ba47b14ce5e406a62b18547ad7d7d9165 URL: https://github.com/kamailio/kamailio/commit/3d60451ba47b14ce5e406a62b18547ad...
Author: Pantelis Kolatsis pk@gilawa.com Committer: Henning Westerholt hw@gilawa.com Date: 2023-03-29T09:16:31Z
db_cluster: convert to memory logging helper
---
Modified: src/modules/db_cluster/dbcl_api.c Modified: src/modules/db_cluster/dbcl_data.c
---
Diff: https://github.com/kamailio/kamailio/commit/3d60451ba47b14ce5e406a62b18547ad... Patch: https://github.com/kamailio/kamailio/commit/3d60451ba47b14ce5e406a62b18547ad...
---
diff --git a/src/modules/db_cluster/dbcl_api.c b/src/modules/db_cluster/dbcl_api.c index d1906e0f9d7..59449548b43 100644 --- a/src/modules/db_cluster/dbcl_api.c +++ b/src/modules/db_cluster/dbcl_api.c @@ -433,7 +433,7 @@ db1_con_t* db_cluster_init(const str* _dburl) cls->ref++; h = (db1_con_t*)pkg_malloc(sizeof(db1_con_t)); if (h==NULL) { - LM_ERR("out of pkg memory\n"); + PKG_MEM_ERROR; return NULL; } memset(h, 0, sizeof(db1_con_t)); diff --git a/src/modules/db_cluster/dbcl_data.c b/src/modules/db_cluster/dbcl_data.c index 6ff994974e9..af2d9459735 100644 --- a/src/modules/db_cluster/dbcl_data.c +++ b/src/modules/db_cluster/dbcl_data.c @@ -111,7 +111,7 @@ int dbcl_init_con(str *name, str *url) sc = (dbcl_con_t*)pkg_malloc(sizeof(dbcl_con_t)); if(sc==NULL) { - LM_ERR("no pkg memory\n"); + PKG_MEM_ERROR; return -1; } memset(sc, 0, sizeof(dbcl_con_t)); @@ -121,7 +121,7 @@ int dbcl_init_con(str *name, str *url) sc->sinfo = (dbcl_shared_t*)shm_malloc(sizeof(dbcl_shared_t)); if(sc->sinfo==NULL) { - LM_ERR("no shm memory\n"); + SHM_MEM_ERROR; pkg_free(sc); return -1; } @@ -357,7 +357,7 @@ int dbcl_init_cls(str *name, str *cons) sc = (dbcl_cls_t*)pkg_malloc(sizeof(dbcl_cls_t)); if(sc==NULL) { - LM_ERR("no pkg memory\n"); + PKG_MEM_ERROR; return -1; } memset(sc, 0, sizeof(dbcl_cls_t));