[evolution-patches] Re: Exchange connector - patch for #71878
- From: Sarfraaz Ahmed <asarfraaz novell com>
- To: Sushma Rai <rsushma novell com>
- Cc: "[evolution-patches]" <evolution-patches ximian com>
- Subject: [evolution-patches] Re: Exchange connector - patch for #71878
- Date: Thu, 10 Feb 2005 16:18:15 +0530
This looks fine except for some minor things in
e2k_autoconfig_get_global_catalog, and
e2k_autoconfig_check_global_catalog ... i guess just some extra spaces
there.
Add a Changelog and commit. :)
-- Sarfraaz
Sushma Rai wrote:
Hi,
Attached is the patch for automatically detecting
GC server. Please review the same.
-Sushma.
------------------------------------------------------------------------
Index: camel/camel-exchange-provider.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/camel/camel-exchange-provider.c,v
retrieving revision 1.13
diff -u -p -r1.13 camel-exchange-provider.c
--- camel/camel-exchange-provider.c 10 Feb 2005 05:39:03 -0000 1.13
+++ camel/camel-exchange-provider.c 10 Feb 2005 05:52:24 -0000
@@ -133,6 +133,8 @@ exchange_auto_detect_cb (CamelURL *url,
g_strdup (url->user));
g_hash_table_insert (*auto_detected, g_strdup ("pf_server"),
g_strdup (url->host));
+ g_hash_table_insert (*auto_detected, g_strdup ("ad_server"),
+ g_strdup (camel_url_get_param (url, "ad_server")));
return 0;
}
@@ -143,11 +145,13 @@ exchange_validate_user_cb (CamelURL *cam
{
gboolean valid;
char *host = NULL;
+ char *ad_server = NULL;
valid = e2k_validate_user (owa_url, camel_url->user,
- &host, remember_password);
+ &host, &ad_server, remember_password);
camel_url_set_host(camel_url, valid?host:NULL);
+ camel_url_set_param(camel_url, "ad_server", valid?ad_server:NULL);
g_free(host);
return valid;
Index: lib/e2k-autoconfig.c
===================================================================
RCS file: /cvs/gnome/evolution-exchange/lib/e2k-autoconfig.c,v
retrieving revision 1.8
diff -u -p -r1.8 e2k-autoconfig.c
--- lib/e2k-autoconfig.c 23 Jan 2005 09:39:52 -0000 1.8
+++ lib/e2k-autoconfig.c 10 Feb 2005 06:01:53 -0000
@@ -836,7 +836,7 @@ e2k_autoconfig_get_global_catalog (E2kAu
{
if (!ac->gc_server) {
find_global_catalog (ac);
- if (!ac->gc_server)
+ if (!ac->gc_server)
return NULL;
}
@@ -881,7 +881,7 @@ e2k_autoconfig_check_global_catalog (E2k
g_return_val_if_fail (ac->exchange_dn != NULL, E2K_AUTOCONFIG_FAILED);
gc = e2k_autoconfig_get_global_catalog (ac, op);
- if (!gc)
+ if (!gc)
return E2K_AUTOCONFIG_CANT_RESOLVE;
set_account_uri_string (ac);
@@ -1389,7 +1389,7 @@ e2k_autoconfig_lookup_option (const char
}
static gboolean
-validate (const char *owa_url, char *user, char *password, char **host)
+validate (const char *owa_url, char *user, char *password, char **host, char **ad_server)
{
E2kAutoconfig *ac;
E2kOperation op; /* FIXME */
@@ -1408,7 +1408,6 @@ validate (const char *owa_url, char *use
if (result == E2K_AUTOCONFIG_OK) {
result = e2k_autoconfig_check_global_catalog (ac, &op);
e2k_operation_free (&op);
- /* Need to fill GC server and return */
valid = TRUE;
}
else {
@@ -1506,12 +1505,15 @@ validate (const char *owa_url, char *use
}
*host = g_strdup (ac->pf_server);
+ if (ac->gc_server)
+ *ad_server = g_strdup (ac->gc_server);
+
return valid;
}
gboolean
-e2k_validate_user (const char *owa_url, char *user,
- char **host, gboolean *remember_password)
+e2k_validate_user (const char *owa_url, char *user, char **host,
+ char **ad_server, gboolean *remember_password)
{
gboolean valid = FALSE, remember=FALSE;
char *key, *password, *prompt;
@@ -1525,10 +1527,8 @@ e2k_validate_user (const char *owa_url,
E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET,
&remember, NULL);
if (password) {
- valid = validate (owa_url, user, password, host);
+ valid = validate (owa_url, user, password, host, ad_server);
if (valid) {
- //auto_detect_gc();
-
/* generate the proper key once the host name
* is read and remember password temporarily,
* so that at the end of * account creation,
Index: lib/e2k-validate.h
===================================================================
RCS file: /cvs/gnome/evolution-exchange/lib/e2k-validate.h,v
retrieving revision 1.3
diff -u -p -r1.3 e2k-validate.h
--- lib/e2k-validate.h 23 Jan 2005 09:39:52 -0000 1.3
+++ lib/e2k-validate.h 10 Feb 2005 06:02:56 -0000
@@ -9,7 +9,7 @@ extern "C" {
#pragma }
#endif /* __cplusplus */
-gboolean e2k_validate_user (const char *owa_url, char *user, char **host, gboolean *remember_password);
+gboolean e2k_validate_user (const char *owa_url, char *user, char **host, char **ad_server, gboolean *remember_password);
#ifdef __cplusplus
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]