From d384f3c395989fb8d2fa85c7968beb9fbe202e56 Mon Sep 17 00:00:00 2001 From: Julien BLACHE Date: Fri, 8 May 2009 17:52:56 +0200 Subject: [PATCH] Rename E_INF to E_INFO --- src/conffile.c | 4 ++-- src/db-sql.c | 2 +- src/filescanner.c | 2 +- src/filescanner_m3u.c | 6 +++--- src/httpd.c | 8 ++++---- src/logger.h | 3 --- src/scan-wma.c | 16 ++++++++-------- src/smart-parser.c | 2 +- 8 files changed, 20 insertions(+), 23 deletions(-) diff --git a/src/conffile.c b/src/conffile.c index 5a8b6a86..8cdd4ce6 100644 --- a/src/conffile.c +++ b/src/conffile.c @@ -81,7 +81,7 @@ cb_loglevel(cfg_t *cfg, cfg_opt_t *opt, const char *value, void *result) else if (strcasecmp(value, "warning") == 0) *(long int *)result = E_WARN; else if (strcasecmp(value, "info") == 0) - *(long int *)result = E_INF; + *(long int *)result = E_INFO; else if (strcasecmp(value, "debug") == 0) *(long int *)result = E_DBG; else if (strcasecmp(value, "spam") == 0) @@ -253,7 +253,7 @@ conffile_load(char *file) nlib = cfg_size(cfg, "library"); - DPRINTF(E_INF, L_CONF, "%d music libraries configured\n", nlib); + DPRINTF(E_INFO, L_CONF, "%d music libraries configured\n", nlib); libports = (int *)malloc(nlib * sizeof(int)); memset(libports, 0, (nlib * sizeof(int))); diff --git a/src/db-sql.c b/src/db-sql.c index f88770b8..467d657a 100644 --- a/src/db-sql.c +++ b/src/db-sql.c @@ -1628,7 +1628,7 @@ int db_sql_get_count(char **pe, int *count, CountType_t type) { int db_sql_playcount_increment(char **pe, int id) { time_t now = time(NULL); - return db_sql_exec_fn(pe,E_INF,"update songs set play_count=play_count + 1" + return db_sql_exec_fn(pe,E_INFO,"update songs set play_count=play_count + 1" ", time_played=%d where id=%d",now,id); } diff --git a/src/filescanner.c b/src/filescanner.c index 36113499..2b7294e5 100644 --- a/src/filescanner.c +++ b/src/filescanner.c @@ -352,7 +352,7 @@ defer_playlist(char *path) pl->next = playlists; playlists = pl; - DPRINTF(E_INF, L_SCAN, "Deferred playlist %s\n", path); + DPRINTF(E_INFO, L_SCAN, "Deferred playlist %s\n", path); } /* Thread: scan */ diff --git a/src/filescanner_m3u.c b/src/filescanner_m3u.c index 84b9d91d..1ead3bdf 100644 --- a/src/filescanner_m3u.c +++ b/src/filescanner_m3u.c @@ -57,7 +57,7 @@ scan_m3u_playlist(char *file) int pl_id; int ret; - DPRINTF(E_INF, L_SCAN, "Processing static playlist: %s\n", file); + DPRINTF(E_INFO, L_SCAN, "Processing static playlist: %s\n", file); ret = stat(file, &sb); if (ret < 0) @@ -142,7 +142,7 @@ scan_m3u_playlist(char *file) return; } - DPRINTF(E_INF, L_SCAN, "Added playlist as id %d\n", pl_id); + DPRINTF(E_INFO, L_SCAN, "Added playlist as id %d\n", pl_id); while (fgets(buf, sizeof(buf), fp) != NULL) { @@ -222,5 +222,5 @@ scan_m3u_playlist(char *file) fclose(fp); - DPRINTF(E_INF, L_SCAN, "Done processing playlist\n"); + DPRINTF(E_INFO, L_SCAN, "Done processing playlist\n"); } diff --git a/src/httpd.c b/src/httpd.c index c15a3816..dba0bcb0 100644 --- a/src/httpd.c +++ b/src/httpd.c @@ -335,7 +335,7 @@ httpd_stream_file(struct evhttp_request *req, int id) if (transcode) { - DPRINTF(E_INF, L_HTTPD, "Preparing to transcode %s\n", mfi->path); + DPRINTF(E_INFO, L_HTTPD, "Preparing to transcode %s\n", mfi->path); stream_cb = stream_chunk_xcode_cb; st->fd = -1; @@ -358,7 +358,7 @@ httpd_stream_file(struct evhttp_request *req, int id) else { /* Stream the raw file */ - DPRINTF(E_INF, L_HTTPD, "Preparing to stream %s\n", mfi->path); + DPRINTF(E_INFO, L_HTTPD, "Preparing to stream %s\n", mfi->path); stream_cb = stream_chunk_raw_cb; @@ -492,7 +492,7 @@ httpd_stream_file(struct evhttp_request *req, int id) req->fail_cb = stream_fail_cb; req->fail_cb_arg = st; - DPRINTF(E_INF, L_HTTPD, "Kicking off streaming for %s\n", mfi->path); + DPRINTF(E_INFO, L_HTTPD, "Kicking off streaming for %s\n", mfi->path); db_dispose_item(mfi); } @@ -1005,7 +1005,7 @@ httpd_init(void) /* evhttp doesn't support IPv6 yet, so this is expected to fail */ bindv6 = evhttp_bind_socket(evhttpd, "::", port); if (bindv6 < 0) - DPRINTF(E_INF, L_HTTPD, "Could not bind IN6ADDR_ANY:%d (that's OK)\n", port); + DPRINTF(E_INFO, L_HTTPD, "Could not bind IN6ADDR_ANY:%d (that's OK)\n", port); ret = evhttp_bind_socket(evhttpd, "0.0.0.0", port); if (ret < 0) diff --git a/src/logger.h b/src/logger.h index ede857d5..3e639323 100644 --- a/src/logger.h +++ b/src/logger.h @@ -28,9 +28,6 @@ #define E_DBG 4 #define E_SPAM 5 -/* Will go away */ -#define E_INF E_INFO - void DPRINTF(int severity, int domain, char *fmt, ...); diff --git a/src/scan-wma.c b/src/scan-wma.c index 9ea5d74f..878f7e49 100644 --- a/src/scan-wma.c +++ b/src/scan-wma.c @@ -866,13 +866,13 @@ char *wma_utf16toutf8(unsigned char *utf16, int len) { src += 2; if((w1 & 0xFC00) == 0xD800) { /* could be surrogate pair */ if(src+2 > utf16+len) { - DPRINTF(E_INF,L_SCAN,"Invalid utf-16 in file\n"); + DPRINTF(E_INFO,L_SCAN,"Invalid utf-16 in file\n"); free(utf8); return NULL; } w2 = src[3] << 8 | src[2]; if((w2 & 0xFC00) != 0xDC00) { - DPRINTF(E_INF,L_SCAN,"Invalid utf-16 in file\n"); + DPRINTF(E_INFO,L_SCAN,"Invalid utf-16 in file\n"); free(utf8); return NULL; } @@ -996,7 +996,7 @@ int scan_get_wmainfo(char *filename, MP3FILE *pmp3) { fd = open(filename, O_RDONLY); if (fd < 0) { - DPRINTF(E_INF,L_SCAN,"Error opening WMA file (%s): %s\n",filename, + DPRINTF(E_INFO,L_SCAN,"Error opening WMA file (%s): %s\n",filename, strerror(errno)); return FALSE; } @@ -1004,7 +1004,7 @@ int scan_get_wmainfo(char *filename, MP3FILE *pmp3) { len = sizeof(hdr); ret = read(fd, &hdr, len); if((ret < 0) || (ret != len)) { - DPRINTF(E_INF,L_SCAN,"Error reading from %s: %s\n",filename, + DPRINTF(E_INFO,L_SCAN,"Error reading from %s: %s\n",filename, strerror(errno)); close(fd); return FALSE; @@ -1012,7 +1012,7 @@ int scan_get_wmainfo(char *filename, MP3FILE *pmp3) { pguid = wma_find_guid(hdr.objectid); if(!pguid) { - DPRINTF(E_INF,L_SCAN,"Could not find header in %s\n",filename); + DPRINTF(E_INFO,L_SCAN,"Could not find header in %s\n",filename); close(fd); return FALSE; } @@ -1032,7 +1032,7 @@ int scan_get_wmainfo(char *filename, MP3FILE *pmp3) { for(item=0; item < (int) hdr.objects; item++) { if(!lseek(fd,offset,SEEK_SET)) { - DPRINTF(E_INF,L_SCAN,"Error seeking in %s\n",filename); + DPRINTF(E_INFO,L_SCAN,"Error seeking in %s\n",filename); close(fd); return FALSE; } @@ -1040,7 +1040,7 @@ int scan_get_wmainfo(char *filename, MP3FILE *pmp3) { len = sizeof(subhdr); ret = read(fd, &subhdr, len); if((ret < 0) || (ret != len)) { - DPRINTF(E_INF,L_SCAN,"Error reading from %s: %s\n",filename, + DPRINTF(E_INFO,L_SCAN,"Error reading from %s: %s\n",filename, strerror(errno)); close(fd); return FALSE; @@ -1086,7 +1086,7 @@ int scan_get_wmainfo(char *filename, MP3FILE *pmp3) { if(!res) { - DPRINTF(E_INF,L_SCAN,"Error reading meta info for file %s\n", + DPRINTF(E_INFO,L_SCAN,"Error reading meta info for file %s\n", filename); } else { DPRINTF(E_DBG,L_SCAN,"Successfully parsed file\n"); diff --git a/src/smart-parser.c b/src/smart-parser.c index b3891ffc..cd585367 100644 --- a/src/smart-parser.c +++ b/src/smart-parser.c @@ -635,7 +635,7 @@ int sp_scan(PARSETREE tree, int hint) { if(is_qstr) { tree->current++; /* absorb it */ } else { - DPRINTF(E_INF,L_PARSE,"Missing closing quotes\n"); + DPRINTF(E_INFO,L_PARSE,"Missing closing quotes\n"); if(tree->token.token_id & 0x2000) { free(tree->token.data.cvalue); }