Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
mediastreamer2
Commits
017ed6ae
Commit
017ed6ae
authored
Jan 21, 2016
by
Ghislain MARY
Browse files
Use mediastreamer memory allocation functions.
parent
e55cc5f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/crypto/zrtp.c
View file @
017ed6ae
...
...
@@ -374,7 +374,7 @@ static MSZrtpContext* createUserData(bzrtpContext_t *context, MSZrtpParams *para
userData
->
zrtpContext
=
context
;
/* get the zidFilename (if any)*/
if
(
params
->
zid_file
!=
NULL
)
{
userData
->
zidFilename
=
(
char
*
)
malloc
(
strlen
(
params
->
zid_file
)
+
1
);
userData
->
zidFilename
=
(
char
*
)
ms_
malloc
(
strlen
(
params
->
zid_file
)
+
1
);
memcpy
(
userData
->
zidFilename
,
params
->
zid_file
,
strlen
(
params
->
zid_file
));
userData
->
zidFilename
[
strlen
(
params
->
zid_file
)]
=
'\0'
;
}
else
{
...
...
@@ -540,7 +540,7 @@ MSZrtpContext* ms_zrtp_context_new(MSMediaStreamSessions *sessions, MSZrtpParams
/* get the sip URI of peer and store it into the context to set it in the cache. Done only for the first channel as it is useless for the other ones which doesn't update the cache */
if
(
params
->
uri
&&
strlen
(
params
->
uri
)
>
0
)
{
userData
->
peerURI
=
strdup
(
params
->
uri
);
userData
->
peerURI
=
ms_
strdup
(
params
->
uri
);
}
else
{
userData
->
peerURI
=
NULL
;
}
...
...
@@ -578,8 +578,8 @@ void ms_zrtp_context_destroy(MSZrtpContext *ctx) {
ms_message
(
"Stopping ZRTP context"
);
bzrtp_destroyBzrtpContext
(
ctx
->
zrtpContext
,
ctx
->
self_ssrc
);
if
(
ctx
->
zidFilename
)
free
(
ctx
->
zidFilename
);
if
(
ctx
->
peerURI
)
free
(
ctx
->
peerURI
);
if
(
ctx
->
zidFilename
)
ms_
free
(
ctx
->
zidFilename
);
if
(
ctx
->
peerURI
)
ms_
free
(
ctx
->
peerURI
);
free
(
ctx
);
ms_message
(
"ORTP-ZRTP context destroyed"
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment