]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
cel_pgsql: Fix name string for log on unable allocate memory. 14/114/2
authorRodrigo Ramírez Norambuena <decipher.hk@gmail.com>
Tue, 14 Apr 2015 18:16:45 +0000 (15:16 -0300)
committerMatt Jordan <mjordan@digium.com>
Wed, 15 Apr 2015 11:17:08 +0000 (06:17 -0500)
The LOG_ERROR has reference to CDR instead of CEL  for LENGTHEN_BUF1 and
LENGTHEN_BUF2.

ASTERISK-24965 #close
Reported by: Rodrigo Ramirez Norambuena

Change-Id: Icc818697d7d66d34bfe3048cdd15ca2b06c89744

cel/cel_pgsql.c

index 541e01621880ee9b360dd90270ded79b5e8c5aca..6cd93e58fb735edd9409dba7de67833dc7febcf4 100644 (file)
@@ -91,7 +91,7 @@ static AST_RWLIST_HEAD_STATIC(psql_columns, columns);
                /* 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); \
@@ -104,7 +104,7 @@ static AST_RWLIST_HEAD_STATIC(psql_columns, columns);
        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); \