Closed
Bug 348
Opened 27 years ago
Closed 24 years ago
History display in Aurora appears to be bogus
Categories
(MozillaClassic Graveyard :: Aurora/RDF BE, defect, P3)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: waider, Assigned: guha)
Details
Created by Ronan Waide (waider@waider.ie) on Tuesday, May 12, 1998 8:09:58 AM PDT
Additional Details :
History -> By Date seems to have totally scrambled dates.
This may well be contributed to by the fact that I
originally copied my entire .netscape directory into
mozilla's feeding ground, however.
History -> By Site only has one page entry per site.
I'm looking at the date one at the moment.
Updated by Ronan Waide (waider@waider.ie) on Tuesday, May 12, 1998 9:37:08 AM PDT
Additional Details :
Date munging appears to be a big-endian/little-endian problem - the datablock
retrieved from the history db file is in sparc's natural byte order, but the
COPY_INT32 seems to be expecting the opposite. Not really sure why thisis
happening, though.
Updated by Ronan Waide (waider@waider.ie) on Tuesday, May 12, 1998 10:22:05 AM PDT
Additional Details :
Okay, it looks like the problem is that Netscape 4.0 has the date field arranged
one way, and RDF is expecting it to be the other. Aurora is opening
~/.netscape/history.db despite the fact that I'm using jwz's (HOME=~/.mozilla;
mozilla) hack to avoid breaking my Netscape 4 stuff.
The one page per site seems to have been fixed in the meantime. I think I
changed a type somewhere that might have fixed this. diff will sort it out.
Updated by Ronan Waide (waider@waider.ie) on Tuesday, May 19, 1998 2:12:22 AM PDT
Additional Details :
Duh. It was looking in my ~/.netscape dir because prefs.js points there. Don't
forget to change prefs.js, boys and girls!
Updated by Ronan Waide (waider@waider.ie) on Thursday, May 21, 1998 2:39:20 AM PDT
Additional Details :
Problem found. glhist.c defines COPY_INT32 as byteswapping if you're a
macintosh, while hist2rdf.h defines COPY_INT32 as byteswapping if you're on on a
BIG_ENDIAN machine.
Here's a patch to get it working:
Index: modules/rdf/src/hist2rdf.c
===================================================================
RCS file: /cvsroot/mozilla/modules/rdf/src/hist2rdf.c,v
retrieving revision 3.3
diff -c -r3.3 hist2rdf.c
*** hist2rdf.c 1998/04/25 00:07:01 3.3
--- hist2rdf.c 1998/05/21 09:40:19
***************
*** 1,4 ****
! /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
--- 1,4 ----
! /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
***************
*** 70,78 ****
{
HASHINFO hash = { 4*1024, 0, 0, 0, 0, 0};
DBT key, data;
! time_t last,first,numaccess;
PRBool firstOne = 0;
! DB* db = CallDBOpenUsingFileURL(gGlobalHistoryURL, O_RDONLY ,0600,
DB_HASH, &hash);
grdf = r;
if (db != NULL) {
--- 70,82 ----
{
HASHINFO hash = { 4*1024, 0, 0, 0, 0, 0};
DBT key, data;
! time_t last,first;
! uint32 numaccess;
PRBool firstOne = 0;
!
!
!
! DB* db = CallDBOpenUsingFileURL(gGlobalHistoryURL, O_RDONLY, 0600,
DB_HASH, &hash);
grdf = r;
if (db != NULL) {
***************
*** 82,102 ****
while (0 == (*db->seq)(db, &key, &data, (firstOne ? R_NEXT : R_FIRST)))
{
char* title = ((char*)data.data + 16); /* title */
char* url = (char*)key.data; /* url */
! int32 flag = (int32)*((char*)data.data + 3*sizeof(int32));
firstOne = 1;
#ifdef XP_UNIX
if ((/*1 == flag &&*/ displayHistoryItem((char*)key.data))) {
#else
if (1 == flag && displayHistoryItem((char*)key.data)) {
#endif
! COPY_INT32(&last, (time_t *)((char *)data.data));
! COPY_INT32(&first, (time_t *)((char *)data.data + 4));
! COPY_INT32(&numaccess, (time_t *)((char *)data.data + 8));
! collateOneHist(r, u,url,title, last, first, numaccess, byDateFlag);
}
}
! (*db->close)(db);
}
}
--- 86,109 ----
while (0 == (*db->seq)(db, &key, &data, (firstOne ? R_NEXT : R_FIRST)))
{
char* title = ((char*)data.data + 16); /* title */
char* url = (char*)key.data; /* url */
! /* int32 flag = (int32)*((char*)data.data + 3*sizeof(int32));*/
! int32 flag;
! HIST_COPY_INT32( &flag, (int8 *) data.data + 3 * sizeof( int32 ));
firstOne = 1;
#ifdef XP_UNIX
if ((/*1 == flag &&*/ displayHistoryItem((char*)key.data))) {
#else
if (1 == flag && displayHistoryItem((char*)key.data)) {
#endif
!
! HIST_COPY_INT32(&last, (int8 *)data.data );
! HIST_COPY_INT32(&first, (int8 *)data.data + sizeof( int32 ));
! HIST_COPY_INT32(&numaccess, (int8 *)data.data + 2 *sizeof( int32 ));
! collateOneHist(r, u,url,title, last, first, numaccess, byDateFlag);
}
}
! (*db->close)(db);
}
}
***************
*** 345,353 ****
int32 flg = (int32)*((char*)data->data + 3*sizeof(int32));
if (!displayHistoryItem((char*)key->data)) return;
if (grdf != NULL) {
! COPY_INT32(&last, (time_t *)((char *)data->data));
! COPY_INT32(&first, (time_t *)((char *)data->data + 4));
! COPY_INT32(&numaccess, (time_t *)((char *)data->data + 8));
if (hostHash) collateOneHist(grdf, gNavCenter->RDF_HistoryBySite,
(char*)key->data, /* url */
--- 352,360 ----
int32 flg = (int32)*((char*)data->data + 3*sizeof(int32));
if (!displayHistoryItem((char*)key->data)) return;
if (grdf != NULL) {
! HIST_COPY_INT32(&last, (time_t *)((char *)data->data));
! HIST_COPY_INT32(&first, (time_t *)((char *)data->data + 4));
! HIST_COPY_INT32(&numaccess, (time_t *)((char *)data->data + 8));
if (hostHash) collateOneHist(grdf, gNavCenter->RDF_HistoryBySite,
(char*)key->data, /* url */
Index: modules/rdf/src/hist2rdf.h
===================================================================
RCS file: /cvsroot/mozilla/modules/rdf/src/hist2rdf.h,v
retrieving revision 3.3
diff -c -r3.3 hist2rdf.h
*** hist2rdf.h 1998/04/25 00:07:03 3.3
--- hist2rdf.h 1998/05/21 09:40:19
***************
*** 43,48 ****
--- 43,53 ----
#error Must have a byte order
#endif
+ /* XXX glhist.c does this */
+ #if !defined(XP_MAC)
+ #define HIST_COPY_INT32(_a,_b) XP_MEMCPY(_a, _b, sizeof(int32));
+ #endif
+
#ifdef IS_LITTLE_ENDIAN
#define COPY_INT32(_a,_b) XP_MEMCPY(_a, _b, sizeof(int32));
#else
Updated by Robert Churchill (rjc@netscape.com) on Tuesday, May 26, 1998 6:36:48 PM PDT
Additional Details :
Fix from Ronan Waide (waider@waider.ie) checked into the RDF_BRANCH.
Updated by Robert Churchill (rjc@netscape.com) on Tuesday, May 26, 1998 6:37:00 PM PDT
Additional Details :
Reporter | ||
Comment 1•27 years ago
|
||
Looks to have been fixed long ago. Since bugzilla now allows me to update the
bug status, I figured I'd close it.
Comment 2•24 years ago
|
||
mid-air collision ? / bugzilla cleanup
Reopening (current State: resolved and no resolution)
Status: RESOLVED → REOPENED
Comment 3•24 years ago
|
||
marking fixed
Status: REOPENED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 4•24 years ago
|
||
marking verfied fixed (see the reporters last comment)
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•