Ticket #29 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

Calling pjsua_create() after pjsua_destroy() fails

Reported by: bennylp Owned by: bennylp
Priority: normal Milestone: release-0.5.10
Component: pjlib Version: 0.5.9
Keywords: Cc:
Backport to 1.x milestone: Backported:

Description

Some application want to be able to call pjsua_create() after calling pjsua_destroy(). Currently this sequence fails because the error subsystem has already been registered and subsequent registration will be refused.

The solution perhaps is to clear the error subsystem once pj_shutdown() is called.

Change History

comment:1 follow-up: ↓ 2 Changed 12 years ago by bennylp

  • Status changed from new to assigned

Few things that should be cleared by pj_shutdown():

  • pj/errno.c should provide a function to clear all currently registered error handlers (e.g. pj_errno_clear_handlers(), which set err_msg_hnd_cnt to zero).
  • the exception_cleanup() function in pj/except.c should also clear exception_id_names array (if PJ_HAS_EXCEPTION_NAMES is defined, of course).

comment:2 in reply to: ↑ 1 Changed 12 years ago by bennylp

Replying to bennylp:

.. and pj_errno_clear_handlers() should be called by pj_shutdown(), of course.

comment:3 Changed 12 years ago by bennylp

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

Fixed in r839

Note: See TracTickets for help on using tickets.