From: Rodrigo Ramírez Norambuena Date: Tue, 14 Apr 2015 18:16:45 +0000 (-0300) Subject: cel_pgsql: Fix name string for log on unable allocate memory. X-Git-Tag: 14.0.0-beta1~1063^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33a319ae734460fed029e407553214a3604aca85;p=thirdparty%2Fasterisk.git 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. ASTERISK-24965 #close Reported by: Rodrigo Ramirez Norambuena Change-Id: Icc818697d7d66d34bfe3048cdd15ca2b06c89744 --- diff --git a/cel/cel_pgsql.c b/cel/cel_pgsql.c index bb42151995..2d7f0dfb04 100644 --- a/cel/cel_pgsql.c +++ b/cel/cel_pgsql.c @@ -101,7 +101,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); \ @@ -114,7 +114,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); \