[mpd] Make protocol version a #define
This commit is contained in:
parent
6b55ee2890
commit
1e485f7d28
11
src/mpd.c
11
src/mpd.c
|
@ -51,6 +51,10 @@
|
||||||
#include "player.h"
|
#include "player.h"
|
||||||
#include "remote_pairing.h"
|
#include "remote_pairing.h"
|
||||||
|
|
||||||
|
// According to the mpd protocol send "OK MPD <version>\n" to the client, where
|
||||||
|
// version is the version of the supported mpd protocol and not the server version
|
||||||
|
#define MPD_PROTOCOL_VERSION_OK "OK MPD 0.22.4\n"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* from MPD source:
|
* from MPD source:
|
||||||
* *
|
* *
|
||||||
|
@ -4751,11 +4755,8 @@ mpd_accept_conn_cb(struct evconnlistener *listener,
|
||||||
|
|
||||||
client_ctx->binarylimit = MPD_BINARY_SIZE;
|
client_ctx->binarylimit = MPD_BINARY_SIZE;
|
||||||
|
|
||||||
/*
|
// No zero terminator (newline in the string is terminator)
|
||||||
* According to the mpd protocol send "OK MPD <version>\n" to the client, where version is the version
|
evbuffer_add(client_ctx->evbuffer, MPD_PROTOCOL_VERSION_OK, strlen(MPD_PROTOCOL_VERSION_OK));
|
||||||
* of the supported mpd protocol and not the server version.
|
|
||||||
*/
|
|
||||||
evbuffer_add(client_ctx->evbuffer, "OK MPD 0.22.4\n", 14);
|
|
||||||
|
|
||||||
DPRINTF(E_INFO, L_MPD, "New mpd client connection accepted\n");
|
DPRINTF(E_INFO, L_MPD, "New mpd client connection accepted\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue