Define API_VERSION
This commit is contained in:
parent
246058891b
commit
9a00b28279
@ -602,8 +602,9 @@ static enum error api_cmd_auth(const char *uname, const char *pass,
|
|||||||
char buffer[API_BUFSIZE];
|
char buffer[API_BUFSIZE];
|
||||||
long code;
|
long code;
|
||||||
size_t res_len = api_send(buffer, snprintf(buffer, sizeof(buffer),
|
size_t res_len = api_send(buffer, snprintf(buffer, sizeof(buffer),
|
||||||
"AUTH user=%s&pass=%B&protover=3&client=caniadd&clientver="
|
"AUTH user=%s&pass=%B&protover=" API_VERSION "&client=caniadd&"
|
||||||
PROG_VERSION "&enc=UTF-8", uname, pass), sizeof(buffer));
|
"clientver=" PROG_VERSION "&enc=UTF-8", uname, pass),
|
||||||
|
sizeof(buffer));
|
||||||
enum error err = NOERR;
|
enum error err = NOERR;
|
||||||
|
|
||||||
if (res_len == -1) {
|
if (res_len == -1) {
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
#include "error.h"
|
#include "error.h"
|
||||||
|
|
||||||
|
#define API_VERSION "3"
|
||||||
|
|
||||||
/* Maximum length of one response/request */
|
/* Maximum length of one response/request */
|
||||||
#define API_BUFSIZE 1400
|
#define API_BUFSIZE 1400
|
||||||
/* Session key maximum size, including '\0' */
|
/* Session key maximum size, including '\0' */
|
||||||
|
Loading…
Reference in New Issue
Block a user