Re: [Tracker] [tracker-indexer] Wrong UID with MAP mails



Hi Laurent!

On lun, 2008-09-22 at 01:33 +0200, Laurent Aguerreche wrote:
Hello,

Le jeudi 18 septembre 2008 Ã 09:34 +0100, Martyn Russell a Ãcrit :
Laurent Aguerreche wrote:
Hello,

in tracker-indexer.log, I only see "(null)" as UID for each IMAP email.
So I ran tracker-indexer under GDB and I found that UIDs were never
correctly set in get_metadata_for_imap() (in evolution.c) even after the
call to read_summary(). For instance, this is a UDI I obtain in
get_metadata_for_imap() :

(gdb) print uid
$29 = (gchar *) 0x7fc48fcb7790 "\016C\2021ï\bbï"
(gdb) 

Thanks for spotting this Laurent.
Carlos is probably the best person to look into this. But if you have
time to knock up a patch, that would be even better! :)

So here a patch!

First, sizeof(time_t) == 8 but sizeof(gint32) == 4, so a time_t variable
can't be treated as a gint32 one on a 64 bits system.

Quite right, thanks for noticing

Second, I think that imap summary header wasn't correctly parsed, I
added back some code from trunk.

Hmmm, well, that code is mostly for quite ancient versions of evolution,
the code is already quite hairy, so I'd prefer not to add it unless
people complain loudly :)

Third, it seems normal that I see "(null)" as uid for lines like :

(tracker-indexer:8744): Tracker-DEBUG: Updating item
'email://1215617975 4227 21 dohko//INBOX;uid=(null)'

(humm, is it possible to remove the double slashes and have just one?)

That's just a debug message that composes dirname+basename together, so
the double slashes shouldn't end up in the databases, but the (null)
think was quite serious, I've just committed part of your patch and a
fix for this in indexer-split, thanks a lot! :)

Regards,
  Carlos

-- 
Carlos Garnacho
Imendio AB - Expert solutions in GTK+
http://www.imendio.com




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