jingle-ft/filetransfer.c
changeset 169 9aee866bdb9a
parent 166 c42c167a2a5c
child 170 2af5b8872201
equal deleted inserted replaced
168:f699f6b47613 169:9aee866bdb9a
   441     gchar *ressource, *recipientjid;
   441     gchar *ressource, *recipientjid;
   442     const gchar *namespaces[] = {NS_JINGLE, NS_JINGLE_APP_FT, NULL};
   442     const gchar *namespaces[] = {NS_JINGLE, NS_JINGLE_APP_FT, NULL};
   443 
   443 
   444     if (CURRENT_JID == NULL) { // CURRENT_JID = the jid of the user which has focus
   444     if (CURRENT_JID == NULL) { // CURRENT_JID = the jid of the user which has focus
   445       scr_LogPrint(LPRINT_LOGNORM, "Jingle File Transfer: Please, choose a valid JID in the roster");
   445       scr_LogPrint(LPRINT_LOGNORM, "Jingle File Transfer: Please, choose a valid JID in the roster");
       
   446       jft->state = JINGLE_FT_ERROR;
   446       return;
   447       return;
   447     }
   448     }
   448     ressource = jingle_find_compatible_res(CURRENT_JID, namespaces);
   449     ressource = jingle_find_compatible_res(CURRENT_JID, namespaces);
   449     if (ressource == NULL) {
   450     if (ressource == NULL) {
   450       scr_LogPrint(LPRINT_LOGNORM, "Jingle File Transfer: Cannot send file, because this buddy"
   451       scr_LogPrint(LPRINT_LOGNORM, "Jingle File Transfer: Cannot send file, because this buddy"
   451                                    " has no compatible ressource available");
   452                                    " has no compatible ressource available");
       
   453 
       
   454       jft->state = JINGLE_FT_ERROR;
   452       return;
   455       return;
   453     }
   456     }
   454 
   457 
   455     recipientjid = g_strdup_printf("%s/%s", CURRENT_JID, ressource);
   458     recipientjid = g_strdup_printf("%s/%s", CURRENT_JID, ressource);
   456 
   459 
   804   jingle_unregister_app(NS_JINGLE_APP_FT);
   807   jingle_unregister_app(NS_JINGLE_APP_FT);
   805   cmd_del("file");
   808   cmd_del("file");
   806   if (jft_cid)
   809   if (jft_cid)
   807     compl_del_category(jft_cid);
   810     compl_del_category(jft_cid);
   808 }
   811 }
       
   812 /* vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2:  For Vim users... */