Check .connect code.
authorfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Wed, 11 Apr 2007 11:14:53 +0000 (11:14 +0000)
committerfredrik <fredrik@959494ce-11ee-0310-bf91-de5d638817bd>
Wed, 11 Apr 2007 11:14:53 +0000 (11:14 +0000)
git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/doldaconnect@894 959494ce-11ee-0310-bf91-de5d638817bd

clients/test.c

index fdc46c2..382e26e 100644 (file)
@@ -40,8 +40,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);
        }