Mercurial > pidgin
comparison src/protocols/oscar/aim_internal.h @ 3752:b32474e522fa
[gaim-migrate @ 3890]
From: "William T. Mahan" <wtm2@duke.edu>
This patch, against CVS HEAD, fixes three bugs in Oscar File Transfer
support. I can split it up further if desired.
* Send a null checksum when initiating a file transfer, which fixes
"files don't match" warnings produced by some versions of WinAIM; add
a compile-time option to actually compute the checksum, which is
slow but necessary when sending to some Mac clients.
* Don't allow sending files to oneself, because it causes all kinds of
subtle problems and it's not useful.
* Don't crash when there is an error writing to the output file when
receiving.
From: "William T. Mahan" <wtm2@duke.edu>
This patch 2 of 3, which applies on top of the first, adds support for
reverse connections for Oscar File Transfer, the lack of which has
been the biggest complaint so far. Reverse connections are used by
newer AIM clients when there is difficulty verifying the IP of the
sender.
From: "William T. Mahan" <wtm2@duke.edu>
This patch 3 of 3, which applies on top of the first 2, removes the
alarm() and sigaction() calls that were added by my original FT patch
to detect transfer timeouts. Besides apparently not working on
Windows, they involved a lot of ugly code to handle a special case.
My new approach is to add destructors that can called when SNACs are
freed; a timeout is detected when a request SNAC is cleaned up before
the transfer is accepted. Although this touches several files, it is
more generic than the old method. I tried to implement this in an
unintrusive manner, so that there is little preformance penalty for
SNACs that do not use destructors.
My first two patches should work fine without this. If there are any
objections to the third patch, I ask that the first two patches be
applied, in which case I will set up a SourceForge page for this one.
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 19 Oct 2002 05:22:30 +0000 |
parents | e941bfbacf7c |
children | 07283934dedd |
comparison
equal
deleted
inserted
replaced
3751:e25577506dec | 3752:b32474e522fa |
---|---|
22 fu16_t toolid; | 22 fu16_t toolid; |
23 fu16_t toolversion; | 23 fu16_t toolversion; |
24 fu16_t flags; | 24 fu16_t flags; |
25 char name[AIM_MODULENAME_MAXLEN+1]; | 25 char name[AIM_MODULENAME_MAXLEN+1]; |
26 int (*snachandler)(aim_session_t *sess, struct aim_module_s *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs); | 26 int (*snachandler)(aim_session_t *sess, struct aim_module_s *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs); |
27 int (*snacdestructor)(aim_session_t *sess, aim_conn_t *conn, aim_modsnac_t *snac, void *data); | |
28 | |
27 void (*shutdown)(aim_session_t *sess, struct aim_module_s *mod); | 29 void (*shutdown)(aim_session_t *sess, struct aim_module_s *mod); |
28 void *priv; | 30 void *priv; |
29 struct aim_module_s *next; | 31 struct aim_module_s *next; |
30 } aim_module_t; | 32 } aim_module_t; |
31 | 33 |
112 void *data; | 114 void *data; |
113 time_t issuetime; | 115 time_t issuetime; |
114 struct aim_snac_s *next; | 116 struct aim_snac_s *next; |
115 } aim_snac_t; | 117 } aim_snac_t; |
116 | 118 |
119 struct aim_snac_destructor { | |
120 aim_conn_t *conn; | |
121 void *data; | |
122 }; | |
123 | |
117 faim_internal void aim_initsnachash(aim_session_t *sess); | 124 faim_internal void aim_initsnachash(aim_session_t *sess); |
118 faim_internal aim_snacid_t aim_newsnac(aim_session_t *, aim_snac_t *newsnac); | 125 faim_internal aim_snacid_t aim_newsnac(aim_session_t *, aim_snac_t *newsnac); |
119 faim_internal aim_snacid_t aim_cachesnac(aim_session_t *sess, const fu16_t family, const fu16_t type, const fu16_t flags, const void *data, const int datalen); | 126 faim_internal aim_snacid_t aim_cachesnac(aim_session_t *sess, const fu16_t family, const fu16_t type, const fu16_t flags, const void *data, const int datalen); |
120 faim_internal aim_snac_t *aim_remsnac(aim_session_t *, aim_snacid_t id); | 127 faim_internal aim_snac_t *aim_remsnac(aim_session_t *, aim_snacid_t id); |
121 faim_internal void aim_cleansnacs(aim_session_t *, int maxage); | 128 faim_internal void aim_cleansnacs(aim_session_t *, int maxage); |