size_t addr_len;
struct GNUNET_HELLO_Address haddr;
size_t ret;
-
if (NULL == ctx->pos)
return 0;
if ('!' != ctx->pos[0])
{
ctx->ret = GNUNET_SYSERR;
+ GNUNET_break (0);
return 0;
}
ctx->pos++;
tname = strptime (ctx->pos,
"%Y%m%d%H%M%S",
&expiration_time);
+
if (NULL == tname)
{
ctx->ret = GNUNET_SYSERR;
+ GNUNET_break (0);
return 0;
}
expiration_seconds = mktime (&expiration_time);
if (expiration_seconds == (time_t) -1)
{
ctx->ret = GNUNET_SYSERR;
+ GNUNET_break (0);
return 0;
}
expire.abs_value = expiration_seconds * 1000;
if ('!' != tname[0])
{
ctx->ret = GNUNET_SYSERR;
+ GNUNET_break (0);
return 0;
}
tname++;
if (NULL == address)
{
ctx->ret = GNUNET_SYSERR;
+ GNUNET_break (0);
return 0;
}
address++;
{
ctx->pos = end;
}
- plugin_name = GNUNET_strndup (tname, address - tname);
+ plugin_name = GNUNET_strndup (tname, address - (tname+1));
papi = GPI_plugins_find (plugin_name);
if (NULL == papi)
{
* Skip this part, advance to the next one and recurse.
* But only if this is not the end of string.
*/
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("Plugin `%s' not found\n"),
+ plugin_name);
GNUNET_free (plugin_name);
+
+ GNUNET_break (0);
return 0;
}
if (NULL == papi->string_to_address)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
_("Plugin `%s' does not support URIs yet\n"),
- ctx->pos);
+ plugin_name);
GNUNET_free (plugin_name);
+ GNUNET_break (0);
return 0;
}
if (GNUNET_OK !=
&addr,
&addr_len))
{
- GNUNET_free (plugin_name);
- return GNUNET_SYSERR;
+ GNUNET_free (plugin_name);
+ return 0;
}
/* address.peer is unset - not used by add_address() */
haddr.address_length = addr_len;
return GNUNET_SYSERR;
pks = &put_uri[strlen (HELLO_URI_PREFIX)];
exc = strstr (pks, "!");
+
if (GNUNET_OK != GNUNET_STRINGS_string_to_data (pks,
(NULL == exc) ? strlen (pks) : (exc - pks),
(unsigned char *) &my_public_key,