comparison libpurple/protocols/jabber/jingle/rtp.c @ 26284:4f47eeaa1414

Add functions for more easily creating session-terminate packets.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Tue, 17 Mar 2009 04:40:25 +0000
parents f10034e0321b
children b1c4fcc5b814
comparison
equal deleted inserted replaced
26283:abcc94ace5ea 26284:4f47eeaa1414
370 purple_debug_info("jingle-rtp", "state-changed: type %d id: %s name: %s\n", type, sid, name); 370 purple_debug_info("jingle-rtp", "state-changed: type %d id: %s name: %s\n", type, sid, name);
371 371
372 if ((type == PURPLE_MEDIA_STATE_CHANGED_REJECTED || 372 if ((type == PURPLE_MEDIA_STATE_CHANGED_REJECTED ||
373 type == PURPLE_MEDIA_STATE_CHANGED_HANGUP) && 373 type == PURPLE_MEDIA_STATE_CHANGED_HANGUP) &&
374 sid == NULL && name == NULL) { 374 sid == NULL && name == NULL) {
375 jabber_iq_send(jingle_session_to_packet(session, 375 jabber_iq_send(jingle_session_terminate_packet(
376 JINGLE_SESSION_TERMINATE)); 376 session, "success"));
377 g_object_unref(session); 377 g_object_unref(session);
378 } 378 }
379 } 379 }
380 380
381 static PurpleMedia * 381 static PurpleMedia *
614 GList *candidates = jingle_rtp_transport_to_candidates(transport); 614 GList *candidates = jingle_rtp_transport_to_candidates(transport);
615 GList *codecs = jingle_rtp_parse_codecs(description); 615 GList *codecs = jingle_rtp_parse_codecs(description);
616 616
617 if (jingle_rtp_init_media(content) == FALSE) { 617 if (jingle_rtp_init_media(content) == FALSE) {
618 /* XXX: send error */ 618 /* XXX: send error */
619 jabber_iq_send(jingle_session_to_packet(session, 619 jabber_iq_send(jingle_session_terminate_packet(
620 JINGLE_SESSION_TERMINATE)); 620 session, "general-error"));
621 g_object_unref(session); 621 g_object_unref(session);
622 break; 622 break;
623 } 623 }
624 624
625 purple_media_set_remote_codecs(jingle_rtp_get_media(session), 625 purple_media_set_remote_codecs(jingle_rtp_get_media(session),