* Internal backend socket protocol changed: uint32_t session-id added, see clixon_proto.h

* * Changed session-id handing. Instead of using pid of peer process, a proper session id generated by the server is used, following RFC6241.
This commit is contained in:
Olof hagsand 2019-10-19 19:52:09 +02:00
parent a387c599e2
commit b624e911b8
23 changed files with 230 additions and 155 deletions

View file

@ -110,7 +110,7 @@ main(int argc, char **argv)
char *xmlfilename = NULL;
char *dbdir = NULL;
int ret;
int pid;
uint32_t id;
enum operation_type op;
cxobj *xt = NULL;
int i;
@ -277,8 +277,8 @@ main(int argc, char **argv)
else if (strcmp(cmd, "lock")==0){
if (argc != 2)
usage(argv0);
pid = atoi(argv[1]);
if (xmldb_lock(h, db, pid) < 0)
id = atoi(argv[1]);
if (xmldb_lock(h, db, id) < 0)
goto done;
}
else if (strcmp(cmd, "unlock")==0){
@ -290,8 +290,8 @@ main(int argc, char **argv)
else if (strcmp(cmd, "unlock_all")==0){
if (argc != 2)
usage(argv0);
pid = atoi(argv[1]);
if (xmldb_unlock_all(h, pid) < 0)
id = atoi(argv[1]);
if (xmldb_unlock_all(h, id) < 0)
goto done;
}
else if (strcmp(cmd, "islocked")==0){