mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-12 02:29:38 +02:00
SOCKS5 works again :)
This commit is contained in:
parent
3058ebe8b9
commit
d537463a42
4 changed files with 65 additions and 102 deletions
|
@ -104,7 +104,6 @@ public class OutgoingJingleFileOffer extends JingleFileTransferSession {
|
|||
return jutil.createErrorOutOfOrder(sessionAccept);
|
||||
}
|
||||
|
||||
LOGGER.log(Level.INFO, "Session was accepted. Initiate Bytestream.");
|
||||
state = State.active;
|
||||
|
||||
transportSession.processJingle(sessionAccept);
|
||||
|
@ -112,7 +111,6 @@ public class OutgoingJingleFileOffer extends JingleFileTransferSession {
|
|||
transportSession.initiateOutgoingSession(new JingleTransportInitiationCallback() {
|
||||
@Override
|
||||
public void onSessionInitiated(final BytestreamSession session) {
|
||||
LOGGER.log(Level.INFO, "BytestreamSession initiated. Start transfer.");
|
||||
sendingThread = new SendTask(session, source);
|
||||
queued.add(threadPool.submit(sendingThread));
|
||||
}
|
||||
|
@ -128,8 +126,6 @@ public class OutgoingJingleFileOffer extends JingleFileTransferSession {
|
|||
|
||||
@Override
|
||||
public IQ handleSessionTerminate(Jingle sessionTerminate) {
|
||||
LOGGER.log(Level.INFO, "Received session-terminate: " + sessionTerminate.getReason().asEnum());
|
||||
|
||||
state = State.terminated;
|
||||
return jutil.createAck(sessionTerminate);
|
||||
}
|
||||
|
@ -138,8 +134,6 @@ public class OutgoingJingleFileOffer extends JingleFileTransferSession {
|
|||
public IQ handleTransportReplace(final Jingle transportReplace)
|
||||
throws InterruptedException, XMPPException.XMPPErrorException,
|
||||
SmackException.NotConnectedException, SmackException.NoResponseException {
|
||||
LOGGER.log(Level.INFO, "Received transport-replace.");
|
||||
|
||||
final JingleTransportManager<?> replacementManager = JingleTransportMethodManager.getInstanceFor(connection)
|
||||
.getTransportManager(transportReplace);
|
||||
|
||||
|
|
|
@ -45,7 +45,6 @@ public class ReceiveTask implements Runnable {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
LOGGER.log(Level.INFO, "Start ReceiveTask");
|
||||
JingleFileTransferChild transfer = (JingleFileTransferChild) fileTransfer.getJingleContentDescriptionChildren().get(0);
|
||||
FileOutputStream outputStream = null;
|
||||
InputStream inputStream;
|
||||
|
@ -69,14 +68,12 @@ public class ReceiveTask implements Runnable {
|
|||
}
|
||||
|
||||
outputStream.write(filebuf);
|
||||
LOGGER.log(Level.INFO, "Received " + read + " bytes.");
|
||||
|
||||
} catch (IOException e) {
|
||||
LOGGER.log(Level.SEVERE, "Error while receiving data: ", e);
|
||||
} finally {
|
||||
try {
|
||||
session.close();
|
||||
LOGGER.log(Level.INFO, "Session closed.");
|
||||
} catch (IOException e) {
|
||||
LOGGER.log(Level.SEVERE, "Could not close InputStream.", e);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,6 @@ public class SendTask implements Runnable {
|
|||
|
||||
@Override
|
||||
public void run() {
|
||||
LOGGER.log(Level.INFO, "Start SendTask");
|
||||
InputStream inputStream;
|
||||
OutputStream outputStream;
|
||||
|
||||
|
@ -58,7 +57,7 @@ public class SendTask implements Runnable {
|
|||
}
|
||||
|
||||
outputStream.write(filebuf);
|
||||
LOGGER.log(Level.INFO, "Written " + r + " bytes.");
|
||||
outputStream.flush();
|
||||
}
|
||||
catch (IOException e) {
|
||||
LOGGER.log(Level.SEVERE, "Could not send file: " + e, e);
|
||||
|
@ -66,7 +65,6 @@ public class SendTask implements Runnable {
|
|||
finally {
|
||||
try {
|
||||
session.close();
|
||||
LOGGER.log(Level.INFO, "Session closed.");
|
||||
} catch (IOException e) {
|
||||
LOGGER.log(Level.SEVERE, "Could not close session.", e);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue