am 096df819: Merge "SipService: send SERVER_ERROR if server doesn\'t provide nonce" into gingerbread

Merge commit '096df8197b9133703d2ed0abb69813db0c8b4129' into gingerbread-plus-aosp

* commit '096df8197b9133703d2ed0abb69813db0c8b4129':
  SipService: send SERVER_ERROR if server doesn't provide nonce
This commit is contained in:
Hung-ying Tyan
2010-09-15 07:42:38 -07:00
committed by Android Git Automerger

View File

@@ -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");