Commit d0fc3d48 authored by Jean-Francois Dockes's avatar Jean-Francois Dockes
Browse files

1.2.9: fix protocolinfo data format, broken earlier in the 1.2 series

parent e4234d5b
AC_INIT([upmpdcli], [1.2.8], [jfd@lesbonscomptes.com],
AC_INIT([upmpdcli], [1.2.9], [jfd@lesbonscomptes.com],
[upmpdcli], [http://www.lesbonscomptes.com/upmpdcli])
AC_PREREQ([2.53])
AC_CONFIG_SRCDIR([src/upmpd.cxx])
......
upmpdcli (1.2.9-1) unstable; urgency=low
* Fix bug in format of protocolinfo data
-- Jean-Francois Dockes <jf@dockes.org> Mon, 14 Oct 2016 12:56:00 +0200
upmpdcli (1.2.8-1) unstable; urgency=low
* Small fix in qobuz module.
......
= Upmpdcli release notes
== Upmpdcli 1.2.6/7
== Upmpdcli 1.2.6/7/8/9
- Small fixes (qobuz), added protocolinfo entries, etc. Tidal is at 1.2.7
because of a last minute Rasbian wheezy compatibility tweak.
- Small fixes (qobuz,tidal), added protocolinfo entries, etc.
- 1.2.9 fixes a bug in the format of the protocolinfo data sent to the
control points.
== Upmpdcli 1.2.5
......
Summary: UPnP Media Renderer front-end to MPD, the Music Player Daemon
Name: upmpdcli
Version: 1.2.6
Version: 1.2.9
Release: 1%{?dist}
Group: Applications/Multimedia
License: GPLv2+
......
......@@ -206,9 +206,11 @@ static vector<const char *> ohxmlfilenames =
*/
static bool read_protocolinfo(const string& fn, bool enableL16, string& out)
{
LOGDEB1("read_protocolinfo: fn " << fn << "\n");
ifstream input;
input.open(fn, ios::in);
if (!input.is_open()) {
LOGERR("read_protocolinfo: open failed: " << fn << "\n");
return false;
}
bool eof = false;
......@@ -217,6 +219,7 @@ static bool read_protocolinfo(const string& fn, bool enableL16, string& out)
getline(input, line);
if (!input.good()) {
if (input.bad()) {
LOGERR("read_protocolinfo: read error: " << fn << "\n");
return false;
}
// Must be eof ? But maybe we have a partial line which
......@@ -225,18 +228,22 @@ static bool read_protocolinfo(const string& fn, bool enableL16, string& out)
eof = true;
}
trimstring(line, " \t\n\r,");
line += ',';
if (enableL16 && line[0] == '@') {
line = regsub1("@ENABLEL16@", line, "");
} else {
line = regsub1("@ENABLEL16@", line, "#");
if (!line.empty()) {
if (enableL16 && line[0] == '@') {
line = regsub1("@ENABLEL16@", line, "");
} else {
line = regsub1("@ENABLEL16@", line, "#");
}
if (line[0] == '#')
continue;
out += line + ',';
}
if (line[0] == '#')
continue;
out += line;
if (eof)
break;
}
trimstring(out, ",");
LOGDEB0("read_protocolinfo data: [" << out << "]\n");
return true;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment