srtp.c
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #include "asterisk.h"
00029
00030 ASTERISK_FILE_VERSION(__FILE__, "$Revision: 268894 $")
00031
00032 #include "asterisk/utils.h"
00033 #include "include/srtp.h"
00034
00035 struct sip_srtp *sip_srtp_alloc(void)
00036 {
00037 struct sip_srtp *srtp;
00038
00039 srtp = ast_calloc(1, sizeof(*srtp));
00040
00041 return srtp;
00042 }
00043
00044 void sip_srtp_destroy(struct sip_srtp *srtp)
00045 {
00046 if (srtp->crypto) {
00047 sdp_crypto_destroy(srtp->crypto);
00048 }
00049 srtp->crypto = NULL;
00050 ast_free(srtp);
00051 }