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

« back to all changes in this revision

Viewing changes to camel/camel-sasl-popb4smtp.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:
85
85
                "popb4smtp_uid", 0, error);
86
86
 
87
87
        if (pop_uid != NULL)
88
 
                service = camel_session_get_service (session, pop_uid);
 
88
                service = camel_session_ref_service (session, pop_uid);
89
89
        else
90
90
                service = NULL;
91
91
 
94
94
                        error, CAMEL_SERVICE_ERROR,
95
95
                        CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
96
96
                        _("POP Before SMTP authentication "
97
 
                          "using an unknown transport"));
 
97
                        "using an unknown transport"));
98
98
                g_free (pop_uid);
99
99
                return NULL;
100
100
        }
106
106
                        error, CAMEL_SERVICE_ERROR,
107
107
                        CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
108
108
                        _("POP Before SMTP authentication attempted "
109
 
                          "with a %s service"), type_name);
110
 
                g_free (pop_uid);
111
 
                return NULL;
 
109
                        "with a %s service"), type_name);
 
110
                goto exit;
112
111
        }
113
112
 
114
113
        if (strstr (type_name, "POP") == NULL) {
116
115
                        error, CAMEL_SERVICE_ERROR,
117
116
                        CAMEL_SERVICE_ERROR_CANT_AUTHENTICATE,
118
117
                        _("POP Before SMTP authentication attempted "
119
 
                          "with a %s service"), type_name);
120
 
                g_free (pop_uid);
121
 
                return NULL;
 
118
                        "with a %s service"), type_name);
 
119
                goto exit;
122
120
        }
123
121
 
124
122
        /* check if we've done it before recently in this session */
127
125
        /* need to lock around the whole thing until finished with timep */
128
126
 
129
127
        POPB4SMTP_LOCK (lock);
 
128
 
130
129
        timep = g_hash_table_lookup (poplast, pop_uid);
131
130
        if (timep) {
132
131
                if ((*timep + POPB4SMTP_TIMEOUT) > now) {
133
132
                        camel_sasl_set_authenticated (sasl, TRUE);
134
133
                        POPB4SMTP_UNLOCK (lock);
135
 
                        g_free (pop_uid);
136
 
                        return NULL;
 
134
                        goto exit;
137
135
                }
138
136
        } else {
139
137
                timep = g_malloc0 (sizeof (*timep));
151
149
 
152
150
        POPB4SMTP_UNLOCK (lock);
153
151
 
 
152
exit:
 
153
        g_object_unref (service);
154
154
        g_free (pop_uid);
155
155
 
156
156
        return NULL;