From: Kern Sibbald Date: Tue, 16 Sep 2008 13:32:18 +0000 (+0000) Subject: Fix bug #1156 FD crash during processing of Accurate data. X-Git-Tag: Release-7.0.0~4128 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c3cfa240872666effc0e468eeb30fd3091b28dbd;p=bacula%2Fbacula Fix bug #1156 FD crash during processing of Accurate data. git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@7600 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/src/filed/job.c b/bacula/src/filed/job.c index 0c21ffe558..98f7318184 100644 --- a/bacula/src/filed/job.c +++ b/bacula/src/filed/job.c @@ -749,7 +749,7 @@ static void add_fileset(JCR *jcr, const char *item) */ if (subcode != ' ') { state = state_error; - Dmsg0(100, "Set state=error\n"); + Dmsg0(100, "Set state=error or double code.\n"); } switch (code) { case 'I': diff --git a/bacula/src/lib/htable.c b/bacula/src/lib/htable.c index d2877d43f0..f04fa55c8e 100644 --- a/bacula/src/lib/htable.c +++ b/bacula/src/lib/htable.c @@ -227,12 +227,14 @@ void htable::grow_table() Dmsg1(100, "Grow called old size = %d\n", buckets); /* Setup a bigger table */ htable *big = (htable *)malloc(sizeof(htable)); + memcpy(big, this, sizeof(htable)); /* start with original class data */ big->loffset = loffset; big->mask = mask<<1 | 1; big->rshift = rshift - 1; big->num_items = 0; big->buckets = buckets * 2; big->max_items = big->buckets * 4; + /* Create a bigger hash table */ big->table = (hlink **)malloc(big->buckets * sizeof(hlink *)); memset(big->table, 0, big->buckets * sizeof(hlink *)); big->walkptr = NULL; diff --git a/bacula/technotes-2.5 b/bacula/technotes-2.5 index 86cc37cce1..e82a74405d 100644 --- a/bacula/technotes-2.5 +++ b/bacula/technotes-2.5 @@ -19,6 +19,7 @@ remove reader/writer in FOPTS???? General: 16Sep08 +kes Fix bug #1156 FD crash during processing of Accurate data. kes Tweaks to htable code to improved debugging and make names a bit more meaningful. 15Sep08