mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-14 18:57:07 -07:00
Ctrl Request
This commit is contained in:
parent
640889eea3
commit
7333044a19
6 changed files with 190 additions and 14 deletions
12
gui/main.c
12
gui/main.c
|
@ -6,9 +6,9 @@
|
|||
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
if(argc != 6)
|
||||
if(argc != 7)
|
||||
{
|
||||
printf("Usage: %s <host> <registkey> <ostype> <auth> <morning (base64)>\n", argv[0]);
|
||||
printf("Usage: %s <host> <registkey> <ostype> <auth> <morning (base64)> <did>\n", argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,14 @@ int main(int argc, const char *argv[])
|
|||
return 1;
|
||||
}
|
||||
|
||||
size_t did_size = sizeof(connect_info.did);
|
||||
err = chiaki_base64_decode(argv[6], strlen(argv[6]), connect_info.did, &did_size);
|
||||
if(err != CHIAKI_ERR_SUCCESS || did_size != sizeof(connect_info.did))
|
||||
{
|
||||
printf("did invalid.\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
ChiakiSession session;
|
||||
chiaki_session_init(&session, &connect_info);
|
||||
chiaki_session_start(&session);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue