Re: [Evolution-hackers] EDS: Trying to implement expunge function in camel-spool-folder.c

On Sun, 2007-06-24 at 23:24 +0100, Seb James wrote:
> All I'm trying to do to start with is get a message to print out on
> stdout. In the function camel_spool_folder_class_init() I create a
> CamelFolderClass pointer to the CamelSpoolFolderClass passed in, so that
> I can then replace the expunge function pointer in that
> class/structure. 
> When I run evolution, and try to expunge the spool based inbox by
> right-clicking on the Trash folder and selecting "Empty
> Wastebasket" (that might read "Empty Trash" for a US locale), then a
> debugging message that I placed in camel-folder.c tells me this:
> camel-folder.c(562): camel_folder_expunge called for folder->name
> 'Trash', with parent_store->parent_service name 'Local mail
> file /home/seb/.evolution/mail/local/', path
> 'mbox/home/seb/.evolution/mail/local'
> What this is saying is that eds is not trying to call the
> CamelSpoolFolderClass version of expunge, instead it is calling the
> expunge which relates to the local mail file mentioned. This means that
> eds then goes on to call camel_folder_sync for all the local folders,
> instead of calling the CamelSpoolFolderClass implementation of expunge.
> Can anyone tell me how to get the CamelLocalFolder/CamelSpoolFolder
> expunge to be called? How come the trash icon that gets placed next to
> my spool INBOX doesn't cause a spool based expunge to be called?

from your description, it sounds like you tried to Empty the "Local
Folders" Trash folder instead of the Trash folder attached to your

You should also note that since the Trash folder is a virtual folder,
unless both of the following conditions are met, you might not get an
expunge call on the spool folder:

1. you have opened the spool folder (at one point, not sure if it is
still true, vTrash folders, for performance reasons, would not 'notice'
physical folders until they had been opened)

2. the spool folder has messages marked for deletion (vTrash might have
logic to skip folders that contain no deleted messages when calling
expunge on all their source folders)

It might be better to invoke "Expunge Folder" on the physical spool
folder itself while debugging this as there is a lot less indirection.

> I'm also having trouble debugging eds using gdb and the edsdebug script
> that I got from the evolution website. If I try to break on
> camel_folder_sync, gdb tells me it doesn't know where it is...
> (gdb) b camel_folder_expunge
> Function "camel_folder_expunge" not defined.
> Make breakpoint pending on future shared library load? (y or [n])
> But some camel functions are available:
> (gdb) b camel_f[TAB]
> camel_file_util_decode_fixed_int32  camel_file_util_decode_uint32 [snip
> rest of camel_file_ functions]
> Can anyone tell me what I'm doing wrong here?

you don't want to be gdbing e-d-s, e-d-s barely uses camel at all - just
uses a few functions (perhaps that's why those are defined and the
others not). e-d-s is a daemon process that serves up calendar and
addressbook data, it doesn't serve up mail.

You want to gdb evolution itself.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]