<h1>Project "FreeSWITCH Source" received a push.</h1>

<h2>branch: master updated</h2>
<pre>
       via: 04bb74fcaeb72683754ed4b4d6df197a898887b7 (commit)
      from: 436413e0bb506a07758c60cdcf4a6be1adc0e575 (commit)


</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Anthony Minessale
comments: 
FS-3050 FS-3051

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/endpoints/mod_sofia/sofia_reg.c b/src/mod/endpoints/mod_sofia/sofia_reg.c</span>
<span style="color: #000080; font-weight: bold">index 76b1dcc..5109e0b 100644</span>
<span style="color: #A00000">--- a/src/mod/endpoints/mod_sofia/sofia_reg.c</span>
<span style="color: #00A000">+++ b/src/mod/endpoints/mod_sofia/sofia_reg.c</span>
<span style="color: #800080; font-weight: bold">@@ -1543,6 +1543,8 @@ uint8_t sofia_reg_handle_register(nua_t *nua, sofia_profile_t *profile, nua_hand</span>
                                 }
                         }
                 } else {
<span style="color: #00A000">+                        switch_core_del_registration(to_user, reg_host, call_id);</span>
<span style="color: #00A000">+</span>
                         if (switch_event_create_subclass(&amp;s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_UNREGISTER) == SWITCH_STATUS_SUCCESS) {
                                 switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, &quot;profile-name&quot;, profile-&gt;name);
                                 switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, &quot;from-user&quot;, to_user);
<span style="color: #000080; font-weight: bold">diff --git a/src/switch_core_sqldb.c b/src/switch_core_sqldb.c</span>
<span style="color: #000080; font-weight: bold">index ba92ebc..f54bd65 100644</span>
<span style="color: #A00000">--- a/src/switch_core_sqldb.c</span>
<span style="color: #00A000">+++ b/src/switch_core_sqldb.c</span>
<span style="color: #800080; font-weight: bold">@@ -1625,7 +1625,7 @@ static char create_nat_sql[] =</span>
 
 static char create_registrations_sql[] =
         &quot;CREATE TABLE registrations (\n&quot;
<span style="color: #A00000">-        &quot;   user      VARCHAR(256),\n&quot;</span>
<span style="color: #00A000">+        &quot;   reg_user      VARCHAR(256),\n&quot;</span>
         &quot;   realm     VARCHAR(256),\n&quot;
         &quot;   token     VARCHAR(256),\n&quot;
         &quot;   url      TEXT,\n&quot;
<span style="color: #800080; font-weight: bold">@@ -1635,7 +1635,7 @@ static char create_registrations_sql[] =</span>
         &quot;   network_proto VARCHAR(256),\n&quot;
         &quot;   hostname VARCHAR(256)\n&quot;
         &quot;);\n&quot;
