[PATCH][pjsua-lib] Destroy port passed to pjsua_callback::on_stream_created()

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

 



Hi pj_friends,
Please review / merge this patch which makes pjsua-lib call pjmedia_port_destroy() on the port passed to pjsua in the on_stream_created() callback.

When the port is given to pjsua, pjsua is effectively taking ownership of the port. pjsua controls when the port is added/removed from the conference, and knows when it is safe to destroy the port. As a user of the library it is much easier to be able to rely on the port's on_destroy() being called in this case.

I put the pjmedia_port_destroy() call before the call to the on_stream_destroyed() callback to be more backwards compatible. For example, if the user is currently ignoring on_destroy() and relying on the on_stream_destroyed() callback to destroy the port, then that still works.

Regards,
Kal

Attachment: pjsua-call-port-destroy.patch
Description: Binary data

_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[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