projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
-towards block plugin for mesh
[oweals/gnunet.git]
/
src
/
fs
/
fs_unindex.c
diff --git
a/src/fs/fs_unindex.c
b/src/fs/fs_unindex.c
index ba1f492255e2a3355ceba41bdf0e73c5127a98c8..71a1b9e0ba78c4195904693d9c3a113801e19091 100644
(file)
--- a/
src/fs/fs_unindex.c
+++ b/
src/fs/fs_unindex.c
@@
-223,7
+223,7
@@
process_fs_response (void *cls, const struct GNUNET_MessageHeader *msg)
if (uc->client != NULL)
{
if (uc->client != NULL)
{
- GNUNET_CLIENT_disconnect (uc->client
, GNUNET_NO
);
+ GNUNET_CLIENT_disconnect (uc->client);
uc->client = NULL;
}
if (uc->state != UNINDEX_STATE_FS_NOTIFY)
uc->client = NULL;
}
if (uc->state != UNINDEX_STATE_FS_NOTIFY)
@@
-341,7
+341,7
@@
unindex_directory_scan_cb (void *cls,
{
uc->ksk_uri = GNUNET_FS_uri_dup (directory_scan_result->ksk_uri);
uc->state = UNINDEX_STATE_DS_REMOVE_KBLOCKS;
{
uc->ksk_uri = GNUNET_FS_uri_dup (directory_scan_result->ksk_uri);
uc->state = UNINDEX_STATE_DS_REMOVE_KBLOCKS;
- uc->emsg = GNUNET_strdup (_("Failed to
connect to `datastore' service
."));
+ uc->emsg = GNUNET_strdup (_("Failed to
get KSKs from directory scan
."));
GNUNET_FS_unindex_sync_ (uc);
GNUNET_FS_unindex_do_remove_kblocks_ (uc);
}
GNUNET_FS_unindex_sync_ (uc);
GNUNET_FS_unindex_do_remove_kblocks_ (uc);
}
@@
-437,7
+437,7
@@
continue_after_remove (void *cls,
*/
static void
process_kblock_for_unindex (void *cls,
*/
static void
process_kblock_for_unindex (void *cls,
- const GNUNET_HashCode * key,
+ const
struct
GNUNET_HashCode * key,
size_t size, const void *data,
enum GNUNET_BLOCK_Type type,
uint32_t priority,
size_t size, const void *data,
enum GNUNET_BLOCK_Type type,
uint32_t priority,
@@
-512,6
+512,7
@@
process_kblock_for_unindex (void *cls,
GNUNET_FS_uri_destroy (chk_uri);
goto get_next;
}
GNUNET_FS_uri_destroy (chk_uri);
goto get_next;
}
+ GNUNET_FS_uri_destroy (chk_uri);
/* matches! */
uc->dqe = GNUNET_DATASTORE_remove (uc->dsh,
key, size, data,
/* matches! */
uc->dqe = GNUNET_DATASTORE_remove (uc->dsh,
key, size, data,
@@
-544,7
+545,7
@@
GNUNET_FS_unindex_do_remove_kblocks_ (struct GNUNET_FS_UnindexContext *uc)
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub;
struct GNUNET_CRYPTO_RsaPrivateKey *pk;
struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded pub;
struct GNUNET_CRYPTO_RsaPrivateKey *pk;
- if (NULL
!
= uc->dsh)
+ if (NULL
=
= uc->dsh)
uc->dsh = GNUNET_DATASTORE_connect (uc->h->cfg);
if (NULL == uc->dsh)
{
uc->dsh = GNUNET_DATASTORE_connect (uc->h->cfg);
if (NULL == uc->dsh)
{
@@
-609,7
+610,8
@@
unindex_extract_keywords (void *cls, const struct GNUNET_SCHEDULER_TaskContext *
void
GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc)
{
void
GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc)
{
- uc->dsh = GNUNET_DATASTORE_connect (uc->h->cfg);
+ if (NULL == uc->dsh)
+ uc->dsh = GNUNET_DATASTORE_connect (uc->h->cfg);
if (NULL == uc->dsh)
{
uc->state = UNINDEX_STATE_ERROR;
if (NULL == uc->dsh)
{
uc->state = UNINDEX_STATE_ERROR;
@@
-647,7
+649,7
@@
GNUNET_FS_unindex_do_remove_ (struct GNUNET_FS_UnindexContext *uc)
* @param file_id computed hash, NULL on error
*/
void
* @param file_id computed hash, NULL on error
*/
void
-GNUNET_FS_unindex_process_hash_ (void *cls, const GNUNET_HashCode * file_id)
+GNUNET_FS_unindex_process_hash_ (void *cls, const
struct
GNUNET_HashCode * file_id)
{
struct GNUNET_FS_UnindexContext *uc = cls;
{
struct GNUNET_FS_UnindexContext *uc = cls;
@@
-707,7
+709,7
@@
GNUNET_FS_unindex_signal_suspend_ (void *cls)
}
if (uc->client != NULL)
{
}
if (uc->client != NULL)
{
- GNUNET_CLIENT_disconnect (uc->client
, GNUNET_NO
);
+ GNUNET_CLIENT_disconnect (uc->client);
uc->client = NULL;
}
if (NULL != uc->dsh)
uc->client = NULL;
}
if (NULL != uc->dsh)
@@
-754,7
+756,7
@@
GNUNET_FS_unindex_start (struct GNUNET_FS_Handle *h, const char *filename,
struct GNUNET_FS_ProgressInfo pi;
uint64_t size;
struct GNUNET_FS_ProgressInfo pi;
uint64_t size;
- if (GNUNET_OK != GNUNET_DISK_file_size (filename, &size, GNUNET_YES))
+ if (GNUNET_OK != GNUNET_DISK_file_size (filename, &size, GNUNET_YES
, GNUNET_YES
))
return NULL;
ret = GNUNET_malloc (sizeof (struct GNUNET_FS_UnindexContext));
ret->h = h;
return NULL;
ret = GNUNET_malloc (sizeof (struct GNUNET_FS_UnindexContext));
ret->h = h;
@@
-802,7
+804,7
@@
GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc)
}
if (uc->client != NULL)
{
}
if (uc->client != NULL)
{
- GNUNET_CLIENT_disconnect (uc->client
, GNUNET_NO
);
+ GNUNET_CLIENT_disconnect (uc->client);
uc->client = NULL;
}
if (NULL != uc->dsh)
uc->client = NULL;
}
if (NULL != uc->dsh)
@@
-839,6
+841,7
@@
GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc)
(uc->state ==
UNINDEX_STATE_COMPLETE) ? uc->file_size : 0);
GNUNET_break (NULL == uc->client_info);
(uc->state ==
UNINDEX_STATE_COMPLETE) ? uc->file_size : 0);
GNUNET_break (NULL == uc->client_info);
+ GNUNET_free_non_null (uc->emsg);
GNUNET_free (uc->filename);
GNUNET_free (uc);
}
GNUNET_free (uc->filename);
GNUNET_free (uc);
}