Commit d6fe5988 d6fe5988a6c5235b6f77195ca1bab689fd77899c by Sam Roberts

mailbox created the folder, it should set it's folder's debug object when

it's is set, otherwise there is now way to get debug messages from a
mailboxes folder (I was getting all the pop protocol traces but not
the imap ones)
1 parent e0878e4e
...@@ -454,8 +454,16 @@ mailbox_get_property (mailbox_t mbox, property_t *pproperty) ...@@ -454,8 +454,16 @@ mailbox_get_property (mailbox_t mbox, property_t *pproperty)
454 int 454 int
455 mailbox_set_debug (mailbox_t mbox, mu_debug_t debug) 455 mailbox_set_debug (mailbox_t mbox, mu_debug_t debug)
456 { 456 {
457 int status = 0;
458
457 if (mbox == NULL) 459 if (mbox == NULL)
458 return EINVAL; 460 return EINVAL;
461 if (mbox->folder)
462 {
463 status = folder_set_debug (mbox->folder, debug);
464 if (status)
465 return status;
466 }
459 if (mbox->debug) 467 if (mbox->debug)
460 mu_debug_destroy (&(mbox->debug), mbox); 468 mu_debug_destroy (&(mbox->debug), mbox);
461 mbox->debug = debug; 469 mbox->debug = debug;
......