Dolda2000 GitWeb
/
doldaconnect.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add doldacond.8.
[doldaconnect.git]
/
clients
/
test.c
diff --git
a/clients/test.c
b/clients/test.c
index
25deedb
..
382e26e
100644
(file)
--- a/
clients/test.c
+++ b/
clients/test.c
@@
-19,7
+19,7
@@
int main(int argc, char **argv)
struct dc_intresp *ires;
dc_init();
struct dc_intresp *ires;
dc_init();
- fd = dc_connect(
"localhost", -1
);
+ fd = dc_connect(
NULL
);
done = 0;
while(!done)
{
done = 0;
while(!done)
{
@@
-38,10
+38,11
@@
int main(int argc, char **argv)
done = 1;
while((resp = dc_getresp()) != NULL)
{
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);
}
}
dc_freeresp(resp);
}