mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 16:45:10 +00:00
[ADD] Ping homeserver to see if Parsee works
This commit is contained in:
parent
7f41a85a8a
commit
5d13410ac4
5 changed files with 75 additions and 4 deletions
|
|
@ -10,15 +10,16 @@
|
|||
|
||||
#include <Matrix.h>
|
||||
|
||||
void
|
||||
bool
|
||||
ASPing(const ParseeConfig *conf)
|
||||
{
|
||||
HttpClientContext *ctx = NULL;
|
||||
HashMap *json = NULL;
|
||||
char *path;
|
||||
bool ret;
|
||||
if (!conf)
|
||||
{
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
path = StrConcat(3,
|
||||
|
|
@ -33,7 +34,9 @@ ASPing(const ParseeConfig *conf)
|
|||
Free(path);
|
||||
json = HashMapCreate();
|
||||
ASAuthenticateRequest(conf, ctx);
|
||||
ParseeSetRequestJSON(ctx, json);
|
||||
ret = ParseeSetRequestJSON(ctx, json) == HTTP_OK;
|
||||
HttpClientContextFree(ctx);
|
||||
JsonFree(json);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue