jingle/send.c
changeset 67 c12618793df0
parent 64 63d4f434abbc
child 68 ae8b0d03887e
equal deleted inserted replaced
66:cd16ab43a285 67:c12618793df0
    77   accept.action = JINGLE_SESSION_ACCEPT;
    77   accept.action = JINGLE_SESSION_ACCEPT;
    78   accept.responder = g_strdup_printf("%s", lm_connection_get_jid(lconnection));
    78   accept.responder = g_strdup_printf("%s", lm_connection_get_jid(lconnection));
    79   accept.sid = jn->sid;
    79   accept.sid = jn->sid;
    80   accept.content = NULL;
    80   accept.content = NULL;
    81 
    81 
    82   sess = session_new(jn);
    82   sess = session_new_from_jinglenode(jn);
    83 
    83 
    84   for (child = jn->content; child; child = child->next) {
    84   for (child = jn->content; child; child = child->next) {
    85     cn = (JingleContent *)(child->data);
    85     cn = (JingleContent *)(child->data);
    86 
    86 
    87     xmlns = lm_message_node_get_attribute(cn->description, "xmlns");
    87     xmlns = lm_message_node_get_attribute(cn->description, "xmlns");
    97     transport = transfuncs->check(cn, &err);
    97     transport = transfuncs->check(cn, &err);
    98     if (transport == NULL || err != NULL) continue;
    98     if (transport == NULL || err != NULL) continue;
    99    
    99    
   100     scr_log_print(LPRINT_DEBUG, "jingle: New content accepted: %s", cn->name);
   100     scr_log_print(LPRINT_DEBUG, "jingle: New content accepted: %s", cn->name);
   101 
   101 
   102     session_add_content(sess, cn, JINGLE_SESSION_STATE_ACTIVE);
   102     session_add_content_from_jinglecontent(sess, cn, JINGLE_SESSION_STATE_ACTIVE);
   103     accept.content = g_slist_append(accept.content, cn);
   103     accept.content = g_slist_append(accept.content, cn);
   104   }
   104   }
   105 
   105 
   106   if(g_slist_length(sess->content) == 0) {
   106   if(g_slist_length(sess->content) == 0) {
   107     jingle_send_session_terminate(jn, "unsupported-applications");
   107     jingle_send_session_terminate(jn, "unsupported-applications");