From 0c3e54002b1764716355accc9b07f217b60abb20 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 13 Dec 2011 17:44:16 +0000 Subject: [PATCH] -fixing #2006 --- src/fs/fs_api.c | 1 + src/fs/fs_search.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c index ab351a209..f1ba4a5b1 100644 --- a/src/fs/fs_api.c +++ b/src/fs/fs_api.c @@ -2077,6 +2077,7 @@ deserialize_search_result (void *cls, const char *filename) download = NULL; update_srch = NULL; sr = GNUNET_malloc (sizeof (struct GNUNET_FS_SearchResult)); + sr->sc = sc; sr->serialization = ser; if ((GNUNET_OK != GNUNET_BIO_read_string (rh, "result-uri", &uris, 10 * 1024)) || (NULL == (sr->uri = GNUNET_FS_uri_parse (uris, &emsg))) || diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c index 052bf83d2..d016d320e 100644 --- a/src/fs/fs_search.c +++ b/src/fs/fs_search.c @@ -389,6 +389,7 @@ process_ksk_result (struct GNUNET_FS_SearchContext *sc, int is_new; /* check if new */ + GNUNET_assert (NULL != sc); GNUNET_FS_uri_to_key (uri, &key); if (GNUNET_SYSERR == GNUNET_CONTAINER_multihashmap_get_multiple (ent->results, &key, @@ -470,6 +471,7 @@ process_sks_result (struct GNUNET_FS_SearchContext *sc, const char *id_update, struct GNUNET_FS_SearchResult *sr; /* check if new */ + GNUNET_assert (NULL != sc); GNUNET_FS_uri_to_key (uri, &key); GNUNET_CRYPTO_hash_xor (&uri->data.chk.chk.key, &uri->data.chk.chk.query, &key); -- 2.25.1