[Asterisk-code-review] cdr mysql: run a full reconnect on log if not connected (asterisk[master])

Tzafrir Cohen asteriskteam at digium.com
Wed Feb 21 12:00:03 CST 2018


Tzafrir Cohen has posted comments on this change. ( https://gerrit.asterisk.org/7928 )

Change subject: cdr_mysql: run a full reconnect on log if not connected
......................................................................


Patch Set 1:

(1 comment)

Looks like I'll need a separate change to move checking the basic configuration settings before setting the globals. I'll post some new review requests soon.

https://gerrit.asterisk.org/#/c/7928/1/addons/cdr_mysql.c
File addons/cdr_mysql.c:

https://gerrit.asterisk.org/#/c/7928/1/addons/cdr_mysql.c@622
PS1, Line 622: 	res |= my_load_config_string(cfg, "global", "hostname", &hostname, "localhost");
             : 	res |= my_load_config_string(cfg, "global", "dbname", &dbname, "astriskcdrdb");
             : 	res |= my_load_config_string(cfg, "global", "user", &dbuser, "root");
             : 	res |= my_load_config_string(cfg, "global", "sock", &dbsock, "");
             : 	res |= my_load_config_string(cfg, "global", "table", &dbtable, "cdr");
             : 	res |= my_load_config_string(cfg, "global", "password", &password, "");
             : 
             : 	res |= my_load_config_string(cfg, "global", "charset", &dbcharset, "");
             : 
             : 	res |= my_load_config_string(cfg, "global", "ssl_ca", &ssl_ca, "");
             : 	res |= my_load_config_string(cfg, "global", "ssl_cert", &ssl_cert, "");
             : 	res |= my_load_config_string(cfg, "global", "ssl_key", &ssl_key, "");
             : 
             : 	res |= my_load_config_number(cfg, "global", "port", &dbport, MYSQL_PORT);
             : 	res |= my_load_config_number(cfg, "global", "timeout", &timeout, 0);
             : 	res |= my_load_config_string(cfg, "global", "compat", &compat, "no");
             : 	res |= my_load_config_string(cfg, "global", "cdrzone", &cdrzone, "");
> If you do end up keeping the config reload stuff and you call this on recon
cdr_mysql has problems. I'm not going to fix all of them in this single fix. Certainly not as all of my changes end up squashed in a single commit. This bug is a different issue.

Anyway, I don't want to call reload from the new code, as mentioned above.



-- 
To view, visit https://gerrit.asterisk.org/7928
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I7603c7501dae7070fac35081cf35161579c47590
Gerrit-Change-Number: 7928
Gerrit-PatchSet: 1
Gerrit-Owner: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
Gerrit-Reviewer: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Gerrit-Comment-Date: Wed, 21 Feb 2018 18:00:03 +0000
Gerrit-HasComments: Yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180221/16ca3f5f/attachment.html>


More information about the asterisk-code-review mailing list