Beispiel #1
0
PJ_DEF(void) pjmedia_transport_zrtp_stopZrtp(pjmedia_transport *tp)
{
    struct tp_zrtp *zrtp = (struct tp_zrtp*)tp;

    pj_assert(tp && zrtp->zrtpCtx);

    zrtp_stopZrtpEngine(zrtp->zrtpCtx);
    zrtp_DestroyWrapper(zrtp->zrtpCtx);
    zrtp->zrtpCtx = NULL;
    zrtp->started = 0;
}
Beispiel #2
0
void ortp_zrtp_context_destroy(OrtpZrtpContext *ctx) {
	ortp_message("Stopping ZRTP context");
	zrtp_stopZrtpEngine(ctx->zrtpContext);

	ortp_message("Destroying ZRTP wrapper");
	zrtp_DestroyWrapper(ctx->zrtpContext);

	ortp_message("Destroying ORTP-ZRTP mutex");
	ortp_mutex_destroy(&ctx->mutex);

	ortp_message("Destroying SRTP contexts");
	if (ctx->srtpSend != NULL) srtp_dealloc(ctx->srtpSend);
	if (ctx->srtpRecv != NULL) srtp_dealloc(ctx->srtpRecv);

	ortp_message("ORTP-ZRTP context destroyed");
}