* ARM:
- need to get rid of synchronous API for service starts (cause all kinds of problems)
[=> eliminate for need to tell ARM about service starts most of the time!]
+* HELLO:
+ - need function to test "equivalency" of HELLOs; use in topology!
* Module features to implement:
- advanced FS API parts
+ namespaces: fundamental namespace API
if (msg == NULL)
{
- if (irc != NULL)
+ if (irc->info != NULL)
irc->info (irc->info_cls,
NULL, 0, 0, GNUNET_TIME_UNIT_FOREVER_REL, 0, 0);
GNUNET_CLIENT_disconnect (irc->client);
(ntohs (msg->size) != sizeof (struct ConfigurationInfoMessage)) )
{
GNUNET_break (0);
- if (irc != NULL)
+ if (irc->info != NULL)
irc->info (irc->info_cls,
NULL, 0, 0, GNUNET_TIME_UNIT_FOREVER_REL, 0, 0);
GNUNET_CLIENT_disconnect (irc->client);
return;
}
cim = (const struct ConfigurationInfoMessage*) msg;
- if (irc != NULL)
+ if (irc->info != NULL)
irc->info (irc->info_cls,
&cim->peer,
ntohl (cim->bpm_in),
void GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle);
+// FIXME
struct GNUNET_CORE_PeerRequestHandle;
+// FIXME
struct GNUNET_CORE_PeerRequestHandle *
GNUNET_CORE_peer_request_connect (struct GNUNET_SCHEDULER_Handle *sched,
const struct GNUNET_CONFIGURATION_Handle *cfg,
void *cont_cls);
+// FIXME
struct GNUNET_CORE_PeerRequestHandle *
GNUNET_CORE_peer_request_disconnect (struct GNUNET_SCHEDULER_Handle *sched,
const struct GNUNET_CONFIGURATION_Handle *cfg,
GNUNET_SCHEDULER_Task cont,
void *cont_cls);
+// FIXME
void
GNUNET_CORE_peer_request_cancel (struct GNUNET_CORE_PeerRequestHandle *req);
if (hello == NULL)
{
/* free existing HELLO, if any */
- pos = find_peer (peer);
if (NULL != (pos = find_peer (peer)))
{
GNUNET_free_non_null (pos->hello);
fl = make_peer (&pid,
NULL,
GNUNET_YES);
-#if DEBUG_TOPOLOGY
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Found friend `%s' in configuration\n",
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ _("Found friend `%s' in configuration\n"),
GNUNET_i2s (&fl->id));
-#endif
}
pos = pos + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded);
while ((pos < frstat.st_size) && isspace (data[pos]))
}
pos = pos->next;
}
- if (match == NULL)
+ if ( (match == NULL) ||
+ (match->data_size == 0) )
return 0;
*thumb = GNUNET_malloc (match->data_size);
memcpy (*thumb, match->data, match->data_size);
off -= pos->data_size;
memcpy (&mdata[off], pos->data, pos->data_size);
off -= plen;
- memcpy (&mdata[off], pos->plugin_name, plen);
+ if (pos->plugin_name != NULL)
+ memcpy (&mdata[off], pos->plugin_name, plen);
off -= mlen;
- memcpy (&mdata[off], pos->mime_type, mlen);
+ if (pos->mime_type != NULL)
+ memcpy (&mdata[off], pos->mime_type, mlen);
i++;
pos = pos->next;
}
clen = 0;
cdata = NULL;
left = size;
+ pos = md->items;
for (i=0;i<md->item_count;i++)
{
comp = GNUNET_NO;
hdr->entries = htonl (md->item_count);
if (GNUNET_YES == comp)
{
+ GNUNET_assert (clen < left);
hdr->version = htonl (2 | HEADER_COMPRESSED);
memcpy (&hdr[1],
cdata,
if (pos->plugin_name != NULL)
left -= strlen (pos->plugin_name) + 1;
if (pos->mime_type != NULL)
- left -= strlen (pos->mime_type) + 1;
+ left -= strlen (pos->mime_type) + 1;
+ pos = pos->next;
}
GNUNET_free (ent);
myHeap = GNUNET_CONTAINER_heap_create (GNUNET_CONTAINER_HEAP_ORDER_MIN);
n1 = GNUNET_CONTAINER_heap_insert (myHeap, "11", 11);
+ GNUNET_assert (NULL != n1);
GNUNET_CONTAINER_heap_iterate (myHeap, &iterator_callback, NULL);
GNUNET_assert (1 == GNUNET_CONTAINER_heap_get_size (myHeap));
n2 = GNUNET_CONTAINER_heap_insert (myHeap, "78", 78);
GNUNET_CONTAINER_heap_iterate (myHeap, &iterator_callback, NULL);
n4 = GNUNET_CONTAINER_heap_insert (myHeap, "50", 50);
+ GNUNET_CONTAINER_heap_update_cost (myHeap, n4, 0);
GNUNET_assert (3 == GNUNET_CONTAINER_heap_get_size (myHeap));
GNUNET_CONTAINER_heap_iterate (myHeap, &iterator_callback, NULL);
EXTRACTOR_plugin_remove_all (ex);
d = GNUNET_CONTAINER_meta_data_duplicate (m);
GNUNET_CONTAINER_meta_data_destroy (m);
+ thumb = NULL;
size = GNUNET_CONTAINER_meta_data_get_thumbnail (d, &thumb);
if (size == 0)
{