Lower log level to spam for DMAP investigation and add dmap_add_raw_uint32() for later use

This commit is contained in:
ejurgensen 2013-11-14 23:08:20 +01:00
parent 28b485c595
commit 7bb2fef25f
3 changed files with 20 additions and 3 deletions

View File

@ -167,6 +167,20 @@ dmap_add_literal(struct evbuffer *evbuf, char *tag, char *str, int len)
evbuffer_add(evbuf, str, len);
}
void
dmap_add_raw_uint32(struct evbuffer *evbuf, uint32_t val)
{
unsigned char buf[4];
/* Value */
buf[0] = (val >> 24) & 0xff;
buf[1] = (val >> 16) & 0xff;
buf[2] = (val >> 8) & 0xff;
buf[3] = val & 0xff;
evbuffer_add(evbuf, buf, sizeof(buf));
}
void
dmap_add_string(struct evbuffer *evbuf, char *tag, const char *str)
{
@ -427,7 +441,7 @@ dmap_encode_file_metadata(struct evbuffer *songlist, struct evbuffer *song, stru
continue;
}
DPRINTF(E_DBG, L_DAAP, "Investigating %s\n", df->desc);
DPRINTF(E_SPAM, L_DAAP, "Investigating %s\n", df->desc);
strval = (char **) ((char *)dbmfi + dfm->mfi_offset);
@ -476,7 +490,7 @@ dmap_encode_file_metadata(struct evbuffer *songlist, struct evbuffer *song, stru
dmap_add_field(song, df, *strval, val);
DPRINTF(E_DBG, L_DAAP, "Done with meta tag %s (%s)\n", df->desc, *strval);
DPRINTF(E_SPAM, L_DAAP, "Done with meta tag %s (%s)\n", df->desc, *strval);
}
if (sort_tags)

View File

@ -67,6 +67,9 @@ dmap_add_char(struct evbuffer *evbuf, char *tag, char val);
void
dmap_add_literal(struct evbuffer *evbuf, char *tag, char *str, int len);
void
dmap_add_raw_uint32(struct evbuffer *evbuf, uint32_t val);
void
dmap_add_string(struct evbuffer *evbuf, char *tag, const char *str);

View File

@ -1407,7 +1407,7 @@ daap_reply_playlists(struct evhttp_request *req, struct evbuffer *evbuf, char **
dmap_add_field(playlist, df, *strval, 0);
DPRINTF(E_DBG, L_DAAP, "Done with meta tag %s (%s)\n", df->desc, *strval);
DPRINTF(E_SPAM, L_DAAP, "Done with meta tag %s (%s)\n", df->desc, *strval);
}
/* Item count (mimc) */