chiark
/
gitweb
/
~mdw
/
disorder
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
'collection' no longer requires an encoding to be specified (or a module).
[disorder]
/
lib
/
client.c
diff --git
a/lib/client.c
b/lib/client.c
index 8147c6dbbab028fd9b4bd830f6f57a56f125613e..1dac922363ab7edbe2e6fdbf02384021cc1ab156 100644
(file)
--- a/
lib/client.c
+++ b/
lib/client.c
@@
-20,7
+20,7
@@
/** @file lib/client.c
* @brief Simple C client
*
/** @file lib/client.c
* @brief Simple C client
*
- * See @
file
lib/eclient.c for an asynchronous-capable client
+ * See @
ref
lib/eclient.c for an asynchronous-capable client
* implementation.
*/
* implementation.
*/
@@
-165,6
+165,10
@@
static int disorder_simple_v(disorder_client *c,
const char *arg;
struct dynstr d;
const char *arg;
struct dynstr d;
+ if(!c->fpout) {
+ error(0, "not connected to server");
+ return -1;
+ }
if(cmd) {
dynstr_init(&d);
dynstr_append_string(&d, cmd);
if(cmd) {
dynstr_init(&d);
dynstr_append_string(&d, cmd);
@@
-735,7
+739,7
@@
static void pref_error_handler(const char *msg,
error(0, "error handling 'prefs' reply: %s", msg);
}
error(0, "error handling 'prefs' reply: %s", msg);
}
-/** @
param
Get all preferences for a trcak
+/** @
brief
Get all preferences for a trcak
* @param c Client
* @param track Track name
* @param kp Where to store linked list of preferences
* @param c Client
* @param track Track name
* @param kp Where to store linked list of preferences
@@
-859,7
+863,7
@@
int disorder_random_disable(disorder_client *c) {
/** @brief Test whether random play is enabled
* @param c Client
/** @brief Test whether random play is enabled
* @param c Client
- * @param e
xists
p Where to store result (non-0 iff enabled)
+ * @param e
nabled
p Where to store result (non-0 iff enabled)
* @return 0 on success, non-0 on error
*/
int disorder_random_enabled(disorder_client *c, int *enabledp) {
* @return 0 on success, non-0 on error
*/
int disorder_random_enabled(disorder_client *c, int *enabledp) {
@@
-949,7
+953,7
@@
int disorder_part(disorder_client *c, char **partp,
/** @brief Resolve aliases
* @param c Client
/** @brief Resolve aliases
* @param c Client
- * @param track
k
p Where to store canonical name (UTF-8)
+ * @param trackp Where to store canonical name (UTF-8)
* @param track Track name (UTF-8)
* @return 0 on success, non-0 on error
*/
* @param track Track name (UTF-8)
* @return 0 on success, non-0 on error
*/
@@
-1118,7
+1122,6
@@
int disorder_edituser(disorder_client *c, const char *user,
* @param user Username
* @param password Password
* @param email Email address (UTF-8)
* @param user Username
* @param password Password
* @param email Email address (UTF-8)
- * @param rights Initial rights or NULL to use default
* @param confirmp Where to store confirmation string
* @return 0 on success, non-0 on error
*/
* @param confirmp Where to store confirmation string
* @return 0 on success, non-0 on error
*/
@@
-1149,6
+1152,14
@@
int disorder_make_cookie(disorder_client *c, char **cookiep) {
cookiep);
}
cookiep);
}
+/** @brief Revoke the cookie used by this session
+ * @param c Client
+ * @return 0 on success, non-0 on error
+ */
+int disorder_revoke(disorder_client *c) {
+ return disorder_simple(c, 0, "revoke", (char *)0);
+}
+
/*
Local Variables:
c-basic-offset:2
/*
Local Variables:
c-basic-offset:2