X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=clients%2Ftest.c;h=f5e6cbd1c181c97923886f1ecb12a06615f41e5c;hb=5064a51979caa358a4114656d715549bd7c6401a;hp=fdc46c2f52ed0104cc75f867ee0d63b56c95bd77;hpb=bf46d8f1de407f075a8703090f6a271aaf5ebe88;p=doldaconnect.git diff --git a/clients/test.c b/clients/test.c index fdc46c2..f5e6cbd 100644 --- a/clients/test.c +++ b/clients/test.c @@ -12,11 +12,9 @@ void authcallback(int err, wchar_t *reason, void *data) int main(int argc, char **argv) { - int i; struct pollfd pfd; int fd, done; struct dc_response *resp; - struct dc_intresp *ires; dc_init(); fd = dc_connect(NULL); @@ -40,8 +38,9 @@ int main(int argc, char **argv) { if(!wcscmp(resp->cmdname, L".connect")) { - printf("Connected\n"); - dc_loginasync(NULL, 1, NULL, authcallback, NULL); + printf("Connected: %i\n", resp->code); + if(resp->code == 200) + dc_loginasync(NULL, 1, NULL, authcallback, NULL); } dc_freeresp(resp); }