Commit 5706f6e6 5706f6e686fe0b902e44b066af4b1bd398bddd02 by Sam Roberts

mailbox_has_debug(): wasn't a way to see if a mailbox had one

1 parent 7071df45
...@@ -86,6 +86,7 @@ extern int mailbox_get_property __P ((mailbox_t, property_t *)); ...@@ -86,6 +86,7 @@ extern int mailbox_get_property __P ((mailbox_t, property_t *));
86 extern int mailbox_get_url __P ((mailbox_t, url_t *)); 86 extern int mailbox_get_url __P ((mailbox_t, url_t *));
87 87
88 /* For any debuging */ 88 /* For any debuging */
89 extern int mailbox_has_debug __P ((mailbox_t));
89 extern int mailbox_get_debug __P ((mailbox_t, mu_debug_t *)); 90 extern int mailbox_get_debug __P ((mailbox_t, mu_debug_t *));
90 extern int mailbox_set_debug __P ((mailbox_t, mu_debug_t)); 91 extern int mailbox_set_debug __P ((mailbox_t, mu_debug_t));
91 92
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
29 /* The Mailbox Factory. 29 /* The Mailbox Factory.
30 Create an iterator for registrar and see if any url scheme match, 30 Create an iterator for registrar and see if any url scheme match,
31 Then we call the mailbox's url_create() to parse the URL. Last 31 Then we call the mailbox's url_create() to parse the URL. Last
32 initiliaze the concrete mailbox and folder. */ 32 initialize the concrete mailbox and folder. */
33 int 33 int
34 mailbox_create (mailbox_t *pmbox, const char *name) 34 mailbox_create (mailbox_t *pmbox, const char *name)
35 { 35 {
...@@ -378,6 +378,15 @@ mailbox_get_property (mailbox_t mbox, property_t *pproperty) ...@@ -378,6 +378,15 @@ mailbox_get_property (mailbox_t mbox, property_t *pproperty)
378 } 378 }
379 379
380 int 380 int
381 mailbox_has_debug (mailbox_t mailbox)
382 {
383 if (mailbox == NULL)
384 return 0;
385
386 return mailbox->debug ? 1 : 0;
387 }
388
389 int
381 mailbox_set_debug (mailbox_t mbox, mu_debug_t debug) 390 mailbox_set_debug (mailbox_t mbox, mu_debug_t debug)
382 { 391 {
383 if (mbox == NULL) 392 if (mbox == NULL)
...@@ -385,6 +394,8 @@ mailbox_set_debug (mailbox_t mbox, mu_debug_t debug) ...@@ -385,6 +394,8 @@ mailbox_set_debug (mailbox_t mbox, mu_debug_t debug)
385 if (mbox->debug) 394 if (mbox->debug)
386 mu_debug_destroy (&mbox->debug, mbox); 395 mu_debug_destroy (&mbox->debug, mbox);
387 mbox->debug = debug; 396 mbox->debug = debug;
397 if(!folder_has_debug(mbox->folder))
398 folder_set_debug(mbox->folder, debug);
388 return 0; 399 return 0;
389 } 400 }
390 401
......