diff --git a/src/dmap_helpers.h b/src/dmap_helpers.h index 41680ffc..8575a032 100644 --- a/src/dmap_helpers.h +++ b/src/dmap_helpers.h @@ -6,11 +6,14 @@ enum dmap_type { - DMAP_TYPE_BYTE = 0x01, - DMAP_TYPE_UBYTE = 0x02, - DMAP_TYPE_SHORT = 0x03, - DMAP_TYPE_INT = 0x05, - DMAP_TYPE_LONG = 0x07, + DMAP_TYPE_UBYTE = 0x01, + DMAP_TYPE_BYTE = 0x02, + DMAP_TYPE_USHORT = 0x03, + DMAP_TYPE_SHORT = 0x04, + DMAP_TYPE_UINT = 0x05, + DMAP_TYPE_INT = 0x06, + DMAP_TYPE_ULONG = 0x07, + DMAP_TYPE_LONG = 0x08, DMAP_TYPE_STRING = 0x09, DMAP_TYPE_DATE = 0x0a, DMAP_TYPE_VERSION = 0x0b, diff --git a/src/httpd_daap.c b/src/httpd_daap.c index 5b9fb9de..c4d15b70 100644 --- a/src/httpd_daap.c +++ b/src/httpd_daap.c @@ -519,23 +519,26 @@ dmap_add_field(struct evbuffer *evbuf, struct dmap_field_map *dfm, char *strval, switch (dfm->type) { - case DMAP_TYPE_BYTE: case DMAP_TYPE_UBYTE: + case DMAP_TYPE_BYTE: if (val) dmap_add_char(evbuf, dfm->tag, val); break; + case DMAP_TYPE_USHORT: case DMAP_TYPE_SHORT: if (val) dmap_add_short(evbuf, dfm->tag, val); break; + case DMAP_TYPE_UINT: case DMAP_TYPE_INT: case DMAP_TYPE_DATE: if (val) dmap_add_int(evbuf, dfm->tag, val); break; + case DMAP_TYPE_ULONG: case DMAP_TYPE_LONG: if (val64) dmap_add_long(evbuf, dfm->tag, val64); @@ -546,6 +549,7 @@ dmap_add_field(struct evbuffer *evbuf, struct dmap_field_map *dfm, char *strval, dmap_add_string(evbuf, dfm->tag, strval); break; + /* DMAP_TYPE_VERSION & DMAP_TYPE_LIST not handled here */ default: DPRINTF(E_LOG, L_DAAP, "Unsupported DMAP type %d for DMAP field %s\n", dfm->type, dfm->desc); break;