~ubuntu-branches/ubuntu/saucy/evolution-data-server/saucy

« back to all changes in this revision

Viewing changes to camel/camel-provider.c

  • Committer: Package Import Robot
  • Author(s): Chris Coulson
  • Date: 2012-10-08 12:58:16 UTC
  • mfrom: (181.1.7 quantal)
  • Revision ID: package-import@ubuntu.com-20121008125816-i3n76e8c0m64e7xp
Tags: 3.6.0-0ubuntu2
* Fix LP: #1038047 part 1 - Don't abort in e_source_registry_new* when a
  problem occurs connecting to the Dbus service
  - add debian/patches/dont-abort-in-e_source_registry_new.patch
  - update debian/patches/series
* Fix LP: #1038047 part 2 - libedataserver depends on
  evolution-data-server-common to ensure that the GSettings schemas are
  present
  - update debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
119
119
 
120
120
        dir = g_dir_open (CAMEL_PROVIDERDIR, 0, NULL);
121
121
        if (!dir) {
122
 
                g_warning("Could not open camel provider directory (%s): %s",
123
 
                          CAMEL_PROVIDERDIR, g_strerror (errno));
 
122
                g_warning (
 
123
                        "Could not open camel provider directory (%s): %s",
 
124
                        CAMEL_PROVIDERDIR, g_strerror (errno));
124
125
                return;
125
126
        }
126
127
 
134
135
                name = g_strdup_printf ("%s/%s", CAMEL_PROVIDERDIR, entry);
135
136
                fp = g_fopen (name, "r");
136
137
                if (!fp) {
137
 
                        g_warning ("Could not read provider info file %s: %s",
138
 
                                   name, g_strerror (errno));
 
138
                        g_warning (
 
139
                                "Could not read provider info file %s: %s",
 
140
                                name, g_strerror (errno));
139
141
                        g_free (name);
140
142
                        continue;
141
143
                }
191
193
                g_set_error (
192
194
                        error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
193
195
                        _("Could not load %s: Module loading "
194
 
                          "not supported on this system."), path);
 
196
                        "not supported on this system."), path);
195
197
                return FALSE;
196
198
        }
197
199
 
209
211
                g_set_error (
210
212
                        error, CAMEL_ERROR, CAMEL_ERROR_GENERIC,
211
213
                        _("Could not load %s: No initialization "
212
 
                          "code in module."), path);
 
214
                        "code in module."), path);
213
215
                g_module_close (module);
214
216
                return FALSE;
215
217
        }
240
242
        LOCK ();
241
243
 
242
244
        if (g_hash_table_lookup (provider_table, provider->protocol) != NULL) {
243
 
                g_warning("Trying to re-register camel provider for protocol '%s'", provider->protocol);
 
245
                g_warning ("Trying to re-register camel provider for protocol '%s'", provider->protocol);
244
246
                UNLOCK ();
245
247
                return;
246
248
        }
337
339
                g_hash_table_foreach (module_table, add_to_list, &list);
338
340
                for (w = list; w; w = w->next) {
339
341
                        CamelProviderModule *m = w->data;
 
342
                        GError *error = NULL;
340
343
 
341
344
                        if (!m->loaded) {
342
 
                                camel_provider_load (m->path, NULL);
 
345
                                camel_provider_load (m->path, &error);
343
346
                                m->loaded = 1;
344
347
                        }
 
348
 
 
349
                        if (error != NULL) {
 
350
                                g_critical (
 
351
                                        "%s: %s", G_STRFUNC,
 
352
                                        error->message);
 
353
                                g_error_free (error);
 
354
                        }
345
355
                }
346
356
                g_list_free (list);
347
357
                list = NULL;