← Back to team overview

rohc team mailing list archive

Re: [Question #266555]: Outer IP packet structure not recognized

 

Question #266555 on rohc changed:
https://answers.launchpad.net/rohc/+question/266555

    Status: Open => Answered

Didier Barvaux proposed the following answer:
Hello,

Your program is buggy. You use the decompressor after destroying it. You
destroyed it when the decompression failed.

    luchar_RohcDecStatus = rohc_decompress3(decompressor, rohc_packet, &rohc_Decompacket,
      rcvd_feedback, feedback_send);
    if(luchar_RohcDecStatus != ROHC_STATUS_OK)
       {
     printf("Decompression TCP/IP packet failed\n");
              rohc_decomp_free(decompressor);             <-------------- decompressor is destroyed but program continues using it
       }

If you comment out the rohc_decomp_free(decompressor) call, program runs
fine.

Note that your handling of error is quite strange. If the creation of
the decompressor fails, you free it (1st bug) and let the program
continue (2nd bug). All other error cases are buggy too.

Regards,
Didier

-- 
You received this question notification because you are a member of ROHC
Team, which is an answer contact for rohc.