Date: Sat, 19 Jun 2004 16:35:13 -0400 (EDT) From: Mike <mpatters@cs.uwaterloo.ca> To: FreeBSD-gnats-submit@FreeBSD.org Cc: mike.patterson@unb.ca Subject: ports/68123: logjam 4.4 has a bug with syncing journals Message-ID: <200406192035.i5JKZDmA096219@torres.uwaterloo.ca> Resent-Message-ID: <200406192040.i5JKeH01021835@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 68123 >Category: ports >Synopsis: logjam 4.4 has a bug with syncing journals >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Jun 19 20:40:16 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Mike Patterson >Release: FreeBSD 5.2.1-RELEASE-p8 i386 >Organization: >Environment: System: FreeBSD torres 5.2.1-RELEASE-p8 FreeBSD 5.2.1-RELEASE-p8 #0: Sat Jun 5 11:31:25 EDT 2004 root@torres:/usr/obj/usr/src/sys/TORRES i386 >Description: The logjam client has a utility to create and maintain an offline copy of one's LiveJournal. However, there's a bug that causes it to crash whenever one attempts to sync. >How-To-Repeat: Sync your journal. Wait for a while. Watch it dump core. >Fix: LiveJournal user daviticus (David Charlton) submitted a patch that works on 4.x systems. Tested against 5.2 as well; it ought to work everywhere (also tested on Mac OS X 10.3 :) ). --- ljpatch_fixsync begins here --- diff -ruN logjam.old/Makefile logjam/Makefile --- logjam.old/Makefile Tue Jun 8 12:37:11 2004 +++ logjam/Makefile Sat Jun 19 16:10:11 2004 @@ -7,7 +7,7 @@ PORTNAME= logjam PORTVERSION= 4.4.0 -PORTREVISION?= 1 +PORTREVISION?= 2 CATEGORIES= deskutils MASTER_SITES= http://logjam.danga.com/download/ diff -ruN logjam.old/files/patch-src::sync.c logjam/files/patch-src::sync.c --- logjam.old/files/patch-src::sync.c Wed Dec 31 19:00:00 1969 +++ logjam/files/patch-src::sync.c Sat Jun 19 16:08:41 2004 @@ -0,0 +1,15 @@ +--- protocol/liblivejournal/livejournal/sync.c.old Fri Jun 18 14:57:51 2004 ++++ protocol/liblivejournal/livejournal/sync.c Fri Jun 18 14:58:20 2004 +@@ -33,8 +33,10 @@ + static int + entry_date_compare_func(const void *a, const void *b) { + /* struct tm* cast needed to un-constify the times passed to mktime. */ +- const LJEntry *entrya = a; time_t timea = mktime((struct tm*)&entrya->time); +- const LJEntry *entryb = b; time_t timeb = mktime((struct tm*)&entryb->time); ++ const LJEntry *entrya = *(LJEntry **)a; ++ const LJEntry *entryb = *(LJEntry **)b; ++ time_t timea = mktime((struct tm*)&entrya->time); ++ time_t timeb = mktime((struct tm*)&entryb->time); + /* mktime actually converts the times to local time, which isn't + * quite correct, but since we're comparing times directly like this + * it should still sort the same way and timegm is potentially slower. */ --- ljpatch_fixsync ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200406192035.i5JKZDmA096219>