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
00029
00030
00031
00032 #include "asterisk.h"
00033
00034 ASTERISK_FILE_VERSION(__FILE__, "$Revision: 369001 $")
00035
00036 #include "asterisk/utils.h"
00037 #include "include/srtp.h"
00038
00039 struct sip_srtp *sip_srtp_alloc(void)
00040 {
00041 struct sip_srtp *srtp;
00042
00043 srtp = ast_calloc(1, sizeof(*srtp));
00044
00045 return srtp;
00046 }
00047
00048 void sip_srtp_destroy(struct sip_srtp *srtp)
00049 {
00050 if (srtp->crypto) {
00051 sdp_crypto_destroy(srtp->crypto);
00052 }
00053 srtp->crypto = NULL;
00054 ast_free(srtp);
00055 }