if(w!=null)
{//file accepted by filetransfer protocol;
//System.out.println(getSid());
w.startDownloading(new IBBReceive(iq.getFrom(),getSid(),backend,w));
fileWindows.put(getSid(),w);
backend.send(new InfoQuery(iq.getFrom(),"result",iq.getID(),null));
Log.xmlReceivedError("ibb stream init from unknown");
}
else
{
XMPPError e = new XMPPError("cancel",501);
e.addError(new XMPPErrorTag("feature-not-implemented"));
backend.send(new InfoQuery(iq.getFrom(),iq.getID(),e));
}
}
if(isClose())
{
GetFileWindow w= (GetFileWindow) fileWindows.remove(sid);
if(w!=null)((IBBReceive)w.getStreamReceive()).stopDownloading();
//System.out.println(" close " + sid);
backend.send(new InfoQuery(iq.getFrom(),"result",iq.getID(),null));
}
}
}