Define API_VERSION

This commit is contained in:
x3 2022-01-09 13:09:40 +01:00
parent 246058891b
commit 9a00b28279
Signed by: x3
GPG Key ID: 7E9961E8AD0E240E
2 changed files with 5 additions and 2 deletions

View File

@ -602,8 +602,9 @@ static enum error api_cmd_auth(const char *uname, const char *pass,
char buffer[API_BUFSIZE];
long code;
size_t res_len = api_send(buffer, snprintf(buffer, sizeof(buffer),
"AUTH user=%s&pass=%B&protover=3&client=caniadd&clientver="
PROG_VERSION "&enc=UTF-8", uname, pass), sizeof(buffer));
"AUTH user=%s&pass=%B&protover=" API_VERSION "&client=caniadd&"
"clientver=" PROG_VERSION "&enc=UTF-8", uname, pass),
sizeof(buffer));
enum error err = NOERR;
if (res_len == -1) {

View File

@ -5,6 +5,8 @@
#include "error.h"
#define API_VERSION "3"
/* Maximum length of one response/request */
#define API_BUFSIZE 1400
/* Session key maximum size, including '\0' */