diff options
| author | 2010-09-15 16:47:22 -0700 | |
|---|---|---|
| committer | 2010-09-15 16:47:22 -0700 | |
| commit | bb5fb60c7cb93bdd264ca5f94e3ac79cb2993e47 (patch) | |
| tree | 711363c495347c3310d195192378be502ee6eb93 | |
| parent | 6545fcfd9642860389619dd5c83f6e6bfd455e5b (diff) | |
| parent | 8d9e8de2c920e8c9dc2da33410780ec739076bb9 (diff) | |
am 8d9e8de2: am 096df819: Merge "SipService: send SERVER_ERROR if server doesn\'t provide nonce" into gingerbread
Merge commit '8d9e8de2c920e8c9dc2da33410780ec739076bb9'
* commit '8d9e8de2c920e8c9dc2da33410780ec739076bb9':
SipService: send SERVER_ERROR if server doesn't provide nonce
| -rw-r--r-- | services/java/com/android/server/sip/SipSessionGroup.java | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/services/java/com/android/server/sip/SipSessionGroup.java b/services/java/com/android/server/sip/SipSessionGroup.java index 06b6ec9397a5..3d002aaeaf72 100644 --- a/services/java/com/android/server/sip/SipSessionGroup.java +++ b/services/java/com/android/server/sip/SipSessionGroup.java @@ -712,9 +712,15 @@ class SipSessionGroup implements SipListener { case Response.UNAUTHORIZED: case Response.PROXY_AUTHENTICATION_REQUIRED: if (!handleAuthentication(event)) { - Log.v(TAG, "Incorrect username/password"); - onRegistrationFailed(SipErrorCode.INVALID_CREDENTIALS, - "incorrect username or password"); + if (mLastNonce == null) { + onRegistrationFailed(SipErrorCode.SERVER_ERROR, + "server does not provide challenge"); + } else { + Log.v(TAG, "Incorrect username/password"); + onRegistrationFailed( + SipErrorCode.INVALID_CREDENTIALS, + "incorrect username or password"); + } } return true; default: @@ -869,6 +875,9 @@ class SipSessionGroup implements SipListener { case Response.PROXY_AUTHENTICATION_REQUIRED: if (handleAuthentication(event)) { addSipSession(this); + } else if (mLastNonce == null) { + endCallOnError(SipErrorCode.SERVER_ERROR, + "server does not provide challenge"); } else { endCallOnError(SipErrorCode.INVALID_CREDENTIALS, "incorrect username or password"); |