On 10/21/2010 10:23 AM, Wenbin Wu wrote:
Hello,
Hi,
I have a problem in sccp.c.
537--543
udt->type = SCCP_MSG_TYPE_UDT;
udt->proto_class = class;
udt->variable_called = 3;
udt->variable_calling = 5 + out->gti_len;
if(out->use_poi) udt->variable_calling += 2;
udt->variable_data = 7 + out->gti_len + in->gti_len;
if(in->use_poi) udt->variable_calling += 2;
I think it would be valuable if you make yourself familiar with git. At least
git diff to be able to see difference from your original to this version.
I add these two 'if' lines in the code. I'm not sure if it is right.
In source code, before it calls 'create_sccp_addr', it sets the length only
using gti_len. But in 'create_sccp_addr', if I use poi, the length should be
add 2.
Am I right?
Yes, you are right. Do you care to fix it? create_sccp_addr should be changed
to return the number of bytes it used for writing the address, and then we
would update the variable_called and variable_calling with the real size of
the addr. This way the code will work even after we add more addressing options.
holger