code cleanup in jingle socks5 transport
This commit is contained in:
parent
78e3afc1af
commit
97fe14c4be
|
@ -75,8 +75,6 @@ public class JingleSocks5Transport extends JingleTransport {
|
|||
SocksSocketFactory.createSocksConnection(socket,destination,0);
|
||||
isEstablished = true;
|
||||
callback.established();
|
||||
} catch (UnknownHostException e) {
|
||||
callback.failed();
|
||||
} catch (IOException e) {
|
||||
callback.failed();
|
||||
}
|
||||
|
@ -117,13 +115,7 @@ public class JingleSocks5Transport extends JingleTransport {
|
|||
if (callback != null) {
|
||||
callback.onFileTransmitted(file);
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
Log.d(Config.LOGTAG, connection.getAccount().getJid().toBareJid() + ": "+e.getMessage());
|
||||
callback.onFileTransferAborted();
|
||||
} catch (IOException e) {
|
||||
Log.d(Config.LOGTAG, connection.getAccount().getJid().toBareJid() + ": "+e.getMessage());
|
||||
callback.onFileTransferAborted();
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
} catch (Exception e) {
|
||||
Log.d(Config.LOGTAG, connection.getAccount().getJid().toBareJid() + ": "+e.getMessage());
|
||||
callback.onFileTransferAborted();
|
||||
} finally {
|
||||
|
@ -177,13 +169,7 @@ public class JingleSocks5Transport extends JingleTransport {
|
|||
fileOutputStream.close();
|
||||
file.setSha1Sum(CryptoHelper.bytesToHex(digest.digest()));
|
||||
callback.onFileTransmitted(file);
|
||||
} catch (FileNotFoundException e) {
|
||||
Log.d(Config.LOGTAG, connection.getAccount().getJid().toBareJid() + ": "+e.getMessage());
|
||||
callback.onFileTransferAborted();
|
||||
} catch (IOException e) {
|
||||
Log.d(Config.LOGTAG, connection.getAccount().getJid().toBareJid() + ": "+e.getMessage());
|
||||
callback.onFileTransferAborted();
|
||||
} catch (NoSuchAlgorithmException e) {
|
||||
} catch (Exception e) {
|
||||
Log.d(Config.LOGTAG, connection.getAccount().getJid().toBareJid() + ": "+e.getMessage());
|
||||
callback.onFileTransferAborted();
|
||||
} finally {
|
||||
|
|
Loading…
Reference in a new issue