Mercurial > pidgin
comparison src/protocols/oscar/stats.c @ 2246:933346315b9b
[gaim-migrate @ 2256]
heh.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sun, 09 Sep 2001 10:07:14 +0000 |
parents | 424a40f12a6c |
children | c41030cfed76 |
comparison
equal
deleted
inserted
replaced
2245:31157c54fe6e | 2246:933346315b9b |
---|---|
1 | 1 |
2 #define FAIM_INTERNAL | 2 #define FAIM_INTERNAL |
3 #include <aim.h> | 3 #include <aim.h> |
4 | 4 |
5 static int reportinterval(struct aim_session_t *sess, aim_module_t *mod, struct command_rx_struct *rx, aim_modsnac_t *snac, unsigned char *data, int datalen) | 5 static int reportinterval(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) |
6 { | 6 { |
7 unsigned short interval; | 7 fu16_t interval; |
8 aim_rxcallback_t userfunc; | 8 aim_rxcallback_t userfunc; |
9 | 9 |
10 interval = aimutil_get16(data); | 10 interval = aimbs_get16(bs); |
11 | 11 |
12 if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) | 12 if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) |
13 return userfunc(sess, rx, interval); | 13 return userfunc(sess, rx, interval); |
14 | 14 |
15 return 0; | 15 return 0; |
16 } | 16 } |
17 | 17 |
18 static int snachandler(struct aim_session_t *sess, aim_module_t *mod, struct command_rx_struct *rx, aim_modsnac_t *snac, unsigned char *data, int datalen) | 18 static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) |
19 { | 19 { |
20 | 20 |
21 if (snac->subtype == 0x0002) | 21 if (snac->subtype == 0x0002) |
22 return reportinterval(sess, mod, rx, snac, data, datalen); | 22 return reportinterval(sess, mod, rx, snac, bs); |
23 | 23 |
24 return 0; | 24 return 0; |
25 } | 25 } |
26 | 26 |
27 faim_internal int stats_modfirst(struct aim_session_t *sess, aim_module_t *mod) | 27 faim_internal int stats_modfirst(aim_session_t *sess, aim_module_t *mod) |
28 { | 28 { |
29 | 29 |
30 mod->family = 0x000b; | 30 mod->family = 0x000b; |
31 mod->version = 0x0000; | 31 mod->version = 0x0000; |
32 mod->flags = 0; | 32 mod->flags = 0; |
33 strncpy(mod->name, "stats", sizeof(mod->name)); | 33 strncpy(mod->name, "stats", sizeof(mod->name)); |
34 mod->snachandler = snachandler; | 34 mod->snachandler = snachandler; |
35 | 35 |
36 return 0; | 36 return 0; |
37 } | 37 } |