[SR-Users] SOLVED (PATCH): Re: Kamailio accepts and stores XCAP XML document from jitsi but rejects it on retrieval
Daniel-Constantin Mierla
miconda at gmail.com
Wed Jun 11 15:47:03 CEST 2014
Hello,
can you put the patch on the tracker to review it -- in this way should
not be forgotten.
- http://sip-router.org/tracker/
I looked a bit, but has some new functions and touches quite a lot the
existing parts, so I need more time to check it.
Thanks,
Daniel
On 10/06/14 17:28, Alex Villacís Lasso wrote:
> El 03/06/14 14:09, Alex Villacís Lasso escribió:
>> El 02/06/14 12:31, Alex Villacís Lasso escribió:
>>> El 31/05/14 01:30, Daniel-Constantin Mierla escribió:
>>>>
>>>> On 30/05/14 22:02, Alex Villacís Lasso wrote:
>>>>> [...] The xml document retrieval is failing again. Now it is
>>>>> because retrieval is truncating the MEDIUMTEXT field at 1024
>>>>> characters:
>>>> Adjust the value of parameter:
>>>>
>>>> http://kamailio.org/docs/modules/stable/modules/xcap_server.html#idm7128
>>>>
>>>>
>>>> Cheers,
>>>> Daniel
>>>>
>>> Did not work. Same symptoms as before.
>>>
>>> I see that the file modules/db_unixodbc/connection.h defines a strn
>>> structure with a hardcoded limit of STRN_LEN=1024 bytes per field.
>>>
>>> _______________________________________________
>>> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
>>> sr-users at lists.sip-router.org
>>> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
>>
>> I have solved this issue. In order to make it work with unixodbc, I
>> need to apply the attached patch. This patch removes the hardcoded
>> 1024-byte limit for field data that exists in current kamailio-4.1.3.
>> What the patch does is replace the embedded array in the 'struct
>> strn' with a pointer and a field for allocated size. The patch also
>> introduces three functions for manipulation of the modified 'struct
>> strn'. When the SQLGetData function returns SQL_SUCCESS_WITH_INFO,
>> the SQLSTATE is queried for the "data truncated" method. Then the
>> rest of the data is fetched in a loop.
>>
>> Please review this patch for inclusion. The actual detection of the
>> truncation could need some work.
>>
>> Also, the ODBC implementation could trip on true binary data
>> (containing embedded binary zeroes) because it is not binary-safe.
>> Are there scenarios in which the rest of Kamailio might need to
>> retrieve or store data with a binary-safe implementation?
> How should I proceed to submit this patch for inclusion to the git
> repository?
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
--
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
More information about the sr-users
mailing list