There is now a new user management window. From here you can add and
remove users or modify their settings.
+* Changes up to version 3.0.2
+
+Builds --without-server should work again.
+
+The web interface is a bit more liberal in the cookie value syntax it
+will accept.
+
+* Changes up to version 3.0.1
+
+Debian upgrades from 2.0.x should now work better.
+
* Changes up to version 3.0
Important! See README.upgrades when upgrading.
fi
fi
+AM_CONDITIONAL([SERVER], [test x$want_server = xyes])
+
if test "x$GCC" = xyes; then
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478
AC_CACHE_CHECK([checking for GCC bug 29478],[rjk_cv_pr29478],[
Architecture: any
Section: sound
Priority: extra
-Depends: disorder,httpd-cgi,sox,debconf,mktemp,${shlibs:Depends}
+Depends: disorder,httpd-cgi,sox,debconf,${shlibs:Depends}
Suggests: disorder-playrtp,disobedience
Description: Play random or selected digital audio files continuously
DisOrder is a software jukebox. It can play OGG, MP3, WAV and FLAC files,
#! /bin/sh
#
# This file is part of DisOrder
-# Copyright (C) 2004 Richard Kettlewell
+# Copyright (C) 2008 Richard Kettlewell
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
#
-set -e
-/etc/init.d/disorder stop
+set -
+case "$1" in
+upgrade )
+ /etc/init.d/disorder stop
+ ;;
+failed-upgrade )
+ # Upgrading from 2.0 to 3.0.x can provoke this problem. The 2.0
+ # init script attempts to run disorder(1) but that isn't ready to go
+ # get as users.db has not been created. Therefore old-prerm upgrade
+ # fails and dpkg tries new-prerm failed-upgrade instead.
+ start-stop-daemon -K -q -n disorderd
+ ;;
+esac
include_HEADERS=disorder.h
noinst_PROGRAMS=test
+if SERVER
+TRACKDB=trackdb.c
+else
+TRACKDB=trackdb-stub.c
+endif
+
libdisorder_a_SOURCES=charset.c charset.h \
addr.c addr.h \
alsabg.c alsabg.h \
types.h \
table.c table.h \
timeval.h \
- trackdb.h trackdb.c trackdb-int.h \
+ $(TRACKDB) trackdb.h trackdb-int.h \
trackname.c trackname.h \
url.h url.c \
user.h user.c \
mv $@.new $@
CLEANFILES=definitions.h definitions.h.new
+
+EXTRA_DIST=trackdb.c trackdb-stub.c
}
}
+/** @brief Match cookie value separator characters
+ *
+ * Same as cookie_separator() but allows for @c = in cookie values.
+ */
+static int cookie_value_separator(int c) {
+ switch(c) {
+ case '(':
+ case ')':
+ case ',':
+ case ';':
+ case ' ':
+ case '"':
+ case '\t':
+ return 1;
+
+ default:
+ return 0;
+ }
+}
+
/** @brief Parse a RFC2109 Cookie: header
* @param s Header field value
* @param cd Where to store result
return -1;
}
s = skipwhite(s, 0);
- if(!(s = mime_parse_word(s, &v, cookie_separator))) {
+ if(!(s = mime_parse_word(s, &v, cookie_value_separator))) {
error(0, "parse_cookie: cannot parse value for '%s'", n);
return -1;
}
/* These are the examples from RFC2109 */
insist(!parse_cookie("$Version=\"1\"; Customer=\"WILE_E_COYOTE\"; $Path=\"/acme\"", cd));
insist(!strcmp(cd->version, "1"));
- insist(cd->ncookies = 1);
+ insist(cd->ncookies == 1);
insist(find_cookie(cd, "Customer") == &cd->cookies[0]);
check_string(cd->cookies[0].value, "WILE_E_COYOTE");
check_string(cd->cookies[0].path, "/acme");
"Customer=\"WILE_E_COYOTE\"; $Path=\"/acme\";\n"
"Part_Number=\"Rocket_Launcher_0001\"; $Path=\"/acme\"",
cd));
- insist(cd->ncookies = 2);
+ insist(cd->ncookies == 2);
insist(find_cookie(cd, "Customer") == &cd->cookies[0]);
insist(find_cookie(cd, "Part_Number") == &cd->cookies[1]);
check_string(cd->cookies[0].value, "WILE_E_COYOTE");
"Part_Number=\"Rocket_Launcher_0001\"; $Path=\"/acme\";\n"
"Shipping=\"FedEx\"; $Path=\"/acme\"",
cd));
- insist(cd->ncookies = 3);
+ insist(cd->ncookies == 3);
insist(find_cookie(cd, "Customer") == &cd->cookies[0]);
insist(find_cookie(cd, "Part_Number") == &cd->cookies[1]);
insist(find_cookie(cd, "Shipping") == &cd->cookies[2]);
check_string(cd->cookies[2].value, "FedEx");
check_string(cd->cookies[2].path, "/acme");
insist(cd->cookies[2].domain == 0);
+
+ insist(!parse_cookie("BX=brqn3il3r9jro&b=3&s=vv", cd));
+ insist(cd->ncookies == 1);
+ insist(find_cookie(cd, "BX") == &cd->cookies[0]);
+ check_string(cd->cookies[0].value, "brqn3il3r9jro&b=3&s=vv");
+ insist(cd->cookies[0].path == 0);
+ insist(cd->cookies[0].domain == 0);
}
/*
--- /dev/null
+/*
+ * This file is part of DisOrder
+ * Copyright (C) 2008 Richard Kettlewell
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA
+ */
+/** @file lib/trackdb-stub.c
+ * @brief Track database stubs
+ *
+ * Stubs for non-server builds
+ */
+
+#include <config.h>
+#include "types.h"
+
+#include <pcre.h>
+
+#include "rights.h"
+#include "trackdb.h"
+
+const char *trackdb_get_password(const char attribute((unused)) *user) {
+ return NULL;
+}
+
+void trackdb_close(void) {
+}
+
+void trackdb_open(int attribute((unused)) flags) {
+}
+
+void trackdb_init(int attribute((unused)) flags) {
+}
+
+/*
+Local Variables:
+c-basic-offset:2
+comment-column:40
+fill-column:79
+indent-tabs-mode:nil
+End:
+*/