JFT: when no ressource, change state from PENDING to ERROR
authorNicolas Cornu <nicolas.cornu@ensi-bourges.fr>
Sun, 03 Oct 2010 22:01:59 +0200
changeset 169 9aee866bdb9a
parent 168 f699f6b47613
child 170 2af5b8872201
JFT: when no ressource, change state from PENDING to ERROR
jingle-ft/filetransfer.c
--- a/jingle-ft/filetransfer.c	Sun Sep 12 18:32:57 2010 +0200
+++ b/jingle-ft/filetransfer.c	Sun Oct 03 22:01:59 2010 +0200
@@ -443,12 +443,15 @@
 
     if (CURRENT_JID == NULL) { // CURRENT_JID = the jid of the user which has focus
       scr_LogPrint(LPRINT_LOGNORM, "Jingle File Transfer: Please, choose a valid JID in the roster");
+      jft->state = JINGLE_FT_ERROR;
       return;
     }
     ressource = jingle_find_compatible_res(CURRENT_JID, namespaces);
     if (ressource == NULL) {
       scr_LogPrint(LPRINT_LOGNORM, "Jingle File Transfer: Cannot send file, because this buddy"
                                    " has no compatible ressource available");
+
+      jft->state = JINGLE_FT_ERROR;
       return;
     }
 
@@ -806,3 +809,4 @@
   if (jft_cid)
     compl_del_category(jft_cid);
 }
+/* vim: set expandtab cindent cinoptions=>2\:2(0 sw=2 ts=2:  For Vim users... */