diff options
Diffstat (limited to 'mail/component-factory.c')
-rw-r--r-- | mail/component-factory.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/mail/component-factory.c b/mail/component-factory.c index 19c02d8a80..643878c89d 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -290,6 +290,7 @@ struct create_info_s { static void create_imap_storage (EvolutionShellComponent *shell_component) { + EvolutionShellClient *shell_client; Evolution_Shell corba_shell; EvolutionStorage *storage; char *cpath, *source, *server, *p; @@ -302,13 +303,14 @@ create_imap_storage (EvolutionShellComponent *shell_component) if (!source || strncasecmp (source, "imap://", 7)) return; - corba_shell = evolution_shell_component_get_owner (shell_component); - if (corba_shell == CORBA_OBJECT_NIL) { + shell_client = evolution_shell_component_get_owner (shell_component); + if (shell_client == NULL) { g_warning ("We have no shell!?"); - g_free (source); return; } + corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)); + if (!(server = strchr (source, '@'))) { g_free (source); return; @@ -415,6 +417,7 @@ real_create_imap_storage( gpointer user_data ) static void create_news_storage (EvolutionShellComponent *shell_component) { + EvolutionShellClient *shell_client; Evolution_Shell corba_shell; EvolutionStorage *storage; char *cpath, *source, *server, *p; @@ -427,13 +430,14 @@ create_news_storage (EvolutionShellComponent *shell_component) if (!source || strncasecmp (source, "news://", 7)) return; - corba_shell = evolution_shell_component_get_owner (shell_component); - if (corba_shell == CORBA_OBJECT_NIL) { + shell_client = evolution_shell_component_get_owner (shell_component); + if (shell_client == NULL) { g_warning ("We have no shell!?"); - g_free (source); return; } + corba_shell = bonobo_object_corba_objref (BONOBO_OBJECT (shell_client)); + server = source + 7; for (p = server; *p && *p != '/'; p++); |