[asterisk-commits] kmoore: branch kmoore/pimp_sip_srtp r386534 - in /team/kmoore/pimp_sip_srtp: ...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Apr 25 13:14:55 CDT 2013
Author: kmoore
Date: Thu Apr 25 13:14:51 2013
New Revision: 386534
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=386534
Log:
Clean up some function naming and usage
Modified:
team/kmoore/pimp_sip_srtp/channels/chan_sip.c
team/kmoore/pimp_sip_srtp/include/asterisk/sdp_srtp.h
team/kmoore/pimp_sip_srtp/main/sdp_srtp.c
team/kmoore/pimp_sip_srtp/res/res_sip_sdp_rtp.c
Modified: team/kmoore/pimp_sip_srtp/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/pimp_sip_srtp/channels/chan_sip.c?view=diff&rev=386534&r1=386533&r2=386534
==============================================================================
--- team/kmoore/pimp_sip_srtp/channels/chan_sip.c (original)
+++ team/kmoore/pimp_sip_srtp/channels/chan_sip.c Thu Apr 25 13:14:51 2013
@@ -33293,7 +33293,7 @@
}
}
- if (!(*srtp)->crypto && !((*srtp)->crypto = ast_sdp_crypto_setup())) {
+ if (!(*srtp)->crypto && !((*srtp)->crypto = ast_sdp_crypto_alloc())) {
return FALSE;
}
Modified: team/kmoore/pimp_sip_srtp/include/asterisk/sdp_srtp.h
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/pimp_sip_srtp/include/asterisk/sdp_srtp.h?view=diff&rev=386534&r1=386533&r2=386534
==============================================================================
--- team/kmoore/pimp_sip_srtp/include/asterisk/sdp_srtp.h (original)
+++ team/kmoore/pimp_sip_srtp/include/asterisk/sdp_srtp.h Thu Apr 25 13:14:51 2013
@@ -65,7 +65,7 @@
* \retval NULL on failure
* \retval a pointer to a new ast_sdp_crypto structure
*/
-struct ast_sdp_crypto *ast_sdp_crypto_setup(void);
+struct ast_sdp_crypto *ast_sdp_crypto_alloc(void);
/*! \brief Destroy a previously allocated ast_sdp_crypto struct */
void ast_sdp_crypto_destroy(struct ast_sdp_crypto *crypto);
Modified: team/kmoore/pimp_sip_srtp/main/sdp_srtp.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/pimp_sip_srtp/main/sdp_srtp.c?view=diff&rev=386534&r1=386533&r2=386534
==============================================================================
--- team/kmoore/pimp_sip_srtp/main/sdp_srtp.c (original)
+++ team/kmoore/pimp_sip_srtp/main/sdp_srtp.c Thu Apr 25 13:14:51 2013
@@ -75,11 +75,6 @@
static int set_crypto_policy(struct ast_srtp_policy *policy, int suite_val, const unsigned char *master_key, unsigned long ssrc, int inbound);
-static struct ast_sdp_crypto *crypto_alloc(void)
-{
- return ast_calloc(1, sizeof(struct ast_sdp_crypto));
-}
-
void ast_sdp_crypto_destroy(struct ast_sdp_crypto *crypto)
{
ast_free(crypto->a_crypto);
@@ -89,7 +84,7 @@
ast_free(crypto);
}
-struct ast_sdp_crypto *ast_sdp_crypto_setup(void)
+struct ast_sdp_crypto *ast_sdp_crypto_alloc(void)
{
struct ast_sdp_crypto *p;
int key_len;
@@ -99,7 +94,7 @@
return NULL;
}
- if (!(p = crypto_alloc())) {
+ if (!(p = ast_calloc(1, sizeof(*p)))) {
return NULL;
}
@@ -347,7 +342,7 @@
/* Set encryption properties */
if (!srtp->crypto) {
- srtp->crypto = ast_sdp_crypto_setup();
+ srtp->crypto = ast_sdp_crypto_alloc();
}
if (dtls_enabled) {
Modified: team/kmoore/pimp_sip_srtp/res/res_sip_sdp_rtp.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/pimp_sip_srtp/res/res_sip_sdp_rtp.c?view=diff&rev=386534&r1=386533&r2=386534
==============================================================================
--- team/kmoore/pimp_sip_srtp/res/res_sip_sdp_rtp.c (original)
+++ team/kmoore/pimp_sip_srtp/res/res_sip_sdp_rtp.c Thu Apr 25 13:14:51 2013
@@ -553,7 +553,7 @@
}
if (!session_media->srtp->crypto) {
- session_media->srtp->crypto = ast_sdp_crypto_setup();
+ session_media->srtp->crypto = ast_sdp_crypto_alloc();
if (!session_media->srtp->crypto) {
return -1;
}
More information about the asterisk-commits
mailing list