Opened 12 years ago

Closed 12 years ago

#1590 closed enhancement (fixed)

APIs to facilitate pending processing of pjsip_rx_data

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

Description

Processing of incoming messages (i.e. pjsip_rx_data) is done in on_rx_request() and on_rx_response() callbacks of a pjsip module. These callbacks must return immediately so that the next incoming packet can be processed by transports. This is especially true for TCP and TLS transports, since one TCP transport (i.e. socket) can only have one pjsip_rx_data buffer.

Some modules may want to have longer time in processing the message, for example to perform database operations or to consult other servers. For this usage, we want to be able to return from the on_rx_xxx() callback immediately, and later resume distributing the pjsip_rx_data to pjsip modules when the database operation is done.

This ticket adds the following APIs to facilitate the above:

  • pjsip_rx_data_clone(): clone rdata
  • pjsip_rx_data_free_cloned(): free cloned rdata
  • pjsip_endpt_process_rx_data(): distribute a (cloned) rdata to modules, specifying from which module the processing should start.

Change History (4)

comment:1 Changed 12 years ago by nanang

In r4275: APIs to facilitate pending processing of pjsip_rx_data.

comment:2 Changed 12 years ago by nanang

In 4291:

Re #1590: Fixed compile error 'invalid conversion from pj_list_type*' to pjsip_module*' on Symbian (thanks Rubel for the report).

comment:3 Changed 12 years ago by nanang

In 4295:

Re #1590: Fixed pjsip_rx_data_clone() when there are multiple instances of a single header type (thanks Mike Evans for the report and the fix).

comment:4 Changed 12 years ago by nanang

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.