Пример #1
0
void to_uni(SIG_ENTITY *sig,void *msg,int size)
{
    if (q_open(&in_dsc,msg,size) < 0) {
	abort_call(sig,msg,size);
	return;
    }
    process_uni(sig,msg);
    if (q_close(&in_dsc) < 0)
	diag(COMPONENT,DIAG_ERROR,"q_close returned <0 in to_uni");
}
Пример #2
0
static void on_zrtp_security_event(zrtp_stream_t *stream,
                                   zrtp_security_event_t event)
{
	debug("zrtp: got security_event '%u'\n", event);

	if (event == ZRTP_EVENT_WRONG_SIGNALING_HASH) {
		const struct menc_media *st = zrtp_stream_get_userdata(stream);

		warning("zrtp: Attack detected!!! Signaling hash from the "
		        "zrtp-hash SDP attribute doesn't match the hash of "
		        "the Hello message. Aborting the call.\n");

		/* As this was called from zrtp_process_xxx(), we need
		   a safe shutdown. */
		abort_call(st->sess);
	}
}