if (pos->data_size < data_len)
break;
if ( (pos->type == type) &&
- (pos->format == format) &&
(pos->data_size == data_len) &&
(0 == memcmp (pos->data,
data,
pos->mime_type = GNUNET_strdup (data_mime_type);
invalidate_sbuf (md);
}
+ if ( (pos->format == EXTRACTOR_METAFORMAT_C_STRING) &&
+ (format == EXTRACTOR_METAFORMAT_UTF8) )
+ {
+ pos->format = EXTRACTOR_METAFORMAT_UTF8;
+ invalidate_sbuf (md);
+ }
return GNUNET_SYSERR;
}
prev = pos;
{
struct MetaItem *pos;
+ if (md == NULL)
+ return 0;
if (iter == NULL)
return md->item_count;
pos = md->items;
{
struct MetaItem *pos;
+ if (md == NULL)
+ return NULL;
pos = md->items;
while (NULL != pos)
{
va_list args;
enum EXTRACTOR_MetaType type;
+ if (md == NULL)
+ return NULL;
ret = NULL;
va_start (args, md);
while (1)
struct MetaItem *pos;
struct MetaItem *match;
+ if (md == NULL)
+ return 0;
match = NULL;
pos = md->items;
while (NULL != pos)
- {
- if ( (0 == strncasecmp ("image/", pos->mime_type,
+ {
+ if ( (NULL != pos->mime_type) &&
+ (0 == strncasecmp ("image/", pos->mime_type,
strlen("image/"))) &&
(pos->format == EXTRACTOR_METAFORMAT_BINARY) )
{