aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-06-24 13:36:37 +0200
committerChristian Schneppe <christian@pix-art.de>2016-06-24 20:23:00 +0200
commit4989e137b815a8648400dd355bc71092a44218d6 (patch)
treef150962cfb6933f08c41ebd303a778eeeb30d034 /src/main/java/eu/siacs/conversations
parentae5fbb9e02435384a91a47e204c65b0925be2f35 (diff)
code cleanup in jingle socks5 transport
Diffstat (limited to 'src/main/java/eu/siacs/conversations')
-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 04724aab6..2026fcf50 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleSocks5Transport.java
@@ -72,8 +72,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();
}
@@ -114,13 +112,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 {
@@ -174,13 +166,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 {