<span style="color: #A00000">-        &quot;create index regindex1 on registrations (user,real,hostname);\n&quot;;</span>
<span style="color: #00A000">+        &quot;create index regindex1 on registrations (user,realm,hostname);\n&quot;;</span>
         
 
 SWITCH_DECLARE(switch_status_t) switch_core_add_registration(const char *user, const char *realm, const char *token, const char *url, uint32_t expires, 
<span style="color: #800080; font-weight: bold">@@ -1653,7 +1653,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_add_registration(const char *user, c</span>
         switch_cache_db_execute_sql(dbh, sql, NULL);
         free(sql);
 
<span style="color: #A00000">-        sql = switch_mprintf(&quot;insert into registrations (user,realm,token,url,expires,network_ip,network_port,network_proto,hostname) &quot;</span>
<span style="color: #00A000">+        sql = switch_mprintf(&quot;insert into registrations (reg_user,realm,token,url,expires,network_ip,network_port,network_proto,hostname) &quot;</span>
                                                  &quot;values (&#39;%q&#39;,&#39;%q&#39;,&#39;%q&#39;,&#39;%q&#39;,%ld,&#39;%q&#39;,&#39;%q&#39;,&#39;%q&#39;,&#39;%q&#39;)&quot;,
                                                  switch_str_nil(user),
                                                  switch_str_nil(realm),
<span style="color: #800080; font-weight: bold">@@ -1685,7 +1685,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_del_registration(const char *user, c</span>
                 return SWITCH_STATUS_FALSE;
         }
 
<span style="color: #A00000">-        sql = switch_mprintf(&quot;delete from registrations where user=&#39;%q&#39; and realm=&#39;%q&#39; and hostname=&#39;%q&#39;&quot;, user, realm, switch_core_get_hostname());</span>
<span style="color: #00A000">+        sql = switch_mprintf(&quot;delete from registrations where reg_user=&#39;%q&#39; and realm=&#39;%q&#39; and hostname=&#39;%q&#39;&quot;, user, realm, switch_core_get_hostname());</span>
 
         switch_cache_db_execute_sql(dbh, sql, NULL);
         switch_cache_db_release_db_handle(&amp;dbh);
<span style="color: #800080; font-weight: bold">@@ -1798,7 +1798,7 @@ switch_status_t switch_core_sqldb_start(switch_memory_pool_t *pool, switch_bool_</span>
         switch_cache_db_test_reactive(dbh, &quot;select hostname from complete&quot;, &quot;DROP TABLE complete&quot;, create_complete_sql);
         switch_cache_db_test_reactive(dbh, &quot;select hostname from aliases&quot;, &quot;DROP TABLE aliases&quot;, create_alias_sql);
         switch_cache_db_test_reactive(dbh, &quot;select hostname from nat&quot;, &quot;DROP TABLE nat&quot;, create_nat_sql);
<span style="color: #A00000">-        switch_cache_db_test_reactive(dbh, &quot;delete from registrations where network_proto=&#39;tcp&#39; or network_proto=&#39;tls&#39;&quot;, </span>
<span style="color: #00A000">+        switch_cache_db_test_reactive(dbh, &quot;delete from registrations where reg_user=&#39;&#39; or network_proto=&#39;tcp&#39; or network_proto=&#39;tls&#39;&quot;, </span>
                                                                   &quot;DROP TABLE registrations&quot;, create_registrations_sql);
 
 
<span style="color: #800080; font-weight: bold">@@ -1816,7 +1816,7 @@ switch_status_t switch_core_sqldb_start(switch_memory_pool_t *pool, switch_bool_</span>
                         }
                         switch_cache_db_test_reactive(dbh, &quot;select ikey from interfaces&quot;, &quot;DROP TABLE interfaces&quot;, create_interfaces_sql);
                         switch_cache_db_test_reactive(dbh, &quot;select hostname from tasks&quot;, &quot;DROP TABLE tasks&quot;, create_tasks_sql);
<span style="color: #A00000">-                        switch_cache_db_test_reactive(dbh, &quot;delete from registrations where network_proto=&#39;tcp&#39; or network_proto=&#39;tls&#39;&quot;, </span>
<span style="color: #00A000">+                        switch_cache_db_test_reactive(dbh, &quot;delete from registrations where reg_user=&#39;&#39; or network_proto=&#39;tcp&#39; or network_proto=&#39;tls&#39;&quot;, </span>
                                                                                   &quot;DROP TABLE registrations&quot;, create_registrations_sql);
 
                         if (runtime.odbc_dbtype == DBTYPE_DEFAULT) {
</pre></div>
========================================================================<pre>

Summary of changes:
 src/mod/endpoints/mod_sofia/sofia_reg.c |    2 ++
 src/switch_core_sqldb.c                 |   12 ++++++------
 2 files changed, 8 insertions(+), 6 deletions(-)
</pre>
<p>this email was generated because of /git/your-repo.git/hooks/post-receive by the file /git-core/contrib/hooks/post-receive-email<br />
For more info, see <a href="http://blog.chomperstomp.com/?p=630">http://blog.chomperstomp.com/?p=630</a>
-- <br />
FreeSWITCH Source</p>