Mercurial > geeqie.yaz
diff src/remote.c @ 673:fbebf5cf4a55
Do not use printf() directly but use new wrapper function log_printf() instead.
author | zas_ |
---|---|
date | Fri, 16 May 2008 12:16:49 +0000 |
parents | 8268cbe682f1 |
children | c0dda0ffb931 |
line wrap: on
line diff
--- a/src/remote.c Fri May 16 12:08:51 2008 +0000 +++ b/src/remote.c Fri May 16 12:16:49 2008 +0000 @@ -92,7 +92,7 @@ if (error) { - printf("error reading socket: %s\n", error->message); + log_printf("error reading socket: %s\n", error->message); g_error_free(error); } @@ -131,7 +131,7 @@ if (g_list_length(rc->clients) > SERVER_MAX_CLIENTS) { - printf("maximum remote clients of %d exceeded, closing connection\n", SERVER_MAX_CLIENTS); + log_printf("maximum remote clients of %d exceeded, closing connection\n", SERVER_MAX_CLIENTS); close(fd); return; } @@ -172,7 +172,7 @@ fd = accept(rc->fd, NULL, &alen); if (fd == -1) { - printf("error accepting socket: %s\n", strerror(errno)); + log_printf("error accepting socket: %s\n", strerror(errno)); return TRUE; } @@ -206,7 +206,7 @@ if (remote_server_exists(path)) { - printf("Address already in use: %s\n", path); + log_printf("Address already in use: %s\n", path); return NULL; } @@ -219,7 +219,7 @@ if (bind(fd, &addr, sizeof(addr)) == -1 || listen(fd, REMOTE_SERVER_BACKLOG) == -1) { - printf("error subscribing to socket: %s\n", strerror(errno)); + log_printf("error subscribing to socket: %s\n", strerror(errno)); close(fd); return NULL; } @@ -314,11 +314,11 @@ { if (sigpipe_occured) { - printf("SIGPIPE writing to socket: %s\n", rc->path); + log_printf("SIGPIPE writing to socket: %s\n", rc->path); } else { - printf("error writing to socket: %s\n", strerror(errno)); + log_printf("error writing to socket: %s\n", strerror(errno)); } ret = FALSE;; } @@ -493,7 +493,7 @@ } else { - printf("remote sent filename that does not exist:\"%s\"\n", filename); + log_printf("remote sent filename that does not exist:\"%s\"\n", filename); } g_free(filename); @@ -644,7 +644,7 @@ } else { - printf("unknown remote command:%s\n", text); + log_printf("unknown remote command:%s\n", text); } }