From c6548fd9eda7b58f5a2e2a9c01e3c7cafd42fafb Mon Sep 17 00:00:00 2001 From: Hung-ying Tyan Date: Tue, 5 Oct 2010 13:00:13 +0800 Subject: SIP: add SERVER_UNREACHABLE error code. Let SipSession return it when UnknownHostException is caught. Add DisconnectCause.SERVER_UNREACHABLE in Connection and have SipPhone report it when receiving SERVER_UNREACHABLE from SipSession. http://b/issue?id=3061691 Change-Id: I944328ba3ee30c0a9386e89b5c4696d4d9bde000 --- voip/java/com/android/server/sip/SipSessionGroup.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'voip/java/com/android') diff --git a/voip/java/com/android/server/sip/SipSessionGroup.java b/voip/java/com/android/server/sip/SipSessionGroup.java index bc377cf..37fffa8 100644 --- a/voip/java/com/android/server/sip/SipSessionGroup.java +++ b/voip/java/com/android/server/sip/SipSessionGroup.java @@ -480,7 +480,7 @@ class SipSessionGroup implements SipListener { public void run() { try { processCommand(command); - } catch (SipException e) { + } catch (Throwable e) { Log.w(TAG, "command error: " + command, e); onError(e); } @@ -1218,7 +1218,7 @@ class SipSessionGroup implements SipListener { private int getErrorCode(Throwable exception) { String message = exception.getMessage(); if (exception instanceof UnknownHostException) { - return SipErrorCode.INVALID_REMOTE_URI; + return SipErrorCode.SERVER_UNREACHABLE; } else if (exception instanceof IOException) { return SipErrorCode.SOCKET_ERROR; } else { -- cgit v1.1