On 11/23/2010 11:31 AM, Wenbin Wu wrote: > This is a simple test for poi in sccp_create_sccp_addr. > I also try to test gti, but I always get Segmentation fault. I use gdb and > find it stops in line 512. I can print the value of sock->gti_len, i don't > know what's wrong. > > > 512 gti = msgb_put(msg, sock->gti_len); > 513 memcpy(gti, sock->gti, sock->gti_len); >
In the best case you have not set gti_len to the right size. I have applied your patch for the POI and I have added a test case and a small fix (setting the SSN indicator bit) for the GTI case. It appears to work, please compare my testcase with the code that failed for you. thanks holger