tracker r2393 - in trunk: . src/tracker-indexer/modules
- From: carlosg svn gnome org
- To: svn-commits-list gnome org
- Subject: tracker r2393 - in trunk: . src/tracker-indexer/modules
- Date: Mon, 20 Oct 2008 10:19:56 +0000 (UTC)
Author: carlosg
Date: Mon Oct 20 10:19:56 2008
New Revision: 2393
URL: http://svn.gnome.org/viewvc/tracker?rev=2393&view=rev
Log:
2008-10-20 Carlos Garnacho <carlos imendio com>
* src/tracker-indexer/modules/evolution.c: Resort to a copy of the old
code to decode time_t, should definitely fix summaries parsing in
64bit platforms...
Modified:
trunk/ChangeLog
trunk/src/tracker-indexer/modules/evolution.c
Modified: trunk/src/tracker-indexer/modules/evolution.c
==============================================================================
--- trunk/src/tracker-indexer/modules/evolution.c (original)
+++ trunk/src/tracker-indexer/modules/evolution.c Mon Oct 20 10:19:56 2008
@@ -132,18 +132,26 @@
while ((value_type = va_arg (args, gint)) != -1) {
switch (value_type) {
case SUMMARY_TYPE_TIME_T: {
- guint32 value;
- time_t *dest;
+ time_t value = 0;
+ time_t *dest;
+ int size = sizeof (time_t) - 1;
+ int c = EOF;
+
+ while (size >= 0 && (c = fgetc (summary)) != EOF) {
+ value |= ((time_t) c) << (size * 8);
+ size--;
+ }
+
+ dest = va_arg (args, time_t*);
+
+ if (dest) {
+ *dest = value;
+ }
+
+ if (c == EOF) {
+ return FALSE;
+ }
- if (fread (&value, sizeof (guint32), 1, summary) != 1) {
- return FALSE;
- }
-
- dest = va_arg (args, time_t*);
-
- if (dest) {
- *dest = (time_t) g_ntohl (value);
- }
break;
}
case SUMMARY_TYPE_INT32: {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]