diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-05-03 09:03:08 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-05-03 09:03:08 +0000 |
commit | 2d215723e30ee9af322ed6b243b24feab630845b (patch) | |
tree | 5704bcafd091811cfb793f3011b8a6fc5baddb73 /src/fs | |
parent | 014972b06f9180cc39ad10b34559b441edc3a33f (diff) | |
download | gnunet-2d215723e30ee9af322ed6b243b24feab630845b.tar.gz gnunet-2d215723e30ee9af322ed6b243b24feab630845b.zip |
fix
Diffstat (limited to 'src/fs')
-rw-r--r-- | src/fs/fs_download.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c index eba58e7a5..31984da08 100644 --- a/src/fs/fs_download.c +++ b/src/fs/fs_download.c | |||
@@ -826,6 +826,8 @@ process_result_with_request (void *cls, | |||
826 | { | 826 | { |
827 | struct ProcessResultClosure *prc = cls; | 827 | struct ProcessResultClosure *prc = cls; |
828 | struct DownloadRequest *sm = value; | 828 | struct DownloadRequest *sm = value; |
829 | struct DownloadRequest *ppos; | ||
830 | struct DownloadRequest *pprev; | ||
829 | struct GNUNET_FS_DownloadContext *dc = prc->dc; | 831 | struct GNUNET_FS_DownloadContext *dc = prc->dc; |
830 | struct GNUNET_CRYPTO_AesSessionKey skey; | 832 | struct GNUNET_CRYPTO_AesSessionKey skey; |
831 | struct GNUNET_CRYPTO_AesInitializationVector iv; | 833 | struct GNUNET_CRYPTO_AesInitializationVector iv; |
@@ -869,6 +871,22 @@ process_result_with_request (void *cls, | |||
869 | GNUNET_CONTAINER_multihashmap_remove (dc->active, | 871 | GNUNET_CONTAINER_multihashmap_remove (dc->active, |
870 | &prc->query, | 872 | &prc->query, |
871 | sm)); | 873 | sm)); |
874 | /* if this request is on the pending list, remove it! */ | ||
875 | pprev = NULL; | ||
876 | ppos = dc->pending; | ||
877 | while (ppos != NULL) | ||
878 | { | ||
879 | if (ppos == sm) | ||
880 | { | ||
881 | if (pprev == NULL) | ||
882 | dc->pending = ppos->next; | ||
883 | else | ||
884 | pprev->next = ppos->next; | ||
885 | break; | ||
886 | } | ||
887 | pprev = ppos; | ||
888 | ppos = ppos->next; | ||
889 | } | ||
872 | GNUNET_CRYPTO_hash_to_aes_key (&sm->chk.key, &skey, &iv); | 890 | GNUNET_CRYPTO_hash_to_aes_key (&sm->chk.key, &skey, &iv); |
873 | GNUNET_CRYPTO_aes_decrypt (prc->data, | 891 | GNUNET_CRYPTO_aes_decrypt (prc->data, |
874 | prc->size, | 892 | prc->size, |