<p>Jaco Kroon has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/15511">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_odbc_transaction: correctly initialise forcecommit value from DSN.<br><br>Also improve the in-process documentation to clarify that the value is<br>initialised from the DSN and not default false, but that the DSN's value<br>is default false if unset.<br><br>ASTERISK-29311 #close<br><br>Change-Id: I46e2379f7b0656034442bce77cb37ccd4e61098d<br>Signed-off-by: Jaco Kroon <jaco@uls.co.za><br>---<br>M res/res_odbc_transaction.c<br>1 file changed, 3 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/11/15511/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_odbc_transaction.c b/res/res_odbc_transaction.c</span><br><span>index dd6ee30..3161557 100644</span><br><span>--- a/res/res_odbc_transaction.c</span><br><span>+++ b/res/res_odbc_transaction.c</span><br><span>@@ -44,7 +44,8 @@</span><br><span>                                   </enum></span><br><span>                                        <enum name="forcecommit"></span><br><span>                                            <para>Controls whether a transaction will be automatically committed when the channel</span><br><span style="color: hsl(0, 100%, 40%);">-                                             hangs up.  Defaults to false.  If a <replaceable>transaction ID</replaceable> is specified in the optional argument,</span><br><span style="color: hsl(120, 100%, 40%);">+                                              hangs up.  Defaults to forcecommit value from the relevant DSN (which defaults to false).</span><br><span style="color: hsl(120, 100%, 40%);">+                                             If a <replaceable>transaction ID</replaceable> is specified in the optional argument,</span><br><span>                                            the property will be applied to that ID, otherwise to the current active ID.</para></span><br><span>                                    </enum></span><br><span>                                        <enum name="isolation"></span><br><span>@@ -175,7 +176,7 @@</span><br><span>                return NULL;</span><br><span>         }</span><br><span>    txn->isolation = ast_odbc_class_get_isolation(txn->obj->parent);</span><br><span style="color: hsl(0, 100%, 40%);">-       txn->forcecommit = ast_odbc_class_get_isolation(txn->obj->parent);</span><br><span style="color: hsl(120, 100%, 40%);">+   txn->forcecommit = ast_odbc_class_get_forcecommit(txn->obj->parent);</span><br><span>        txn->active = 1;</span><br><span> </span><br><span>      if (SQLSetConnectAttr(txn->obj->con, SQL_ATTR_AUTOCOMMIT, (void *)SQL_AUTOCOMMIT_OFF, 0) == SQL_ERROR) {</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/15511">change 15511</a>. To unsubscribe, or for help writing mail filters, 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/c/asterisk/+/15511"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: I46e2379f7b0656034442bce77cb37ccd4e61098d </div>
<div style="display:none"> Gerrit-Change-Number: 15511 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Jaco Kroon <jaco@uls.co.za> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>