[rygel] core: Time seek header must be locale-independent
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Time seek header must be locale-independent
- Date: Fri, 18 Mar 2011 14:03:13 +0000 (UTC)
commit 98d8cc64af3b9195249a49bace9f06814fb9d8d2
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Fri Mar 18 16:01:44 2011 +0200
core: Time seek header must be locale-independent
src/rygel/rygel-http-time-seek.vala | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-http-time-seek.vala b/src/rygel/rygel-http-time-seek.vala
index 7650a1e..b7e67e7 100644
--- a/src/rygel/rygel-http-time-seek.vala
+++ b/src/rygel/rygel-http-time-seek.vala
@@ -97,7 +97,13 @@ internal class Rygel.HTTPTimeSeek : Rygel.HTTPSeek {
double stop = (double) this.stop / SECOND;
double total = (double) this.total_length / SECOND;
- var range = "npt=%.2f-%.2f/%.2f".printf (start, stop, total);
+ var start_str = new char[double.DTOSTR_BUF_SIZE];
+ var stop_str = new char[double.DTOSTR_BUF_SIZE];
+ var total_str = new char[double.DTOSTR_BUF_SIZE];
+
+ var range = "npt=" + start.format (start_str, "%.2f") + "-" +
+ stop.format (stop_str, "%.2f") + "/" +
+ total.format (total_str, "%.2f");
this.msg.response_headers.append ("TimeSeekRange.dlna.org", range);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]