Merge "SipService: send SERVER_ERROR if server doesn't provide nonce" into gingerbread
This commit is contained in:
committed by
Android (Google) Code Review
commit
096df8197b
@@ -712,10 +712,16 @@ class SipSessionGroup implements SipListener {
|
|||||||
case Response.UNAUTHORIZED:
|
case Response.UNAUTHORIZED:
|
||||||
case Response.PROXY_AUTHENTICATION_REQUIRED:
|
case Response.PROXY_AUTHENTICATION_REQUIRED:
|
||||||
if (!handleAuthentication(event)) {
|
if (!handleAuthentication(event)) {
|
||||||
|
if (mLastNonce == null) {
|
||||||
|
onRegistrationFailed(SipErrorCode.SERVER_ERROR,
|
||||||
|
"server does not provide challenge");
|
||||||
|
} else {
|
||||||
Log.v(TAG, "Incorrect username/password");
|
Log.v(TAG, "Incorrect username/password");
|
||||||
onRegistrationFailed(SipErrorCode.INVALID_CREDENTIALS,
|
onRegistrationFailed(
|
||||||
|
SipErrorCode.INVALID_CREDENTIALS,
|
||||||
"incorrect username or password");
|
"incorrect username or password");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
if (statusCode >= 500) {
|
if (statusCode >= 500) {
|
||||||
@@ -869,6 +875,9 @@ class SipSessionGroup implements SipListener {
|
|||||||
case Response.PROXY_AUTHENTICATION_REQUIRED:
|
case Response.PROXY_AUTHENTICATION_REQUIRED:
|
||||||
if (handleAuthentication(event)) {
|
if (handleAuthentication(event)) {
|
||||||
addSipSession(this);
|
addSipSession(this);
|
||||||
|
} else if (mLastNonce == null) {
|
||||||
|
endCallOnError(SipErrorCode.SERVER_ERROR,
|
||||||
|
"server does not provide challenge");
|
||||||
} else {
|
} else {
|
||||||
endCallOnError(SipErrorCode.INVALID_CREDENTIALS,
|
endCallOnError(SipErrorCode.INVALID_CREDENTIALS,
|
||||||
"incorrect username or password");
|
"incorrect username or password");
|
||||||
|
|||||||
Reference in New Issue
Block a user