summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/rtsp/ARTSPConnection.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-10-25 09:40:52 -0700
committerAndreas Huber <andih@google.com>2010-10-25 12:48:00 -0700
commitc21143636f2c6078c8ad6b096f69a9208591342b (patch)
tree8687c04e36c497e2bc8b09d511270101b27b58cd /media/libstagefright/rtsp/ARTSPConnection.cpp
parente09591eff55fdff1868b32c3e046c62f800330fc (diff)
downloadframeworks_av-c21143636f2c6078c8ad6b096f69a9208591342b.zip
frameworks_av-c21143636f2c6078c8ad6b096f69a9208591342b.tar.gz
frameworks_av-c21143636f2c6078c8ad6b096f69a9208591342b.tar.bz2
We don't have access to the md5 implementation on the simulator, let's disable digest authentication in rtsp for simulator targets.
Change-Id: I02a9b4af929601c899f04cee9864d0dd0716de62
Diffstat (limited to 'media/libstagefright/rtsp/ARTSPConnection.cpp')
-rw-r--r--media/libstagefright/rtsp/ARTSPConnection.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/media/libstagefright/rtsp/ARTSPConnection.cpp b/media/libstagefright/rtsp/ARTSPConnection.cpp
index 824fb65..e936923 100644
--- a/media/libstagefright/rtsp/ARTSPConnection.cpp
+++ b/media/libstagefright/rtsp/ARTSPConnection.cpp
@@ -761,6 +761,12 @@ bool ARTSPConnection::parseAuthMethod(const sp<ARTSPResponse> &response) {
if (!strncmp(value.c_str(), "Basic", 5)) {
mAuthType = BASIC;
} else {
+#if !defined(HAVE_ANDROID_OS)
+ // We don't have access to the MD5 implementation on the simulator,
+ // so we won't support digest authentication.
+ return false;
+#endif
+
CHECK(!strncmp(value.c_str(), "Digest", 6));
mAuthType = DIGEST;
@@ -776,6 +782,7 @@ bool ARTSPConnection::parseAuthMethod(const sp<ARTSPResponse> &response) {
return true;
}
+#if defined(HAVE_ANDROID_OS)
static void H(const AString &s, AString *out) {
out->clear();
@@ -804,6 +811,7 @@ static void H(const AString &s, AString *out) {
out->append(&nibble, 1);
}
}
+#endif
static void GetMethodAndURL(
const AString &request, AString *method, AString *url) {
@@ -845,6 +853,7 @@ void ARTSPConnection::addAuthentication(AString *request) {
return;
}
+#if defined(HAVE_ANDROID_OS)
CHECK_EQ((int)mAuthType, (int)DIGEST);
AString method, url;
@@ -893,6 +902,7 @@ void ARTSPConnection::addAuthentication(AString *request) {
fragment.append("\r\n");
request->insert(fragment, i + 2);
+#endif
}
} // namespace android