[asterisk-bugs] [JIRA] (ASTERISK-23737) application_name support in cdr_pgsql and res_config_pgsql

Walter Doekes (JIRA) noreply at issues.asterisk.org
Fri Jun 6 03:30:56 CDT 2014


    [ https://issues.asterisk.org/jira/browse/ASTERISK-23737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=219113#comment-219113 ] 

Walter Doekes edited comment on ASTERISK-23737 at 6/6/14 3:30 AM:
------------------------------------------------------------------

Shouldn't it just be hardcoded to asterisk?

And does this work on all postgres versions? Or do we need a fallback pgconnect without the appname?

Secondly -- I couldn't view your reviewboard issue, because the site has issues -- I see in your patch here that the coding guidelines aren't followed:

{noformat}
+	if (!ast_strlen_zero(pgpassword))
+		ast_str_append(&connInfo, 0, " password=%s", pgpassword);
{noformat}
add braces for *all* if/while etc..

{noformat}
strcpy(dbappname,"");
{noformat}
use a space after the comma

{noformat}
+	//conn = PQsetdbLogin(pghostname, pgdbport, NULL, NULL, pgdbname, pgdbuser, pgpassword);
{noformat}
stray garbage (and illegal c++-style comments)

https://wiki.asterisk.org/wiki/display/AST/Coding+Guidelines


was (Author: wdoekes):
Shouldn't it just be hardcoded to asterisk?

> application_name support in cdr_pgsql and res_config_pgsql
> ----------------------------------------------------------
>
>                 Key: ASTERISK-23737
>                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-23737
>             Project: Asterisk
>          Issue Type: Improvement
>      Security Level: None
>          Components: CDR/cdr_pgsql, Resources/res_config_pgsql
>    Affects Versions: 1.8.27.0, 11.9.0
>            Reporter: doome
>            Assignee: Matt Jordan
>            Severity: Minor
>         Attachments: 01-res_pgsql_application_name_support.patch, pgsql_application_name.patch
>
>
> Postgresql supports application_name connection parameter to ease the identification of client processes. The attached patch makes use of this feature both in cdr_pgsql.c and res_config_pgsql.c.
> As a side effect, cdr_pgsql.c is updated to use the newer postrgesql connection mechanism which res_config_pgsql uses.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list