Hello,

On 8/30/11 7:43 AM, Juha Heinanen wrote:
Daniel-Constantin Mierla writes:

In the xmlrpc command, there was an etag value, have you tried with '.'
as etag?
i haven't tried with "." etag yet.  i'll try that tomorrow.
mi pua publish from different UAs on same presentity seems to
work ok, when UAs always use "." as tag param.
based on a quick look over the code, allowing any etag should be possible by just removing the condition of an existing presentity when etag value is given and provide the etag to building PUBLISH headers. But is has to be tested, since I had no testbed setup for such case.

I am attaching the patch, would be great if you can test and report the results. Please check if a new record is inserted in the table when 200 ok comes to such publish.

Thanks,
Daniel

--
Daniel-Constantin Mierla -- http://www.asipto.com
Kamailio Advanced Training, Oct 10-13, Berlin: http://asipto.com/u/kat
http://linkedin.com/in/miconda -- http://twitter.com/miconda

diff --git a/modules_k/pua/send_publish.c b/modules_k/pua/send_publish.c
index 3523cbc..4c9c07f 100644
--- a/modules_k/pua/send_publish.c
+++ b/modules_k/pua/send_publish.c
@@ -425,11 +425,13 @@ int send_publish( publ_info_t* publ )
        
        presentity= search_htable(&pres, hash_code);
 
+#if 0
        if(publ->etag && presentity== NULL)
        {
                lock_release(&HashT->p_records[hash_code].lock);
                return 418;
        }
+#endif
 
        if(publ->flag & INSERT_TYPE)
        {
@@ -537,8 +539,10 @@ send_publish:
 
        if(publ->flag & UPDATE_TYPE)
                LM_DBG("etag:%.*s\n", etag.len, etag.s);
-       str_hdr = publ_build_hdr((publ->expires< 0)?3600:publ->expires, ev, 
&publ->content_type, 
-                               (publ->flag & UPDATE_TYPE)?&etag:NULL, 
publ->extra_headers, (body)?1:0);
+       str_hdr = publ_build_hdr((publ->expires< 0)?3600:publ->expires, ev,
+                               &publ->content_type,
+                               (publ->flag & UPDATE_TYPE)?&etag:publ->etag, 
publ->extra_headers,
+                               (body)?1:0);
 
        if(str_hdr == NULL)
        {
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to