comparison libpurple/protocols/msn/slp.h @ 29892:1a9977557dc9

I never liked randomly poking at offsets. Fortunately, I was able to find an old document by Siebe on the Internet Archive that explained (as best possible) the FT request Context field. Also, make the incoming request handling a bit stricter.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Sun, 28 Feb 2010 02:11:57 +0000
parents 462cb893521b
children 119bd7b072eb
comparison
equal deleted inserted replaced
29891:7f7ce73365eb 29892:1a9977557dc9
28 28
29 #include "ft.h" 29 #include "ft.h"
30 #include "session.h" 30 #include "session.h"
31 #include "slpcall.h" 31 #include "slpcall.h"
32 32
33 #define MAX_FILE_NAME_LEN 260 /* MAX_PATH in Windows */
34
35 /**
36 * The context data for a file transfer request
37 */
38 #pragma pack(push,1) /* Couldn't they have made it the right size? */
39 typedef struct
40 {
41 guint32 length; /*< Length of header */
42 guint32 version; /*< MSN version */
43 guint64 file_size; /*< Size of file */
44 guint32 type; /*< Transfer type */
45 gunichar2 file_name[MAX_FILE_NAME_LEN]; /*< Self-explanatory */
46 gchar unknown1[30]; /*< Used somehow for background sharing */
47 guint32 unknown2; /*< Possibly for background sharing as well */
48 gchar preview[1]; /*< File preview data, 96x96 PNG */
49 } MsnFileContext;
50 #pragma pack(pop)
51
33 MsnSlpCall * msn_slp_sip_recv(MsnSlpLink *slplink, 52 MsnSlpCall * msn_slp_sip_recv(MsnSlpLink *slplink,
34 const char *body); 53 const char *body);
35 54
36 void send_bye(MsnSlpCall *slpcall, const char *type); 55 void send_bye(MsnSlpCall *slpcall, const char *type);
37 56