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. Second, I think that imap summary header wasn't correctly parsed, I added back some code from trunk. Third, it seems normal that I see "(null)" as uid for lines like : (tracker-indexer:8744): Tracker-DEBUG: Updating item 'email://[EMAIL PROTECTED]//INBOX;uid=(null)' (humm, is it possible to remove the double slashes and have just one?) And about tracker-applet.c, please apply this patch : --- tracker-applet.c (révision 2258) +++ tracker-applet.c (copie de travail) @@ -2142,7 +2142,7 @@ priv->keyfile = NULL; priv->filename = g_build_filename (g_get_user_config_dir (), - "tracker" + "tracker", "tracker-applet.cfg", NULL); or I can commit... Laurent.
Index: modules/evolution.c =================================================================== --- modules/evolution.c (révision 2258) +++ modules/evolution.c (copie de travail) @@ -131,7 +131,20 @@ while ((value_type = va_arg (args, gint)) != -1) { switch (value_type) { - case SUMMARY_TYPE_TIME_T: + case SUMMARY_TYPE_TIME_T: { + time_t value, *dest; + + if (fread (&value, sizeof (time_t), 1, summary) != 1) { + return FALSE; + } + + dest = va_arg (args, time_t*); + + if (dest) { + *dest = g_ntohl (value); + } + break; + } case SUMMARY_TYPE_INT32: { gint32 value, *dest; @@ -456,27 +469,43 @@ read_summary (summary, SUMMARY_TYPE_INT32, &version, - SUMMARY_TYPE_INT32, NULL, - SUMMARY_TYPE_INT32, NULL, - SUMMARY_TYPE_INT32, NULL, + SUMMARY_TYPE_INT32, NULL, /* flags */ + SUMMARY_TYPE_INT32, NULL, /* nextuid */ + SUMMARY_TYPE_TIME_T, NULL, /* time */ SUMMARY_TYPE_INT32, &n_messages, -1); if ((version < 0x100 && version >= 13)) { read_summary (summary, - SUMMARY_TYPE_INT32, NULL, - SUMMARY_TYPE_INT32, NULL, - SUMMARY_TYPE_INT32, NULL, + SUMMARY_TYPE_INT32, NULL, /* unread */ + SUMMARY_TYPE_INT32, NULL, /* deleted */ + SUMMARY_TYPE_INT32, NULL, /* junk */ -1); } - if (version != 0x30c) { + if (version == 0x30c) { read_summary (summary, - SUMMARY_TYPE_INT32, NULL, - SUMMARY_TYPE_INT32, NULL, + SUMMARY_TYPE_UINT32, NULL,/* validity */ -1); - } + } else { + /* version 1 */ + gint32 imap_version; + read_summary (summary, + SUMMARY_TYPE_INT32, &imap_version, /* IMAP version */ + -1); + if (imap_version == 2) { + /* version 2 */ + read_summary (summary, + SUMMARY_TYPE_INT32, NULL, /* mlist */ + -1); + } + + read_summary (summary, + SUMMARY_TYPE_INT32, NULL, /* validity */ + -1); + } + return n_messages; }
signature.asc
Description: Ceci est une partie de message numériquement signée
_______________________________________________ tracker-list mailing list tracker-list@gnome.org http://mail.gnome.org/mailman/listinfo/tracker-list