Wed Jan 8 2020 09:50:21

Asterisk developer's documentation


srtp.c File Reference
#include "asterisk.h"
#include "asterisk/utils.h"
#include "include/srtp.h"

Go to the source code of this file.

Functions

struct sip_srtp * sip_srtp_alloc (void)
 
void sip_srtp_destroy (struct sip_srtp *srtp)
 

Function Documentation

struct sip_srtp* sip_srtp_alloc ( void  )

Definition at line 39 of file srtp.c.

References ast_calloc.

Referenced by setup_srtp().

40 {
41  struct sip_srtp *srtp;
42 
43  srtp = ast_calloc(1, sizeof(*srtp));
44 
45  return srtp;
46 }
#define ast_calloc(a, b)
Definition: astmm.h:82
void sip_srtp_destroy ( struct sip_srtp *  srtp)

Definition at line 48 of file srtp.c.

References ast_free, and sdp_crypto_destroy().

Referenced by __sip_destroy().

49 {
50  if (srtp->crypto) {
51  sdp_crypto_destroy(srtp->crypto);
52  }
53  srtp->crypto = NULL;
54  ast_free(srtp);
55 }
void sdp_crypto_destroy(struct sdp_crypto *crypto)
Definition: sdp_crypto.c:64
#define ast_free(a)
Definition: astmm.h:97