changeset 24934:3b4b9795f987

purple_media_add_stream should only add a stream to one session. Also clarified documentation.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Mon, 01 Sep 2008 01:58:42 +0000
parents 6ab96d5d8ac6
children e8b8c6b14196
files libpurple/media.c libpurple/media.h
diffstat 2 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media.c	Mon Sep 01 01:23:26 2008 +0000
+++ b/libpurple/media.c	Mon Sep 01 01:58:42 2008 +0000
@@ -1180,7 +1180,7 @@
 			return FALSE;
 		}
 	}
-	if (type & PURPLE_MEDIA_VIDEO) {
+	else if (type & PURPLE_MEDIA_VIDEO) {
 		type_direction = purple_media_to_fs_stream_direction(type & PURPLE_MEDIA_VIDEO);
 
 		if (!purple_media_add_stream_internal(media, sess_id, who,
--- a/libpurple/media.h	Mon Sep 01 01:23:26 2008 +0000
+++ b/libpurple/media.h	Mon Sep 01 01:58:42 2008 +0000
@@ -336,11 +336,16 @@
 /**
  * Adds a stream to a session.
  *
+ * It only adds a stream to one audio session or video session as
+ * the @c sess_id must be unique between sessions.
+ *
  * @param media The media object to find the session in.
  * @param sess_id The session id of the session to add the stream to.
  * @param who The name of the remote user to add the stream for.
  * @param type The type of stream to create.
  * @param transmitter The transmitter to use for the stream.
+ * @param num_params The number of parameters to pass to Farsight.
+ * @param params The parameters to pass to Farsight.
  *
  * @return @c TRUE The stream was added successfully, @c FALSE otherwise.
  */