summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@novell.com>2011-02-21 10:24:02 +0200
committerTor Lillqvist <tlillqvist@novell.com>2011-02-21 10:29:04 +0200
commit1b6acec4eb7cb00e4c84869fcd76debf9473c843 (patch)
tree49111e145f01b52575499ecf41ea30fa91936616
parent56b53f05754a1e996531363e5567c000f4979dc4 (diff)
Revert the desperate hacks, they did not help
-rw-r--r--patches/dev300/webdav-locking-after-mav58.diff79
1 files changed, 0 insertions, 79 deletions
diff --git a/patches/dev300/webdav-locking-after-mav58.diff b/patches/dev300/webdav-locking-after-mav58.diff
index 89dda8018..2f0c46119 100644
--- a/patches/dev300/webdav-locking-after-mav58.diff
+++ b/patches/dev300/webdav-locking-after-mav58.diff
@@ -25,85 +25,6 @@
}
--- ucb/source/ucp/webdav/NeonSession.cxx
+++ ucb/source/ucp/webdav/NeonSession.cxx
-@@ -251,6 +251,30 @@
- #endif
- }
-
-+typedef struct {
-+ rtl::OUString host;
-+ char *realm;
-+} HostAndRealm;
-+
-+typedef struct {
-+ char *name;
-+ char *password;
-+} NameAndPassword;
-+
-+struct hashHostAndRealm {
-+ size_t operator()( const HostAndRealm* p ) const
-+ {
-+ return (p->host.hashCode() ^ rtl_str_hashCode( p->realm ));
-+ }
-+};
-+
-+struct equalHostAndRealm {
-+ bool operator()( const HostAndRealm* p1, const HostAndRealm* p2 ) const
-+ {
-+ return (p1->host == p2->host) && (strcmp( p1->realm, p2->realm ) == 0);
-+ }
-+};
-+
- // -------------------------------------------------------------------
- extern "C" int NeonSession_NeonAuth( void * inUserData,
- #ifdef NE_FEATURE_SSPI
-@@ -272,6 +272,9 @@
- * cancel the request. (if non-zero, username and password are
- * ignored.) */
-
-+ typedef std::hash_map< HostAndRealm*, NameAndPassword*, hashHostAndRealm, equalHostAndRealm > SavedAuthMap;
-+ static SavedAuthMap *saved_auth_map = new SavedAuthMap;
-+
- NeonSession * theSession = static_cast< NeonSession * >( inUserData );
- DAVAuthListener * pListener
- = theSession->getRequestEnvironment().m_xAuthListener.get();
-@@ -388,6 +388,37 @@
- strcpy( inoutPassWord, // #100211# - checked
- rtl::OUStringToOString( thePassWord, RTL_TEXTENCODING_UTF8 ) );
-
-+ // Extremely ugly hack, but what the heck...
-+ HostAndRealm* key = new HostAndRealm;
-+ key->host = theSession->getHostName();
-+ key->realm = strdup( inRealm );
-+ SavedAuthMap::const_iterator it = saved_auth_map->find( key );
-+ if ( inoutUserName[0] == '\0' && inoutPassWord[0] == '\0' )
-+ {
-+ if ( it != saved_auth_map->end() )
-+ {
-+ strcpy( inoutUserName, (*it).second->name );
-+ strcpy( inoutPassWord, (*it).second->password );
-+ }
-+ free( key->realm );
-+ delete key;
-+ }
-+ else if ( inoutUserName[0] != '\0' )
-+ {
-+ if ( it == saved_auth_map->end() )
-+ {
-+ NameAndPassword* value = new NameAndPassword;
-+ value->name = strdup( inoutUserName );
-+ value->password = strdup( inoutPassWord );
-+ (*saved_auth_map)[ key ] = value;
-+ }
-+ else
-+ {
-+ free( key->realm );
-+ delete key;
-+ }
-+ }
-+
- return theRetVal;
- }
-
@@ -693,17 +693,17 @@
// #122205# - libxml2 needs to be initialized once if used by
// multithreaded programs like OOo.