jingle/action-handlers.c
changeset 109 d4d50e62098b
parent 108 7df2fb9a2365
child 111 76ce876f7935
--- a/jingle/action-handlers.c	Fri Aug 13 18:10:46 2010 +0200
+++ b/jingle/action-handlers.c	Fri Aug 13 18:39:25 2010 +0200
@@ -385,10 +385,19 @@
 void handle_session_terminate(JingleNode *jn)
 {
   JingleSession *sess;
+  GSList *el;
+  SessionContent *sc;
+  
   if ((sess = session_find(jn)) == NULL) {
     jingle_send_iq_error(jn->message, "cancel", "item-not-found", "unknown-session");
     return;
   }
+  
+  for (el = sess->content; el; el = el->next) {
+    sc = (SessionContent*)el->data;
+    sc->appfuncs->stop(sc->description);
+    session_remove_sessioncontent(sess, sc->name);
+  }
   session_delete(sess);
   jingle_ack_iq(jn->message);
 }