Hi,
we have patch the xcap_misc.h with "#define XCAP_MAX_URI_SIZE   255"
which was 127, and extended the length of field doc_uri in the xcap
table to 256 from 128. Now the errror is gone.

After that we have done some test with curl, following are the results:
- DELETE an Entry from the list: OK
  i.e.: curl  -X DELETE
http://<ip>:5060/xcap-root/resource-lists/users/sip:user@domain/index/~~/resource-lists/list/entry%5b@uri=%22sip:u1@d1%22%5d
 after this command, the contact u1@d1 is removed from the contact list.

- UPDATE an Entry from the list: OK
 i.e.,
curl -T entry.xml -X PUT
http://<ip>:5060/xcap-root/resource-lists/users/sip:user@domain/index/~~/resource-lists/list%5b@name=%22RootGroup%22%5d/entry%5b@uri=%22sip:u2@d2%22%5d

if the sip:u2@d2 entry exists, the entry is replaced with the entry in
the entry.xml (<entry
uri="sip:u3@d3"><display-name>u3</display-name></entry>), which is
sip:u3@d3

if the sip:u2@d2 entry is not exists, the entry of u3@d3 is not added
to the list!!! follow the rfc4825, it should be added to the list if
the entry does not exits.

- Add an Entry from the list: KO
 i.e.,
curl -T entry.xml -X PUT
http://<ip>:5060/xcap-root/resource-lists/users/sip:user@domain/index/~~/resource-lists/list%5b@name=%22RootGroup%22%5d/entry%5b@uri=%22sip:u2@d2%22%5d

 the entry.xml is (<entry
uri="sip:u2@d2"><display-name>u2</display-name></entry>)

 the entry sip:u2@d2 was not in the list before the command and is not
added after the command.

I think it's a bug of xcap server.


Many thanks!

Laura




On Wed, Sep 7, 2011 at 12:17 PM, Juha Heinanen <j...@tutpro.com> wrote:
> Daniel-Constantin Mierla writes:
>
>> Feel free to do it, however I think it has to be reviewed where is used,
>> though -- it should be safe even size in db is longer as long as the
>> insert is done by kamailio itself, not sure we have affected cases when
>> the insert is done by external apps, so better double check...
>
> every module that reads data from db should check size of received
> string so that it is not longer than space reserved for it in data
> structures. i hope that no module assumes that received data cannot be
> bigger than what db schema says.
>
> -- juha
>

_______________________________________________
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