aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/HttpdClient.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-12-31 16:32:33 +0100
committerMax Kellermann <max@duempel.org>2013-12-31 16:32:33 +0100
commit8b65b524d50590db13818affdcc6ceffa4c23d19 (patch)
tree570ee79ba5f061f1304537d545fa96d17fcad234 /src/output/HttpdClient.cxx
parentf1ac2cd33642fff7fcf0981add7594a45c832e25 (diff)
downloadmpd-8b65b524d50590db13818affdcc6ceffa4c23d19.tar.gz
mpd-8b65b524d50590db13818affdcc6ceffa4c23d19.tar.xz
mpd-8b65b524d50590db13818affdcc6ceffa4c23d19.zip
output/httpd: use reference instead of pointer
Diffstat (limited to '')
-rw-r--r--src/output/HttpdClient.cxx22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/output/HttpdClient.cxx b/src/output/HttpdClient.cxx
index 8e13fda38..f7ddb74e1 100644
--- a/src/output/HttpdClient.cxx
+++ b/src/output/HttpdClient.cxx
@@ -48,13 +48,13 @@ HttpdClient::~HttpdClient()
void
HttpdClient::Close()
{
- httpd->RemoveClient(*this);
+ httpd.RemoveClient(*this);
}
void
HttpdClient::LockClose()
{
- const ScopeLock protect(httpd->mutex);
+ const ScopeLock protect(httpd.mutex);
Close();
}
@@ -67,7 +67,7 @@ HttpdClient::BeginResponse()
current_page = nullptr;
if (!head_method)
- httpd->SendHeader(*this);
+ httpd.SendHeader(*this);
}
/**
@@ -155,13 +155,13 @@ HttpdClient::SendResponse()
"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);
+ httpd.content_type);
} else if (metadata_requested) {
char *metadata_header =
- icy_server_metadata_header(httpd->name, httpd->genre,
- httpd->website,
- httpd->content_type,
+ icy_server_metadata_header(httpd.name, httpd.genre,
+ httpd.website,
+ httpd.content_type,
metaint);
g_strlcpy(buffer, metadata_header, sizeof(buffer));
@@ -176,7 +176,7 @@ HttpdClient::SendResponse()
"Pragma: no-cache\r\n"
"Cache-Control: no-cache, no-store\r\n"
"\r\n",
- httpd->content_type);
+ httpd.content_type);
}
ssize_t nbytes = SocketMonitor::Write(buffer, strlen(buffer));
@@ -192,7 +192,7 @@ HttpdClient::SendResponse()
return true;
}
-HttpdClient::HttpdClient(HttpdOutput *_httpd, int _fd, EventLoop &_loop,
+HttpdClient::HttpdClient(HttpdOutput &_httpd, int _fd, EventLoop &_loop,
bool _metadata_supported)
:BufferedSocket(_fd, _loop),
httpd(_httpd),
@@ -262,7 +262,7 @@ HttpdClient::GetBytesTillMetaData() const
inline bool
HttpdClient::TryWrite()
{
- const ScopeLock protect(httpd->mutex);
+ const ScopeLock protect(httpd.mutex);
assert(state == RESPONSE);
@@ -270,7 +270,7 @@ HttpdClient::TryWrite()
if (pages.empty()) {
/* another thread has removed the event source
while this thread was waiting for
- httpd->mutex */
+ httpd.mutex */
CancelWrite();
return true;
}