Mercurial > pidgin.yaz
comparison src/toc.c @ 217:fba779cc01f5
[gaim-migrate @ 227]
Removed the really buggy thread code, and almost got Get File (where gaim
sends to Oscar clients) to work. At least they can get a list of files now.
Btw, the 2 bytes that were bugging weren't the problem, it was network byte
order. I'm stupid sometimes.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 05 May 2000 22:33:38 +0000 |
parents | f7e17fb767eb |
children | f3b61c04f44e |
comparison
equal
deleted
inserted
replaced
216:f7e17fb767eb | 217:fba779cc01f5 |
---|---|
30 #include <string.h> | 30 #include <string.h> |
31 #include <stdlib.h> | 31 #include <stdlib.h> |
32 #include <stdio.h> | 32 #include <stdio.h> |
33 #include <time.h> | 33 #include <time.h> |
34 #include <sys/socket.h> | 34 #include <sys/socket.h> |
35 #include <pthread.h> | |
36 #include "gaim.h" | 35 #include "gaim.h" |
37 #include "gnome_applet_mgr.h" | 36 #include "gnome_applet_mgr.h" |
38 | 37 |
39 | 38 |
40 | 39 |
606 vip = strtok(NULL, ":"); | 605 vip = strtok(NULL, ":"); |
607 sscanf(strtok(NULL, ":"), "%d", &port); | 606 sscanf(strtok(NULL, ":"), "%d", &port); |
608 | 607 |
609 if (!strcmp(uuid, FILE_SEND_UID)) { | 608 if (!strcmp(uuid, FILE_SEND_UID)) { |
610 /* we're getting a file */ | 609 /* we're getting a file */ |
611 pthread_t thread; | |
612 | |
613 for (i=0; i<4; i++) { | 610 for (i=0; i<4; i++) { |
614 sscanf(strtok(NULL, ":"), "%d", &unk[i]); | 611 sscanf(strtok(NULL, ":"), "%d", &unk[i]); |
615 if (unk[i] == 10001) | 612 if (unk[i] == 10001) |
616 break; | 613 break; |
617 messages[i] = frombase64(strtok(NULL, ":")); | 614 messages[i] = frombase64(strtok(NULL, ":")); |
645 g_free(tmp); | 642 g_free(tmp); |
646 | 643 |
647 for (i--; i >= 0; i--) | 644 for (i--; i >= 0; i--) |
648 g_free(messages[i]); | 645 g_free(messages[i]); |
649 | 646 |
650 gdk_threads_enter(); | 647 accept_file_dialog(ft); |
651 pthread_create(&thread, NULL, | |
652 (void*(*)(void*))accept_file_dialog, ft); | |
653 pthread_detach(thread); | |
654 gdk_threads_leave(); | |
655 } else if (!strcmp(uuid, FILE_GET_UID)) { | 648 } else if (!strcmp(uuid, FILE_GET_UID)) { |
656 /* we're sending a file */ | 649 /* we're sending a file */ |
657 for (i=0; i<4; i++) { | 650 for (i=0; i<4; i++) { |
658 sscanf(strtok(NULL, ":"), "%d", &unk[i]); | 651 sscanf(strtok(NULL, ":"), "%d", &unk[i]); |
659 if (unk[i] == 10001) | 652 if (unk[i] == 10001) |