[farsight2/master] Get the credentials in a safer way
Olivier Crête
olivier.crete at collabora.co.uk
Tue Dec 23 15:26:19 PST 2008
---
transmitters/nice/fs-nice-stream-transmitter.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/transmitters/nice/fs-nice-stream-transmitter.c b/transmitters/nice/fs-nice-stream-transmitter.c
index b071b32..187a8d6 100644
--- a/transmitters/nice/fs-nice-stream-transmitter.c
+++ b/transmitters/nice/fs-nice-stream-transmitter.c
@@ -694,13 +694,20 @@ nice_candidate_to_fs_candidate (NiceAgent *agent, NiceCandidate *nicecandidate)
if (fscandidate->username == NULL && fscandidate->password == NULL)
{
- const gchar *username, *password;
+ const gchar *username = NULL, *password = NULL;
nice_agent_get_local_credentials (agent, nicecandidate->stream_id,
&username, &password);
fscandidate->username = g_strdup (username);
fscandidate->password = g_strdup (password);
+
+ if (username == NULL || password == NULL)
+ {
+ GST_WARNING ("The stream has no credentials??");
+ }
}
+
+
return fscandidate;
}
--
1.5.6.5
More information about the farsight-commits
mailing list