pidgin.vv: 4af773e4: Set remote candidates as soon as they ar...
maiku at soc.pidgin.im
maiku at soc.pidgin.im
Sat Jan 17 05:11:03 EST 2009
-----------------------------------------------------------------
Revision: 4af773e4022b42fec537fedc9efee34e4c9a5497
Ancestor: c51d00ccf502cd9986616406747f9b0144c4e6c3
Author: maiku at soc.pidgin.im
Date: 2009-01-17T04:36:40
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/4af773e4022b42fec537fedc9efee34e4c9a5497
Modified files:
libpurple/media.c
ChangeLog:
Set remote candidates as soon as they are received.
-------------- next part --------------
============================================================
--- libpurple/media.c 311983289ccea44fdc1af3cc90ccf385cd07cc85
+++ libpurple/media.c a9a97d0c21c174eabe784dcd70800ff38e2947b9
@@ -1184,21 +1184,6 @@ purple_media_get_pipeline(PurpleMedia *m
return media->priv->pipeline;
}
-static void
-purple_media_set_remote_candidates(PurpleMediaStream *stream)
-{
- GError *err = NULL;
-
- fs_stream_set_remote_candidates(stream->stream,
- stream->remote_candidates, &err);
-
- if (err) {
- purple_debug_error("media", "Error adding remote"
- " candidates: %s\n", err->message);
- g_error_free(err);
- }
-}
-
void
purple_media_error(PurpleMedia *media, const gchar *error, ...)
{
@@ -1235,7 +1220,6 @@ purple_media_accept(PurpleMedia *media)
for (; streams; streams = g_list_next(streams)) {
PurpleMediaStream *stream = streams->data;
- purple_media_set_remote_candidates(stream);
g_object_set(G_OBJECT(stream->stream), "direction",
purple_media_to_fs_stream_direction(
stream->session->type), NULL);
@@ -1758,11 +1742,18 @@ purple_media_add_remote_candidates(Purpl
const gchar *name, GList *remote_candidates)
{
PurpleMediaStream *stream = purple_media_get_stream(media, sess_id, name);
+ GError *err = NULL;
+
stream->remote_candidates = g_list_concat(stream->remote_candidates,
purple_media_candidate_list_to_fs(remote_candidates));
- if (stream->session->accepted == TRUE) {
- purple_media_set_remote_candidates(stream);
+ fs_stream_set_remote_candidates(stream->stream,
+ stream->remote_candidates, &err);
+
+ if (err) {
+ purple_debug_error("media", "Error adding remote"
+ " candidates: %s\n", err->message);
+ g_error_free(err);
}
}
More information about the Commits
mailing list