[evolution-patches] Exchange connector - Fix for evolution crash
- From: Sushma Rai <rsushma novell com>
- To: Evolution patches List <evolution-patches gnome org>
- Subject: [evolution-patches] Exchange connector - Fix for evolution crash
- Date: Thu, 24 Nov 2005 16:34:13 +0530
Hi,
This patch fixes a crash because of uninitialized error value.
Also fixes the wrong OOF message display in case of authentication
failure and some compile time warings.
I have also attached the gdb stack traces for the crash.
Please review,
Thanks,
Sushma.
Index: evolution-data-server/servers/exchange/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/exchange/ChangeLog,v
retrieving revision 1.35
diff -u -p -r1.35 ChangeLog
--- evolution-data-server/servers/exchange/ChangeLog 21 Oct 2005 10:36:59 -0000 1.35
+++ evolution-data-server/servers/exchange/ChangeLog 24 Nov 2005 10:44:32 -0000
@@ -1,3 +1,10 @@
+2005-11-24 Sushma Rai <rsushma novell com>
+
+ * storage/exchange-account.c (exchange_account_remove_folder)
+ (get_password)(exchange_account_connect): Fix for compile time warnings.
+ (exchange_account_connect): Initialize the return value, info_result
+ before cheking the validity of ExchangeAccount. Fixes a crash.
+
2005-10-21 Sarfraaz Ahmed <asarfraaz novell com>
* storage/exchange-account.c (exchange_account_remove_folder) : Proceed
Index: evolution-data-server/servers/exchange/storage/exchange-account.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/servers/exchange/storage/exchange-account.c,v
retrieving revision 1.19
diff -u -p -r1.19 exchange-account.c
--- evolution-data-server/servers/exchange/storage/exchange-account.c 21 Oct 2005 10:36:59 -0000 1.19
+++ evolution-data-server/servers/exchange/storage/exchange-account.c 24 Nov 2005 10:45:18 -0000
@@ -540,7 +540,7 @@ exchange_account_remove_folder (Exchange
int_uri = e_folder_exchange_get_internal_uri (folder);
if (g_hash_table_find (account->priv->standard_uris,
- check_if_sf, int_uri)) {
+ check_if_sf, (char *)int_uri)) {
return EXCHANGE_ACCOUNT_FOLDER_UNSUPPORTED_OPERATION;
}
@@ -924,16 +924,15 @@ static gboolean
get_password (ExchangeAccount *account, E2kAutoconfig *ac, ExchangeAccountResult error)
{
char *password;
- gboolean remember, oldremember;
if (error != EXCHANGE_ACCOUNT_CONNECT_SUCCESS)
e_passwords_forget_password ("Exchange", account->priv->password_key);
password = e_passwords_get_password ("Exchange", account->priv->password_key);
-
+#if 0
// SURF : if (exchange_component_is_interactive (global_exchange_component)) {
+ gboolean remember, oldremember;
if (!password) {
- /*
char *prompt;
prompt = g_strdup_printf (_("Enter password for %s"),
@@ -952,7 +951,6 @@ get_password (ExchangeAccount *account,
account->priv->account->source->save_passwd = remember;
}
g_free (prompt);
- */
}
else if (!account->priv->account->source->save_passwd) {
/* get_password returns the password cached but user has not
@@ -961,7 +959,17 @@ get_password (ExchangeAccount *account,
*/
e_passwords_forget_password ("Exchange", account->priv->password_key);
}
- // SURF : }
+ }
+#endif
+ if (!password) {
+ }
+ else if (!account->priv->account->source->save_passwd) {
+ /* get_password returns the password cached but user has not
+ * selected remember password option, forget this password
+ * whis is stored temporarily by e2k_validate_user()
+ */
+ e_passwords_forget_password ("Exchange", account->priv->password_key);
+ }
if (password) {
e2k_autoconfig_set_password (ac, password);
@@ -1413,13 +1421,13 @@ exchange_account_connect (ExchangeAccoun
int nresults;
GByteArray *entryid;
const char *timezone;
- char *old_password, *new_password;
E2kGlobalCatalogStatus gcstatus;
E2kGlobalCatalogEntry *entry;
E2kOperation gcop;
char *user_name = NULL;
int offline;
+ *info_result = EXCHANGE_ACCOUNT_UNKNOWN_ERROR;
g_return_val_if_fail (EXCHANGE_IS_ACCOUNT (account), NULL);
*info_result = EXCHANGE_ACCOUNT_CONNECT_SUCCESS;
@@ -1488,6 +1496,7 @@ exchange_account_connect (ExchangeAccoun
g_mutex_unlock (account->priv->connect_lock);
return NULL;
/*
+ char *old_password, *new_password;
old_password = exchange_account_get_password (account);
//new_password = exchange_get_new_password (old_password, 0);
@@ -1705,7 +1714,7 @@ E2kContext *
exchange_account_get_context (ExchangeAccount *account)
{
g_return_val_if_fail (EXCHANGE_IS_ACCOUNT (account), NULL);
-
+
return account->priv->ctx;
}
Index: evolution/plugins/exchange-operations/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/ChangeLog,v
retrieving revision 1.60
diff -u -p -r1.60 ChangeLog
--- evolution/plugins/exchange-operations/ChangeLog 24 Nov 2005 10:03:51 -0000 1.60
+++ evolution/plugins/exchange-operations/ChangeLog 24 Nov 2005 10:46:33 -0000
@@ -4,6 +4,7 @@
OOF state and check for the OOF state and message only of the account
is valid. Fixes the problem of printing OOF error message in case
of authentication failure.
+ (set_oof_info): Similar.
2005-10-03 Shakti Sen <shprasad novell com>
Index: evolution/plugins/exchange-operations/exchange-account-setup.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/exchange-account-setup.c,v
retrieving revision 1.22
diff -u -p -r1.22 exchange-account-setup.c
--- evolution/plugins/exchange-operations/exchange-account-setup.c 24 Nov 2005 10:03:52 -0000 1.22
+++ evolution/plugins/exchange-operations/exchange-account-setup.c 24 Nov 2005 10:46:53 -0000
@@ -692,11 +692,10 @@ set_oof_info ()
account = exchange_operations_get_exchange_account ();
- if (!exchange_oof_set (account, oof_data->state, oof_data->message)) {
+ if (account && !exchange_oof_set (account, oof_data->state, oof_data->message)) {
e_error_run (NULL, ERROR_DOMAIN ":state-update-error", NULL);
}
-
}
static void
/* enable diabled account, chaging the URL and GC server */
/* password asked twice and in 2nd input Evolution crashed */
Error message on console:
(evolution-2.6:30423): evolution-exchange-storage-CRITICAL **: exchange_account_connect: assertion `EXCHANGE_IS_ACCOUNT (account)' failed
GDB traces:
(gdb) bt
#0 0xffffe410 in ?? ()
#1 0xbfffd5c4 in ?? ()
#2 0x00000000 in ?? ()
#3 0xbfffd4f8 in ?? ()
#4 0x4123d2eb in __waitpid_nocancel () from /lib/tls/libpthread.so.0
#5 0x407147d8 in gnome_init_with_popt_table () from /opt/gnome/lib/libgnomeui-2.so.0
#6 0x0805f391 in segv_redirect (sig=11) at main.c:424
#7 <signal handler called>
#8 0x417355cf in exchange_operations_report_error (account=0x81c76c8, result=136078000) at exchange-operations.c:230
#9 0x4173554c in exchange_operations_get_exchange_account () at exchange-operations.c:208
#10 0x4173ef5d in set_oof_info () at exchange-account-setup.c:693
#11 0x4173f08f in org_gnome_exchange_commit (epl=0x81a2e10, data=0x906a100) at exchange-account-setup.c:733
#12 0x401e2658 in epl_invoke (ep=0x81a2e10, name=0x81d92b8 "org_gnome_exchange_commit", data=0x906a100) at e-plugin.c:846
#13 0x401e223d in e_plugin_invoke (ep=0x81a2e10, name=0x81d92b8 "org_gnome_exchange_commit", data=0x906a100) at e-plugin.c:634
#14 0x401d4513 in ech_commit (ec=0x9069db0, items=0x80d7040, data=0x81d8bc8) at e-config.c:1274
#15 0x401d40c8 in e_config_commit (ec=0x9069db0) at e-config.c:1025
#16 0x401d3cf6 in ec_dialog_response (d=0x908c128, id=-5, ec=0x9069db0) at e-config.c:868
#17 0x4137f5f3 in g_cclosure_marshal_VOID () from /opt/gnome/lib/libgobject-2.0.so.0
#18 0x413728db in g_closure_invoke () from /opt/gnome/lib/libgobject-2.0.so.0
#19 0x41381d8b in g_signal_chain_from_overridden () from /opt/gnome/lib/libgobject-2.0.so.0
#20 0x4138313b in g_signal_emit_valist () from /opt/gnome/lib/libgobject-2.0.so.0
#21 0x41383626 in g_signal_emit () from /opt/gnome/lib/libgobject-2.0.so.0
#22 0x40ef4118 in gtk_dialog_response () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#23 0x40ef4908 in gtk_dialog_add_buttons () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#24 0x4137f8a6 in g_cclosure_marshal_VOID__VOID () from /opt/gnome/lib/libgobject-2.0.so.0
#25 0x413728db in g_closure_invoke () from /opt/gnome/lib/libgobject-2.0.so.0
#26 0x41381d8b in g_signal_chain_from_overridden () from /opt/gnome/lib/libgobject-2.0.so.0
#27 0x4138313b in g_signal_emit_valist () from /opt/gnome/lib/libgobject-2.0.so.0
#28 0x41383626 in g_signal_emit () from /opt/gnome/lib/libgobject-2.0.so.0
#29 0x40ea80b5 in gtk_button_clicked () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#30 0x40ea916c in gtk_button_new () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#31 0x4137f8a6 in g_cclosure_marshal_VOID__VOID () from /opt/gnome/lib/libgobject-2.0.so.0
#32 0x41372279 in g_closure_ref () from /opt/gnome/lib/libgobject-2.0.so.0
#33 0x413728db in g_closure_invoke () from /opt/gnome/lib/libgobject-2.0.so.0
#34 0x41381ba8 in g_signal_chain_from_overridden () from /opt/gnome/lib/libgobject-2.0.so.0
#35 0x4138313b in g_signal_emit_valist () from /opt/gnome/lib/libgobject-2.0.so.0
#36 0x41383626 in g_signal_emit () from /opt/gnome/lib/libgobject-2.0.so.0
#37 0x40ea8145 in gtk_button_released () from /opt/gnome/lib/libgtk-x11-2.0.so.0
---Type <return> to continue, or q <return> to quit---
#38 0x40ea81a1 in gtk_button_released () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#39 0x40f7181e in gtk_marshal_BOOLEAN__VOID () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#40 0x41372279 in g_closure_ref () from /opt/gnome/lib/libgobject-2.0.so.0
#41 0x413728db in g_closure_invoke () from /opt/gnome/lib/libgobject-2.0.so.0
#42 0x41382179 in g_signal_chain_from_overridden () from /opt/gnome/lib/libgobject-2.0.so.0
#43 0x41382ff2 in g_signal_emit_valist () from /opt/gnome/lib/libgobject-2.0.so.0
#44 0x41383626 in g_signal_emit () from /opt/gnome/lib/libgobject-2.0.so.0
#45 0x41058f14 in gtk_widget_get_default_style () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#46 0x40f6b2f9 in gtk_propagate_event () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#47 0x40f6c74f in gtk_main_do_event () from /opt/gnome/lib/libgtk-x11-2.0.so.0
#48 0x41292ed2 in gdk_add_client_message_filter () from /opt/gnome/lib/libgdk-x11-2.0.so.0
#49 0x413cb967 in g_main_context_dispatch () from /opt/gnome/lib/libglib-2.0.so.0
#50 0x413cdce2 in g_main_context_acquire () from /opt/gnome/lib/libglib-2.0.so.0
#51 0x413cecf7 in g_main_loop_run () from /opt/gnome/lib/libglib-2.0.so.0
#52 0x40bf3cf0 in bonobo_main () from /opt/gnome/lib/libbonobo-2.so.0
#53 0x0805f9db in main (argc=1, argv=0xbfffeec4) at main.c:602
(gdb) up 8
#8 0x417355cf in exchange_operations_report_error (account=0x81c76c8, result=136078000) at exchange-operations.c:230
230 error_string = g_strconcat ("org-gnome-exchange-operations:", error_ids[result], NULL);
(gdb) p result
$1 = 136078000
(gdb)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]