Dolda2000 GitWeb
/
doldaconnect.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Initial work on Java library.
[doldaconnect.git]
/
clients
/
test.c
diff --git
a/clients/test.c
b/clients/test.c
index
fdc46c2
..
04f471c
100644
(file)
--- 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 main(int argc, char **argv)
{
- int i;
struct pollfd pfd;
int fd, done;
struct dc_response *resp;
struct pollfd pfd;
int fd, done;
struct dc_response *resp;
- struct dc_intresp *ires;
dc_init();
fd = dc_connect(NULL);
dc_init();
fd = dc_connect(NULL);
@@
-40,8
+38,9
@@
int main(int argc, char **argv)
{
if(!wcscmp(resp->cmdname, L".connect"))
{
{
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 == 201)
+ dc_loginasync(NULL, 1, NULL, authcallback, NULL);
}
dc_freeresp(resp);
}
}
dc_freeresp(resp);
}