Ticket #1934 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Add reference counting APIs to event subscription

Reported by: nanang Owned by: bennylp
Priority: normal Milestone: release-2.5.5
Component: pjsip Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

Some application may process event subscription asynchonously, e.g: save pointer to evsub instance on evsub callback and return immediately from the callback while some other thread is assigned to continue some operation on the evsub instance. Unfortunately, the evsub instance may get destroyed before the other thread starts working on the evsub and later when it starts working on the evsub, the pointer to evsub is already invalid.

This ticket will introduce reference counting APIs so such application could safely keep a pointer to evsub instance.

Thanks George Joseph for the patch.

Change History

comment:1 Changed 2 years ago by nanang

  • Status changed from new to closed
  • Resolution set to fixed

In 5351:

Close #1934: Add reference counting APIs to event subscription.

Note: See TracTickets for help on using tickets.