From a890844ffe2472421b21f2ef35d63397793960a4 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 18 Jul 2010 20:18:00 +0000 Subject: fix fs testcase --- src/fs/fs_publish.c | 5 +++-- src/fs/test_gnunet_fs_rec.py.in | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c index 90908f412..73fc710e1 100644 --- a/src/fs/fs_publish.c +++ b/src/fs/fs_publish.c @@ -567,7 +567,7 @@ block_proc (void *cls, odb.offset = GNUNET_htonll (offset); odb.file_id = p->data.file.file_id; GNUNET_DATASTORE_put (sc->dsh, - sc->rid, + (p->is_directory) ? 0 : sc->rid, query, sizeof(struct OnDemandBlock), &odb, @@ -589,7 +589,7 @@ block_proc (void *cls, (unsigned int) block_size); #endif GNUNET_DATASTORE_put (sc->dsh, - sc->rid, + (p->is_directory) ? 0 : sc->rid, query, block_size, block, @@ -1105,6 +1105,7 @@ fip_signal_start(void *cls, left = left * sizeof (struct ContentHashKey); sc->reserve_space += left; } + sc->reserve_entries++; /* entries and space for keywords */ if (NULL != *uri) { diff --git a/src/fs/test_gnunet_fs_rec.py.in b/src/fs/test_gnunet_fs_rec.py.in index 145b8e3b4..ccf7be6b5 100755 --- a/src/fs/test_gnunet_fs_rec.py.in +++ b/src/fs/test_gnunet_fs_rec.py.in @@ -29,10 +29,10 @@ os.system ('tar xfz test_gnunet_fs_rec_data.tgz') try: pub = pexpect.spawn ('gnunet-publish -c test_gnunet_fs_rec_data.conf -d -k testdir dir/') pub.expect ('Publishing `dir/\' done.\r') - pub.expect ("URI is `gnunet://fs/chk/P5BPKNHH7CECDQA1A917G5EB67PPVG99NVO5QMJ8AJP2C02NM8O1ALNGOJPLLO0RMST0FNM0ATJV95PDAGATHDGH7AGIK2N3O0OOC70.OSG2JS3JDSI0AV8LMOL9MKPJ70DNG2RBL2CBTUCHK563VEM7L00RN8I2K0VPB459JRVBFOIKJG72LIQPDP9RFCVEVI37BUD76RJ3KK0.20169\'.") + pub.expect ("URI is `gnunet://fs/chk/8PNDC5FDF7T57HUGM9ODSL7CDKNOLPUFDCJQQ2MPP4SUPSEAJP1LNLBMEFN21KAG0KNVG3LG2AJCV322G3ECU6GKM9HFCVKM78LKEUO.9MI810JGAE6QVQMTBBVO2E92PA3C1MVF511CGKIPBMJ1B0PERIBDK9TNVD2JB4E4NFTD5F8QORJ644CUC281PISDND1NVGC7PB14388.20173'.") pub.expect (pexpect.EOF) - down = pexpect.spawn ('gnunet-download -c test_gnunet_fs_rec_data.conf -R -o rdir.gnd gnunet://fs/chk/P5BPKNHH7CECDQA1A917G5EB67PPVG99NVO5QMJ8AJP2C02NM8O1ALNGOJPLLO0RMST0FNM0ATJV95PDAGATHDGH7AGIK2N3O0OOC70.OSG2JS3JDSI0AV8LMOL9MKPJ70DNG2RBL2CBTUCHK563VEM7L00RN8I2K0VPB459JRVBFOIKJG72LIQPDP9RFCVEVI37BUD76RJ3KK0.20169\'.') + down = pexpect.spawn ('gnunet-download -c test_gnunet_fs_rec_data.conf -R -o rdir.gnd gnunet://fs/chk/8PNDC5FDF7T57HUGM9ODSL7CDKNOLPUFDCJQQ2MPP4SUPSEAJP1LNLBMEFN21KAG0KNVG3LG2AJCV322G3ECU6GKM9HFCVKM78LKEUO.9MI810JGAE6QVQMTBBVO2E92PA3C1MVF511CGKIPBMJ1B0PERIBDK9TNVD2JB4E4NFTD5F8QORJ644CUC281PISDND1NVGC7PB14388.20173') down.expect (re.compile ("Downloading `rdir.gnd\' done \(.*\).\r")); down.expect (pexpect.EOF); -- cgit v1.2.3