Currently, only one of the send* methods in OutgoingFileTransfer calls setFileInfo() in the super class. This patch makes getFileName() and getFileSize() in all FileTransfer objects, incoming as well as outgoing, return meaningful data.
Index: source/org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.java
— source/org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.java (revision 10957)
+++ source/org/jivesoftware/smackx/filetransfer/OutgoingFileTransfer.java (working copy)
@@ -120,6 +120,7 @@
+ " been attempted on this file transfer");
}
try {
-
setFileInfo(fileName, fileSize); this.outputStream = negotiateStream(fileName, fileSize, description); } catch (XMPPException e) { handleXMPPException(e);
@@ -159,6 +160,7 @@
“The negotation process has already”
+ " been attempted for this file transfer");
}
-
setFileInfo(fileName, fileSize); this.callback = progress; transferThread = new Thread(new Runnable() { public void run() {
@@ -274,6 +276,7 @@
public synchronized void sendStream(final InputStream in, final String fileName, final long fileSize, final String description){
checkTransferThread();
-
setFileInfo(fileName, fileSize); transferThread = new Thread(new Runnable() { public void run() { //Create packet filter