<p>Kevin Harwell <strong>posted comments</strong> on this change.</p><p><a href="https://gerrit.asterisk.org/7928">View Change</a></p><p>Patch set 3:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p>(1 comment)</p><ul style="list-style: none; padding-left: 20px;"><li><p><a href="https://gerrit.asterisk.org/#/c/7928/3/addons/cdr_mysql.c">File addons/cdr_mysql.c:</a></p><ul style="list-style: none; padding-left: 20px;"><li><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/#/c/7928/3/addons/cdr_mysql.c@189">Patch Set #3, Line 189:</a> </p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><pre style="font-family: monospace,monospace; white-space: pre-wrap;">           struct ast_config *cfg = ast_config_load(config, config_flags);<br>               ast_verb(3, "Not connected. Attempting to re-establish connection to MySQL CDR database.\n");<br>               if (cfg == CONFIG_STATUS_FILEMISSING) {<br>                       ast_log(LOG_WARNING, "Unable to load config for mysql CDR's: %s\n", config);<br>            } else if (cfg == CONFIG_STATUS_FILEINVALID) {<br>                        ast_log(LOG_ERROR, "Unable to load configuration file '%s'\n", config);<br>             } else {<br>                      int res;<br><br>                    AST_RWLIST_WRLOCK(&columns);<br>                      res = my_connect_db(cfg);<br></pre></blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">After you load the configuration the global strings are not being updated effectively making the config_load useless.</p><p style="white-space: pre-wrap; word-wrap: break-word;">For instance, if hostname changes in the config, this will still try to connect to the previous hostname.</p><p style="white-space: pre-wrap; word-wrap: break-word;">You need to check if the required configuration variables are valid, and then reset those variables. See 'my_load_config_string'. However that too will need to be modified to free any previously held value in order to avoid a memory leak.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/7928">change 7928</a>. To unsubscribe, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/7928"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I7603c7501dae7070fac35081cf35161579c47590 </div>
<div style="display:none"> Gerrit-Change-Number: 7928 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Tzafrir Cohen <tzafrir.cohen@xorcom.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins2 </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Matthew Fredrickson <creslin@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Oron Peled <oron.peled@xorcom.com> </div>
<div style="display:none"> Gerrit-Reviewer: Sean Bright <sean.bright@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Tzafrir Cohen <tzafrir.cohen@xorcom.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 08 May 2018 18:39:49 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>