diff options
author | Max Kellermann <max@duempel.org> | 2013-09-05 09:21:53 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-09-05 09:21:53 +0200 |
commit | fccba1af2aae9a90f117b3ae2232f5b60a7e9f63 (patch) | |
tree | efe637caeb4fa6ef57b2532f16e25987098c72dc /src/output/HttpdClient.cxx | |
parent | 26d92c80ed1c1cca8b3cb1c9793c09a330c25623 (diff) | |
download | mpd-fccba1af2aae9a90f117b3ae2232f5b60a7e9f63.tar.gz mpd-fccba1af2aae9a90f117b3ae2232f5b60a7e9f63.tar.xz mpd-fccba1af2aae9a90f117b3ae2232f5b60a7e9f63.zip |
use standard snprintf() instead of GLib g_snprintf()
Diffstat (limited to 'src/output/HttpdClient.cxx')
-rw-r--r-- | src/output/HttpdClient.cxx | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/output/HttpdClient.cxx b/src/output/HttpdClient.cxx index 9ed7805dc..e776d526b 100644 --- a/src/output/HttpdClient.cxx +++ b/src/output/HttpdClient.cxx @@ -131,18 +131,18 @@ HttpdClient::SendResponse() assert(state == RESPONSE); if (dlna_streaming_requested) { - g_snprintf(buffer, sizeof(buffer), - "HTTP/1.1 206 OK\r\n" - "Content-Type: %s\r\n" - "Content-Length: 10000\r\n" - "Content-RangeX: 0-1000000/1000000\r\n" - "transferMode.dlna.org: Streaming\r\n" - "Accept-Ranges: bytes\r\n" - "Connection: close\r\n" - "realTimeInfo.dlna.org: DLNA.ORG_TLAG=*\r\n" - "contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0\r\n" - "\r\n", - httpd->content_type); + snprintf(buffer, sizeof(buffer), + "HTTP/1.1 206 OK\r\n" + "Content-Type: %s\r\n" + "Content-Length: 10000\r\n" + "Content-RangeX: 0-1000000/1000000\r\n" + "transferMode.dlna.org: Streaming\r\n" + "Accept-Ranges: bytes\r\n" + "Connection: close\r\n" + "realTimeInfo.dlna.org: DLNA.ORG_TLAG=*\r\n" + "contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0\r\n" + "\r\n", + httpd->content_type); } else if (metadata_requested) { gchar *metadata_header; @@ -158,14 +158,14 @@ HttpdClient::SendResponse() g_free(metadata_header); } else { /* revert to a normal HTTP request */ - g_snprintf(buffer, sizeof(buffer), - "HTTP/1.1 200 OK\r\n" - "Content-Type: %s\r\n" - "Connection: close\r\n" - "Pragma: no-cache\r\n" - "Cache-Control: no-cache, no-store\r\n" - "\r\n", - httpd->content_type); + snprintf(buffer, sizeof(buffer), + "HTTP/1.1 200 OK\r\n" + "Content-Type: %s\r\n" + "Connection: close\r\n" + "Pragma: no-cache\r\n" + "Cache-Control: no-cache, no-store\r\n" + "\r\n", + httpd->content_type); } ssize_t nbytes = SocketMonitor::Write(buffer, strlen(buffer)); |