[Asterisk-code-review] Change in asterisk[12]: cel_pgsql: Fix name string for log on unable allocate memory.
Rodrigo Ramirez Norambuena (Code Review)
asteriskteam at digium.com
Tue Apr 14 19:18:38 CDT 2015
Rodrigo Ramirez Norambuena has uploaded a new change for review.
https://gerrit.asterisk.org/116
Change subject: cel_pgsql: Fix name string for log on unable allocate memory.
......................................................................
cel_pgsql: Fix name string for log on unable allocate memory.
The LOG_ERROR has reference to CDR instead of CEL for LENGTHEN_BUF1 and
LENGTHEN_BUF2.
Change-Id: Icc818697d7d66d34bfe3048cdd15ca2b06c89744
---
M cel/cel_pgsql.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/16/116/1
diff --git a/cel/cel_pgsql.c b/cel/cel_pgsql.c
index 7b1bd09..1074a1c 100644
--- a/cel/cel_pgsql.c
+++ b/cel/cel_pgsql.c
@@ -92,7 +92,7 @@
/* Lengthen buffer, if necessary */ \
if (ast_str_strlen(sql) + size + 1 > ast_str_size(sql)) { \
if (ast_str_make_space(&sql, ((ast_str_size(sql) + size + 3) / 512 + 1) * 512) != 0) { \
- ast_log(LOG_ERROR, "Unable to allocate sufficient memory. Insert CDR failed.\n"); \
+ ast_log(LOG_ERROR, "Unable to allocate sufficient memory. Insert CEL '%s:%s' failed.\n", pghostname, table); \
ast_free(sql); \
ast_free(sql2); \
AST_RWLIST_UNLOCK(&psql_columns); \
@@ -105,7 +105,7 @@
do { \
if (ast_str_strlen(sql2) + size + 1 > ast_str_size(sql2)) { \
if (ast_str_make_space(&sql2, ((ast_str_size(sql2) + size + 3) / 512 + 1) * 512) != 0) { \
- ast_log(LOG_ERROR, "Unable to allocate sufficient memory. Insert CDR failed.\n"); \
+ ast_log(LOG_ERROR, "Unable to allocate sufficient memory. Insert CEL '%s:%s' failed.\n", pghostname, table); \
ast_free(sql); \
ast_free(sql2); \
AST_RWLIST_UNLOCK(&psql_columns); \
--
To view, visit https://gerrit.asterisk.org/116
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc818697d7d66d34bfe3048cdd15ca2b06c89744
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 12
Gerrit-Owner: Rodrigo Ramirez Norambuena <decipher.hk at gmail.com>
More information about the asterisk-code-review
mailing list