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

<h2>branch: master updated</h2>
<pre>
       via: a5779d5431db01d55df338c11f83aaf87511af1e (commit)
      from: fd7bbc0b3ca806126a3665cc5341b2f6091cec5d (commit)


</pre>= COMMIT LOG ===========================================================
<div class="highlight"><pre>committer: Brian West
comments: 
fix regression from FS-899, thanks acrobits for testing this

<span style="color: #000080; font-weight: bold">diff --git a/src/mod/endpoints/mod_sofia/sofia_presence.c b/src/mod/endpoints/mod_sofia/sofia_presence.c</span>
<span style="color: #000080; font-weight: bold">index 89eb1ae..91808a7 100644</span>
<span style="color: #A00000">--- a/src/mod/endpoints/mod_sofia/sofia_presence.c</span>
<span style="color: #00A000">+++ b/src/mod/endpoints/mod_sofia/sofia_presence.c</span>
<span style="color: #800080; font-weight: bold">@@ -91,6 +91,7 @@ switch_status_t sofia_presence_chat_send(const char *proto, const char *from, co</span>
         char *user_via = NULL;
         char *contact_str = NULL;
         char *dup_dest = NULL;
<span style="color: #00A000">+        char *p = NULL;</span>
         char *remote_host = NULL;
 
         if (!to) {
<span style="color: #800080; font-weight: bold">@@ -187,7 +188,12 @@ switch_status_t sofia_presence_chat_send(const char *proto, const char *from, co</span>
         
                 /* sofia_glue is running sofia_overcome_sip_uri_weakness we do not, not sure if it matters */
 
<span style="color: #A00000">-                dup_dest = strdup(dst-&gt;contact);</span>
<span style="color: #00A000">+                if (dst-&gt;route_uri) {</span>
<span style="color: #00A000">+                        dup_dest = strdup(dst-&gt;route_uri);</span>
<span style="color: #00A000">+                } else  {</span>
<span style="color: #00A000">+                        dup_dest = strdup(dst-&gt;to);</span>
<span style="color: #00A000">+                }</span>
<span style="color: #00A000">+</span>
 
                 if (dst-&gt;route_uri) {
                         remote_host = strdup(dst-&gt;route_uri);
<span style="color: #800080; font-weight: bold">@@ -226,17 +232,12 @@ switch_status_t sofia_presence_chat_send(const char *proto, const char *from, co</span>
                         contact_str = profile-&gt;url;
                 }
 
<span style="color: #A00000">-                switch_safe_free(dup_dest);</span>
<span style="color: #A00000">-                switch_safe_free(remote_host);</span>
<span style="color: #A00000">-</span>
                 status = SWITCH_STATUS_SUCCESS;
 
<span style="color: #A00000">-                /*</span>
<span style="color: #A00000">-                if ((p = strstr(contact, &quot;;fs_&quot;))) {</span>
<span style="color: #00A000">+                if (dup_dest &amp;&amp; (p = strstr(dup_dest, &quot;;fs_&quot;))) {</span>
                         *p = &#39;\0&#39;;
                 }
<span style="color: #A00000">-                */</span>
<span style="color: #A00000">-</span>
<span style="color: #00A000">+                </span>
                 /* if this cries, add contact here too, change the 1 to 0 and omit the safe_free */
                 
                 msg_nh = nua_handle(profile-&gt;nua, NULL,
<span style="color: #800080; font-weight: bold">@@ -244,7 +245,7 @@ switch_status_t sofia_presence_chat_send(const char *proto, const char *from, co</span>
                                                         TAG_IF(dst-&gt;route, SIPTAG_ROUTE_STR(dst-&gt;route)),
                                                         SIPTAG_FROM_STR(from),
                                                         TAG_IF(contact, NUTAG_URL(contact)),
<span style="color: #A00000">-                                                        SIPTAG_TO_STR(dst-&gt;to),</span>
<span style="color: #00A000">+                                                        SIPTAG_TO_STR(dup_dest),</span>
                                                         SIPTAG_CONTACT_STR(contact_str),
                                                         TAG_END());
 
<span style="color: #800080; font-weight: bold">@@ -257,6 +258,8 @@ switch_status_t sofia_presence_chat_send(const char *proto, const char *from, co</span>
                                         TAG_END());
 
                 sofia_glue_free_destination(dst);
<span style="color: #00A000">+                switch_safe_free(dup_dest);</span>
<span style="color: #00A000">+                switch_safe_free(remote_host);</span>
         }                
         
         switch_console_free_matches(&amp;list);
</pre></div>
========================================================================<pre>

Summary of changes:
 src/mod/endpoints/mod_sofia/sofia_presence.c |   21 ++++++++++++---------
 1 files changed, 12 insertions(+), 9 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>