transport_send_rtcp() segfault issue (Johan Lantz)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Manjeet

A simpler approach could perhaps be to not use the heap at all. If you are sending RTCP APP the max size is probably quite small.


//
pj_uint8_t TXBuffer[MAX_TX_PACKET_SIZE];
pj_uint8_t actualPacketSize;

my_create_pkt_function(TXBuffer, &actualPacketSize);

transport_send_rtcp(tp, TXBuffer, actualPacketSize);
//

Now when transport returns you do not have to care about freeing the memory at all.

/Johan 


Message: 5
Date: Mon, 30 Mar 2009 04:50:28 -0700 (PDT)
From: manjeet <manjeetss1@xxxxxxxxx>
Subject: transport_send_rtcp() segfault issue
To: pjsip at lists.pjsip.org
Message-ID: <602003.49962.qm at web52009.mail.re2.yahoo.com>
Content-Type: text/plain; charset="us-ascii"

Hi,

I am using "transport_send_rtcp()" to send the RTCP APP packet to the network.

The signature is as below :- transport_send_rtcp(pjmedia_transport *tp, const void *pkt, pj_size_t size);

Now i am passing a "pkt", which is allocated on the heap in my application as the 2nd parameter to "transport_send_rtcp()".

Question is do i need to "delete pkt" in my application once the transport_send_rtcp() return PJ_SUCCESS, or transport_send_rtcp() itseld will take care of this?

I tried deleting it when transport_send_rtcp() returns PJ_SUCCESS, but it segfaults sometimes.

Any help will be appreciated?

Thanks.




[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux