| | 351 | |
|---|
| | 352 | |
|---|
| | 353 | static void |
|---|
| | 354 | camel_pop3_store_destroy_lists_nl (CamelPOP3Store *pop3_store) |
|---|
| | 355 | { |
|---|
| | 356 | |
|---|
| | 357 | if (pop3_store->uids != NULL) |
|---|
| | 358 | { |
|---|
| | 359 | CamelPOP3FolderInfo **fi = (CamelPOP3FolderInfo **) pop3_store->uids->pdata; |
|---|
| | 360 | int i; |
|---|
| | 361 | |
|---|
| | 362 | for (i=0;i<pop3_store->uids->len;i++,fi++) { |
|---|
| | 363 | if (fi[0]->cmd) { |
|---|
| | 364 | |
|---|
| | 365 | if (pop3_store->engine == NULL) { |
|---|
| | 366 | g_ptr_array_free(pop3_store->uids, TRUE); |
|---|
| | 367 | g_hash_table_destroy(pop3_store->uids_uid); |
|---|
| | 368 | g_free(fi[0]->uid); |
|---|
| | 369 | g_free(fi[0]); |
|---|
| | 370 | return; |
|---|
| | 371 | } |
|---|
| | 372 | |
|---|
| | 373 | while (camel_pop3_engine_iterate(pop3_store->engine, fi[0]->cmd) > 0) |
|---|
| | 374 | ; |
|---|
| | 375 | camel_pop3_engine_command_free(pop3_store->engine, fi[0]->cmd); |
|---|
| | 376 | fi[0]->cmd = NULL; |
|---|
| | 377 | } |
|---|
| | 378 | |
|---|
| | 379 | g_free(fi[0]->uid); |
|---|
| | 380 | g_free(fi[0]); |
|---|
| | 381 | } |
|---|
| | 382 | |
|---|
| | 383 | kill_lists (pop3_store); |
|---|
| | 384 | |
|---|
| | 385 | pop3_store->uids = g_ptr_array_new (); |
|---|
| | 386 | pop3_store->uids_uid = g_hash_table_new(g_str_hash, g_str_equal); |
|---|
| | 387 | pop3_store->uids_id = g_hash_table_new(NULL, NULL); |
|---|
| | 388 | |
|---|
| | 389 | } |
|---|
| | 390 | } |
|---|
| | 391 | |
|---|