diff --git a/src/modules/pua_dialoginfo/dialog_publish.c b/src/modules/pua_dialoginfo/dialog_publish.c index 1abe8cb1528..5c901a9845a 100644 --- a/src/modules/pua_dialoginfo/dialog_publish.c +++ b/src/modules/pua_dialoginfo/dialog_publish.c @@ -240,7 +240,7 @@ str* build_dialoginfo(char *state, str *entity, str *peer, str *callid, body = (str*)pkg_malloc(sizeof(str)); if(body == NULL) { - LM_ERR("while allocating memory\n"); + PKG_MEM_ERROR; goto error; } memset(body, 0, sizeof(str)); @@ -327,7 +327,7 @@ void dialog_publish(char *state, str* ruri, str *entity, str *peer, str *callid, publ= (publ_info_t*)pkg_malloc(size); if(publ== NULL) { - LM_ERR("no more share memory\n"); + PKG_MEM_ERROR; goto error; } memset(publ, 0, size); diff --git a/src/modules/pua_dialoginfo/pua_dialoginfo.c b/src/modules/pua_dialoginfo/pua_dialoginfo.c index f3932493aa4..eb37c611560 100644 --- a/src/modules/pua_dialoginfo/pua_dialoginfo.c +++ b/src/modules/pua_dialoginfo/pua_dialoginfo.c @@ -448,7 +448,7 @@ struct str_list* get_str_list(unsigned short avp_flags, int_str avp_name) { } if (list_current==0) { - LM_ERR("no more shm mem (%d)\n",len); + SHM_MEM_ERROR; return 0; } @@ -483,7 +483,7 @@ struct dlginfo_cell* get_dialog_data(struct dlg_cell *dlg, int type) dlginfo = (struct dlginfo_cell*)shm_malloc( len ); if (dlginfo==0) { - LM_ERR("no more shm mem (%d)\n",len); + SHM_MEM_ERROR; return NULL; } memset( dlginfo, 0, len); @@ -531,7 +531,7 @@ struct dlginfo_cell* get_dialog_data(struct dlg_cell *dlg, int type) dlginfo->pubruris_caller = (struct str_list*)shm_malloc( sizeof(struct str_list) ); if (dlginfo->pubruris_caller==0) { - LM_ERR("no more shm mem (%d)\n", (int) sizeof(struct str_list)); + SHM_MEM_ERROR; free_dlginfo_cell(dlginfo); return NULL; } @@ -546,7 +546,7 @@ struct dlginfo_cell* get_dialog_data(struct dlg_cell *dlg, int type) dlginfo->pubruris_callee = (struct str_list*)shm_malloc( sizeof(struct str_list) ); if (dlginfo->pubruris_callee==0) { - LM_ERR("no more shm mem (%d)\n", (int) sizeof(struct str_list)); + SHM_MEM_ERROR; free_dlginfo_cell(dlginfo); return NULL; } @@ -567,7 +567,7 @@ struct dlginfo_cell* get_dialog_data(struct dlg_cell *dlg, int type) dlginfo->pubruris_caller = (struct str_list*)shm_malloc( sizeof(struct str_list) ); if (dlginfo->pubruris_caller==0) { - LM_ERR("no more shm mem (%d)\n", (int) sizeof(struct str_list)); + SHM_MEM_ERROR; free_dlginfo_cell(dlginfo); return NULL; } @@ -577,7 +577,7 @@ struct dlginfo_cell* get_dialog_data(struct dlg_cell *dlg, int type) dlginfo->pubruris_callee = (struct str_list*)shm_malloc( sizeof(struct str_list) ); if (dlginfo->pubruris_callee==0) { - LM_ERR("no more shm mem (%d)\n", (int) sizeof(struct str_list)); + SHM_MEM_ERROR; free_dlginfo_cell(dlginfo); return NULL; }