X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=clients%2Ftest.c;h=382e26e332d26c3db6b5ccc3442d67b77777da14;hb=4854e96def0d86155f9a5bd1fd6f0403b0730d32;hp=e88dab4a41f73d2c69675982e1f4be9d4505851a;hpb=65bf229b6d9d28f097f5d71a4a6bd71424e17760;p=doldaconnect.git diff --git a/clients/test.c b/clients/test.c index e88dab4..382e26e 100644 --- a/clients/test.c +++ b/clients/test.c @@ -38,10 +38,11 @@ int main(int argc, char **argv) done = 1; while((resp = dc_getresp()) != NULL) { - if(resp->cmdname == NULL) + if(!wcscmp(resp->cmdname, L".connect")) { - printf("Connected\n"); - dc_loginasync(NULL, 0, NULL, authcallback, NULL); + printf("Connected: %i\n", resp->code); + if(resp->code == 200) + dc_loginasync(NULL, 1, NULL, authcallback, NULL); } dc_freeresp(resp); }