From c792b942a06a83d2f7769cbbeabf0a99c5383a3e Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Tue, 8 Mar 2011 19:25:47 +0100 Subject: [PATCH] Add logdomain for common DMAP code --- src/dmap_common.c | 4 ++-- src/logger.c | 2 +- src/logger.h | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/dmap_common.c b/src/dmap_common.c index 155f7853..ae25991c 100644 --- a/src/dmap_common.c +++ b/src/dmap_common.c @@ -187,7 +187,7 @@ dmap_send_error(struct evhttp_request *req, char *container, char *errmsg) evbuf = evbuffer_new(); if (!evbuf) { - DPRINTF(E_LOG, L_DAAP, "Could not allocate evbuffer for DAAP error\n"); + DPRINTF(E_LOG, L_DMAP, "Could not allocate evbuffer for DMAP error\n"); evhttp_send_error(req, HTTP_SERVUNAVAIL, "Internal Server Error"); return; @@ -198,7 +198,7 @@ dmap_send_error(struct evhttp_request *req, char *container, char *errmsg) ret = evbuffer_expand(evbuf, len); if (ret < 0) { - DPRINTF(E_LOG, L_DAAP, "Could not expand evbuffer for DAAP error\n"); + DPRINTF(E_LOG, L_DMAP, "Could not expand evbuffer for DMAP error\n"); evhttp_send_error(req, HTTP_SERVUNAVAIL, "Internal Server Error"); diff --git a/src/logger.c b/src/logger.c index 7e393732..dac82fe6 100644 --- a/src/logger.c +++ b/src/logger.c @@ -41,7 +41,7 @@ static int threshold; static int console; static char *logfilename; static FILE *logfile; -static char *labels[] = { "config", "daap", "db", "httpd", "main", "mdns", "misc", "rsp", "scan", "xcode", "event", "remote", "dacp", "ffmpeg", "artwork", "player", "raop", "laudio" }; +static char *labels[] = { "config", "daap", "db", "httpd", "main", "mdns", "misc", "rsp", "scan", "xcode", "event", "remote", "dacp", "ffmpeg", "artwork", "player", "raop", "laudio", "dmap" }; static int diff --git a/src/logger.h b/src/logger.h index 99cf6aea..0c849c65 100644 --- a/src/logger.h +++ b/src/logger.h @@ -24,8 +24,9 @@ #define L_PLAYER 15 #define L_RAOP 16 #define L_LAUDIO 17 +#define L_DMAP 18 -#define N_LOGDOMAINS 18 +#define N_LOGDOMAINS 19 /* Severities */ #define E_FATAL 0