<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(&s_event, SWITCH_EVENT_CUSTOM, MY_EVENT_UNREGISTER) == SWITCH_STATUS_SUCCESS) {
                                switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "profile-name", profile->name);
                                switch_event_add_header_string(s_event, SWITCH_STACK_BOTTOM, "from-user", 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[] =
        "CREATE TABLE registrations (\n"
<span style="color: #A00000">-        " user VARCHAR(256),\n"</span>
<span style="color: #00A000">+        " reg_user VARCHAR(256),\n"</span>
        " realm VARCHAR(256),\n"
        " token VARCHAR(256),\n"
        " url TEXT,\n"
<span style="color: #800080; font-weight: bold">@@ -1635,7 +1635,7 @@ static char create_registrations_sql[] =</span>
        " network_proto VARCHAR(256),\n"
        " hostname VARCHAR(256)\n"
        ");\n"
<span style="color: #A00000">-        "create index regindex1 on registrations (user,real,hostname);\n";</span>
<span style="color: #00A000">+        "create index regindex1 on registrations (user,realm,hostname);\n";</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("insert into registrations (user,realm,token,url,expires,network_ip,network_port,network_proto,hostname) "</span>
<span style="color: #00A000">+        sql = switch_mprintf("insert into registrations (reg_user,realm,token,url,expires,network_ip,network_port,network_proto,hostname) "</span>
                                                 "values ('%q','%q','%q','%q',%ld,'%q','%q','%q','%q')",
                                                 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("delete from registrations where user='%q' and realm='%q' and hostname='%q'", user, realm, switch_core_get_hostname());</span>
<span style="color: #00A000">+        sql = switch_mprintf("delete from registrations where reg_user='%q' and realm='%q' and hostname='%q'", user, realm, switch_core_get_hostname());</span>
        switch_cache_db_execute_sql(dbh, sql, NULL);
        switch_cache_db_release_db_handle(&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, "select hostname from complete", "DROP TABLE complete", create_complete_sql);
        switch_cache_db_test_reactive(dbh, "select hostname from aliases", "DROP TABLE aliases", create_alias_sql);
        switch_cache_db_test_reactive(dbh, "select hostname from nat", "DROP TABLE nat", create_nat_sql);
<span style="color: #A00000">-        switch_cache_db_test_reactive(dbh, "delete from registrations where network_proto='tcp' or network_proto='tls'", </span>
<span style="color: #00A000">+        switch_cache_db_test_reactive(dbh, "delete from registrations where reg_user='' or network_proto='tcp' or network_proto='tls'", </span>
                                                                 "DROP TABLE registrations", 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, "select ikey from interfaces", "DROP TABLE interfaces", create_interfaces_sql);
                        switch_cache_db_test_reactive(dbh, "select hostname from tasks", "DROP TABLE tasks", create_tasks_sql);
<span style="color: #A00000">-                        switch_cache_db_test_reactive(dbh, "delete from registrations where network_proto='tcp' or network_proto='tls'", </span>
<span style="color: #00A000">+                        switch_cache_db_test_reactive(dbh, "delete from registrations where reg_user='' or network_proto='tcp' or network_proto='tls'", </span>
                                                                                 "DROP TABLE registrations", 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>