summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2011-01-02 23:54:20 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2011-01-02 23:54:20 +0100
commitb3c30578ae1709feb978b72d756d88c17941cad4 (patch)
treeacdc0cc563ba15b69bfbd77b4364ed94297d5311
parent4188dfb5d3e5e41a812d4e6cdbfca053b0cbd62b (diff)
Use send_data() in MusicTrack::render().
-rw-r--r--music.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/music.cpp b/music.cpp
index 3552f8e..fcc0daf 100644
--- a/music.cpp
+++ b/music.cpp
@@ -145,10 +145,6 @@ void MusicTrack::render(HTTP::Connection::p req) {
req->add_header("content-length", boost::str(boost::format("%d") % is.tellg()));
is.seekg(0, std::ios::beg);
- char data[0x1000];
- while(is.good()) {
- is.read(data, 0x1000);
- req->send_data(data, is.gcount());
- }
+ req->send_data(is);
}
}