User: kz      
Date: 2006/12/13 08:20:20

Modified:
   dba/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx

Log:
 INTEGRATION: CWS dba22ui (1.14.20); FILE MERGED
 2006/12/05 12:48:39 fs 1.14.20.3: #i10000#
 2006/12/04 11:19:13 fs 1.14.20.2: properly recognize invalid LDAP connections 
/ #i71773# STR_COULD_NOT_CONNECT_LDAP
 2006/10/25 10:15:46 fs 1.14.20.1: during #i62664#: new .hrc

File Changes:

Directory: /dba/connectivity/source/drivers/mozab/mozillasrc/
=============================================================

File [changed]: MDatabaseMetaDataHelper.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx?r1=1.14&r2=1.15
Delta lines:  +19 -17
---------------------
--- MDatabaseMetaDataHelper.cxx 17 Sep 2006 03:01:11 -0000      1.14
+++ MDatabaseMetaDataHelper.cxx 13 Dec 2006 16:20:17 -0000      1.15
@@ -39,9 +39,8 @@
 // Mozilla includes.
 #include <MNSInclude.hxx>
 
-#ifndef CONNECTIVITY_SHARED_RES_HRC
-#include "conn_shared_res.hrc"
-#endif
+#include "resource/mozab_res.hrc"
+
 #ifndef _CONNECTIVITY_MAB_DATABASEMETADATAHELPER_HXX_
 #include "MDatabaseMetaDataHelper.hxx"
 #endif
@@ -735,25 +734,28 @@
        args.arg4 = (void*)&useSSL;
 
        MNSMozabProxy xMProxy;
-       if (xMProxy.StartProxy(&args,m_ProductType,::rtl::OUString()))  //Init 
LDAP,pass OUString() to StarProxy to ignore profile switch
+    rv = xMProxy.StartProxy( &args, m_ProductType, ::rtl::OUString() );
+       if ( NS_SUCCEEDED( rv ) )   //Init LDAP,pass OUString() to StarProxy to 
ignore profile switch
        {
                args.funcIndex = ProxiedFunc::FUNC_TESTLDAP_IS_LDAP_CONNECTED;
-           TimeValue               timeValue = { 1, 0 };  // 1 * 60 Seconds 
timeout
+           TimeValue               timeValue = { 1, 0 };  // 1 * 30 Seconds 
timeout
                sal_Int32                               times=0;
-               while( times < 60 )
-               {
-                       rv = 
xMProxy.StartProxy(&args,m_ProductType,::rtl::OUString()); //check whether ldap 
is connect
-                       if (!rv )
+               while ( times++ < 30 )
                        {
-                               osl_waitThread(&timeValue);
-                               times++;
-                       }
-                       else
+                       rv = xMProxy.StartProxy( &args, m_ProductType, 
::rtl::OUString() );
+                       if ( NS_SUCCEEDED( rv ) )
+                // connected successfully
                                break;
+
+            if ( rv == (nsresult)PR_NOT_CONNECTED_ERROR )
+                // connection failed
+                break;
+
+                       // not yet decided - continue waiting
+                       osl_waitThread( &timeValue );
                }
-               args.funcIndex = ProxiedFunc::FUNC_TESTLDAP_IS_LDAP_CONNECTED;
-               rv = xMProxy.StartProxy(&args,m_ProductType,::rtl::OUString()); 
//release resource
        }
+    setError( STR_COULD_NOT_CONNECT_LDAP );
     return NS_SUCCEEDED( rv );
 }
 




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to