[OpenSIPS-Devel] rls_handle_subscribe() return code when list is not found

2009-08-28 Thread Juha Heinanen
from rls tutorial document:

http://www.opensips.org/Resources/Rls

i get impression that rls_handle_subscribe() should return
to_presence_code, if resource list document is not found in xcap server.

however, when i read the code, it has:

if(doc== NULL|| service_node==NULL)
{
LM_DBG(list not found - search for uri = 
%.*s\n,subs.pres_uri.len,
subs.pres_uri.s);
reply_code = 404;
reply_str = pu_404_rpl;
goto error;
}

is this a bug?  if not, i don't see how a normal handle_subscribe()
can be tried if rls document doesn't exit.

-- juha

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] rls_handle_subscribe() return code when list is not found

2009-08-28 Thread Iñaki Baz Castillo
2009/8/28 Juha Heinanen j...@tutpro.com:
 from rls tutorial document:

 http://www.opensips.org/Resources/Rls

 i get impression that rls_handle_subscribe() should return
 to_presence_code, if resource list document is not found in xcap server.

 however, when i read the code, it has:

                if(doc== NULL|| service_node==NULL)
                {
                        LM_DBG(list not found - search for uri = 
 %.*s\n,subs.pres_uri.len,
                                subs.pres_uri.s);
                        reply_code = 404;
                        reply_str = pu_404_rpl;
                        goto error;
                }

 is this a bug?  if not, i don't see how a normal handle_subscribe()
 can be tried if rls document doesn't exit.

I haven't inspected the code, but  rls_handle_subscribe() does what
it's supposed to do (return the preconfigured to $rc when no RL doc is
found).


-- 
Iñaki Baz Castillo
i...@aliax.net

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] rls_handle_subscribe() return code when list is not found

2009-08-28 Thread Juha Heinanen
Iñaki Baz Castillo writes:

  I haven't inspected the code, but  rls_handle_subscribe() does what
  it's supposed to do (return the preconfigured to $rc when no RL doc is
  found).

inaki,

are you sure that it returns pre-configured $rc even when Supported:
header includes 'eventlist', but there is no presence list document in
xcap server?  

if there is no 'eventlist' in Supported header, then pre-configured $rc
is returned as it should.  my understand from reading the code and from
doing some tests is that in the above mentioned combination things, -1
is incorrectly returned.

-- juha

___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel


Re: [OpenSIPS-Devel] rls_handle_subscribe() return code when list is not found

2009-08-28 Thread Anca Vamanu
Hi Juha,

You are right, a Subscribe that contains Supported:eventlist header but 
for which a list definition is not found, is replied with 404 and not 
sent to the presence server. It has been the way described in the 
documentation but changed in a commit on 12 November last year:
http://opensips.svn.sourceforge.net/viewvc/opensips?view=revrevision=4944.

I have now looked through the RFC and to be honest, I think that I 
shouldn't have done the change and still let the Subscribe go to the 
presence server. I don't remember which was the reason to change it at 
that moment, but I remember it came after a discussion with Dan Pascu 
when he gave me a strong argument to do so.  I am willing to change it 
back, but will first wait for Dan's input on this.

Thanks and regards,
Anca

Juha Heinanen wrote:
 Iñaki Baz Castillo writes:

   I haven't inspected the code, but  rls_handle_subscribe() does what
   it's supposed to do (return the preconfigured to $rc when no RL doc is
   found).

 inaki,

 are you sure that it returns pre-configured $rc even when Supported:
 header includes 'eventlist', but there is no presence list document in
 xcap server?  

 if there is no 'eventlist' in Supported header, then pre-configured $rc
 is returned as it should.  my understand from reading the code and from
 doing some tests is that in the above mentioned combination things, -1
 is incorrectly returned.

 -- juha

 ___
 Devel mailing list
 Devel@lists.opensips.org
 http://lists.opensips.org/cgi-bin/mailman/listinfo/devel

   


___
Devel mailing list
Devel@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/devel