summaryrefslogtreecommitdiffabout
path: root/kmicromail/libetpan/generic/mailstorage.c
Unidiff
Diffstat (limited to 'kmicromail/libetpan/generic/mailstorage.c') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libetpan/generic/mailstorage.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/kmicromail/libetpan/generic/mailstorage.c b/kmicromail/libetpan/generic/mailstorage.c
index 25e561e..dc91744 100644
--- a/kmicromail/libetpan/generic/mailstorage.c
+++ b/kmicromail/libetpan/generic/mailstorage.c
@@ -302,33 +302,40 @@ int mailstorage_connect(struct mailstorage * storage)
302} 302}
303 303
304 304
305void mailstorage_disconnect(struct mailstorage * storage) 305void mailstorage_disconnect(struct mailstorage * storage)
306{ 306{
307 int r; 307 int r;
308 clistiter * cur; 308 clistiter * cur;
309 309
310 while ((cur = clist_begin(storage->sto_shared_folders)) != NULL) { 310 while ((cur = clist_begin(storage->sto_shared_folders)) != NULL) {
311 struct mailfolder * folder; 311 struct mailfolder * folder;
312 312
313 folder = cur->data; 313 folder = cur->data;
314 mailfolder_disconnect(folder); 314 mailfolder_disconnect(folder);
315 } 315 }
316 316
317 if (storage->sto_session == NULL) 317 if (storage->sto_session == NULL)
318 return; 318 return;
319 319
320 r = mailsession_logout(storage->sto_session); 320 r = mailsession_logout(storage->sto_session);
321 321
322 mailsession_free(storage->sto_session); 322 mailsession_free(storage->sto_session);
323 storage->sto_session = NULL; 323 storage->sto_session = NULL;
324} 324}
325 325
326
327int mailstorage_noop(struct mailstorage * storage)
328{
329 return mailsession_noop(storage->sto_session);
330}
331
332
326static int mailstorage_get_folder(struct mailstorage * storage, 333static int mailstorage_get_folder(struct mailstorage * storage,
327 char * pathname, mailsession ** result) 334 char * pathname, mailsession ** result)
328{ 335{
329 if (storage->sto_driver->sto_get_folder_session == NULL) 336 if (storage->sto_driver->sto_get_folder_session == NULL)
330 return MAIL_ERROR_NOT_IMPLEMENTED; 337 return MAIL_ERROR_NOT_IMPLEMENTED;
331 338
332 return storage->sto_driver->sto_get_folder_session(storage, 339 return storage->sto_driver->sto_get_folder_session(storage,
333 pathname, result); 340 pathname, result);
334} 341}