aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-service.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-service.c')
-rw-r--r--camel/camel-service.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/camel/camel-service.c b/camel/camel-service.c
index cc254e1f2d..fed8945008 100644
--- a/camel/camel-service.c
+++ b/camel/camel-service.c
@@ -247,9 +247,10 @@ camel_service_connect (CamelService *service, CamelException *ex)
*/
CAMEL_SERVICE_LOCK (service, connect_op_lock);
service->connect_op = camel_operation_registered ();
- if (!service->connect_op)
+ if (!service->connect_op) {
service->connect_op = camel_operation_new (NULL, NULL);
- camel_operation_register (service->connect_op);
+ camel_operation_register (service->connect_op);
+ }
CAMEL_SERVICE_UNLOCK (service, connect_op_lock);
service->status = CAMEL_SERVICE_CONNECTING;
@@ -301,9 +302,10 @@ camel_service_disconnect (CamelService *service, gboolean clean,
if (service->status == CAMEL_SERVICE_CONNECTED) {
CAMEL_SERVICE_LOCK (service, connect_op_lock);
service->connect_op = camel_operation_registered ();
- if (!service->connect_op)
+ if (!service->connect_op) {
service->connect_op = camel_operation_new (NULL, NULL);
- camel_operation_register (service->connect_op);
+ camel_operation_register (service->connect_op);
+ }
CAMEL_SERVICE_UNLOCK (service, connect_op_lock);
service->status = CAMEL_SERVICE_DISCONNECTING;