aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-06-24 13:36:37 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-06-24 13:36:37 +0200
commit97fe14c4beadb650b7db8b7752569b50313f3dd7 (patch)
tree828f5d45ba06332813a0a25f6520d847bf67bd52
parent78e3afc1af6b96d37d3f488af0481ec016823925 (diff)
code cleanup in jingle socks5 transport
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java18
1 files changed, 2 insertions, 16 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java
index 9240bd2c..87fa4097 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java
@@ -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 {