Mercurial > pidgin
comparison libpurple/protocols/jabber/jingle/jingle.c @ 24949:1a2d446cb8a0
Fix support for audio and video (at the same time) sessions.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Mon, 03 Nov 2008 03:07:07 +0000 |
parents | bd598b606ca4 |
children | bee5ab815291 |
comparison
equal
deleted
inserted
replaced
24948:78c3e991782a | 24949:1a2d446cb8a0 |
---|---|
211 jingle_session_accept_session(session); | 211 jingle_session_accept_session(session); |
212 | 212 |
213 for (; content; content = xmlnode_get_next_twin(content)) { | 213 for (; content; content = xmlnode_get_next_twin(content)) { |
214 const gchar *name = xmlnode_get_attrib(content, "name"); | 214 const gchar *name = xmlnode_get_attrib(content, "name"); |
215 const gchar *creator = xmlnode_get_attrib(content, "creator"); | 215 const gchar *creator = xmlnode_get_attrib(content, "creator"); |
216 JingleContent *content = jingle_session_find_content(session, name, creator); | 216 JingleContent *parsed_content = |
217 if (content == NULL) { | 217 jingle_session_find_content(session, name, creator); |
218 if (parsed_content == NULL) { | |
218 purple_debug_error("jingle", "Error parsing content\n"); | 219 purple_debug_error("jingle", "Error parsing content\n"); |
219 /* XXX: send error */ | 220 /* XXX: send error */ |
220 } else { | 221 } else { |
221 jingle_content_handle_action(content, jingle, | 222 jingle_content_handle_action(parsed_content, content, |
222 JINGLE_SESSION_ACCEPT); | 223 JINGLE_SESSION_ACCEPT); |
223 } | 224 } |
224 } | 225 } |
225 } | 226 } |
226 | 227 |
241 if (parsed_content == NULL) { | 242 if (parsed_content == NULL) { |
242 purple_debug_error("jingle", "Error parsing content\n"); | 243 purple_debug_error("jingle", "Error parsing content\n"); |
243 /* XXX: send error */ | 244 /* XXX: send error */ |
244 } else { | 245 } else { |
245 jingle_session_add_content(session, parsed_content); | 246 jingle_session_add_content(session, parsed_content); |
246 jingle_content_handle_action(parsed_content, jingle, | 247 jingle_content_handle_action(parsed_content, content, |
247 JINGLE_SESSION_INITIATE); | 248 JINGLE_SESSION_INITIATE); |
248 } | 249 } |
249 } | 250 } |
250 | 251 |
251 jabber_iq_send(jingle_session_create_ack(session, jingle)); | 252 jabber_iq_send(jingle_session_create_ack(session, jingle)); |
285 jabber_iq_send(jingle_session_create_ack(session, jingle)); | 286 jabber_iq_send(jingle_session_create_ack(session, jingle)); |
286 | 287 |
287 for (; content; content = xmlnode_get_next_twin(content)) { | 288 for (; content; content = xmlnode_get_next_twin(content)) { |
288 const gchar *name = xmlnode_get_attrib(content, "name"); | 289 const gchar *name = xmlnode_get_attrib(content, "name"); |
289 const gchar *creator = xmlnode_get_attrib(content, "creator"); | 290 const gchar *creator = xmlnode_get_attrib(content, "creator"); |
290 JingleContent *content = jingle_session_find_content(session, name, creator); | 291 JingleContent *parsed_content = |
291 if (content == NULL) { | 292 jingle_session_find_content(session, name, creator); |
293 if (parsed_content == NULL) { | |
292 purple_debug_error("jingle", "Error parsing content\n"); | 294 purple_debug_error("jingle", "Error parsing content\n"); |
293 /* XXX: send error */ | 295 /* XXX: send error */ |
294 } else { | 296 } else { |
295 jingle_content_handle_action(content, jingle, | 297 jingle_content_handle_action(parsed_content, content, |
296 JINGLE_TRANSPORT_INFO); | 298 JINGLE_TRANSPORT_INFO); |
297 } | 299 } |
298 } | 300 } |
299 } | 301 } |
300 | 302 |