Commit f7123379 authored by David McGrew's avatar David McGrew

fixing debug output and a documentation nit

parent 979e1bc0
......@@ -175,9 +175,9 @@ typedef struct {
/* use err_report() to report debug message */
#define debug_print(mod, format, arg) \
if (mod.on) err_report(err_level_debug, ("%s: \n" format), mod.name, arg)
if (mod.on) err_report(err_level_debug, ("%s: " format "\n"), mod.name, arg)
#define debug_print2(mod, format, arg1,arg2) \
if (mod.on) err_report(err_level_debug, ("%s: \n" format), mod.name, arg1,arg2)
if (mod.on) err_report(err_level_debug, ("%s: " format "\n"), mod.name, arg1,arg2)
#else
......
......@@ -345,23 +345,23 @@ length as its second argument.
srtp_policy_t policy;
uint8_t key[30];
/* initialize libSRTP */
// initialize libSRTP
srtp_init();
/* set policy to describe a policy for an SRTP stream */
// set policy to describe a policy for an SRTP stream
crypto_policy_set_rtp_default(&policy.rtp);
crypto_policy_set_rtcp_default(&policy.rtcp);
policy.ssrc = ssrc;
policy.key = key;
policy.next = NULL;
/* set key to random value */
// set key to random value
crypto_get_random(key, 30);
/* allocate and initialize the SRTP session */
// allocate and initialize the SRTP session
srtp_create(&session, policy);
/* main loop: get rtp packets, send srtp packets */
// main loop: get rtp packets, send srtp packets
while (1) {
char rtp_buffer[2048];
unsigned len;
......
No preview for this file type
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment