#13 The length of format in set-value is not sufficient

open
Anuj
core (19)
5
2009-04-21
2009-01-28
Thord Schibler
No

The length of format in set-value is not sufficient.

This set-value entry will work, since the length is short
<set-value name="User-Data" format="12345678901234567890 <ServiceIndication>Seagull_sInd_01</ <SequenceNumber>65000</ <ServiceData> $(session-counter)"></set-value>

Whereas this will fail, and seagull core dumps upon start

<set-value name="User-Data" format="<?xml version='1.0' encoding='UTF-8' ?><Sh-Data xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='ShDataType_Rel8.xsd'><RepositoryData><ServiceIndication>Seagull_sInd_01</ServiceIndication><SequenceNumber>0</SequenceNumber><ServiceData>[0|Seagull_sInd_01]xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</ServiceData></RepositoryData></Sh-Data>"></set-value>

But if we use an external file, containing the value and use restore-from-external
we can infact set parameters to much more size-valid entries.
E.g.

<restore-from-external field="1" entity="User-Data"></restore-from-external>

external-file.csv
"string"; "string"; "string";
"sip:test.user0@example.com"; "<?xml version='1.0' encoding='UTF-8' ?><Sh-Data xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='ShDataType_Rel8.xsd'><RepositoryData><ServiceIndication>Seagull_sInd_01</ServiceIndication><SequenceNumber>0</SequenceNumber><ServiceData>[0|Seagull_sInd_01]xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</ServiceData></RepositoryData></Sh-Data>"; "0";
"sip:test.user1@example.com"; "<?xml version='1.0' encoding='UTF-8' ?><Sh-Data xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='ShDataType_Rel8.xsd'><RepositoryData><ServiceIndication>Seagull_sInd_01</ServiceIndication><SequenceNumber>0</SequenceNumber><ServiceData>[0|Seagull_sInd_01]xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</ServiceData></RepositoryData></Sh-Data>"; "0";

Discussion

  • Thord Schibler
    Thord Schibler
    2009-01-28

    OS: linux redhat as4u5
    Seagull version 1.8.0

     
  • Pavan Kulkarni
    Pavan Kulkarni
    2009-03-09

    • assigned_to: nobody --> pavankulkarni
     
  • Pavan Kulkarni
    Pavan Kulkarni
    2009-03-09

    Hello Thord Schibler,
    I am investigating this problem. Could you please provide me the core file or back trace of it? I am not observing the core in my setup.

    Thank you,
    Pavan

     
  • Anuj
    Anuj
    2009-04-21

    seagull has a limit to the size of its scenario file (2048B). But when given from external file, seagull would accept it, as it doesn't have to parse it.
    The following values can be changed in the seagull code for supporting large messages

    In file library-trans-ip/C_TransIP.cpp

    #define DEFAULT_DECODE_BUFFER_SIZE 4096 //if you wish to receive this message by seagull

    #define DEFAULT_ENCODE_BUFFER_SIZE 4096

    #define DEFAULT_READ_BUFFER_SIZE 1024

    In file xml-parser/C_XmlParser.cpp, function C_XmlParser::init ()

    ALLOC_VAR(m_lex_string_value,char*,2048 );

    m_lex_max_string_size = 2048;

     
  • Anuj
    Anuj
    2009-04-21

    • assigned_to: pavankulkarni --> srivanuj