Last change
on this file since ef9ee0e was
5ebff60,
checked in by dequis <dx@…>, at 2015-02-20T22:50:54Z
|
Reindent everything to K&R style with tabs
Used uncrustify, with the configuration file in ./doc/uncrustify.cfg
Commit author set to "Indent <please@…>" so that it's easier to
skip while doing git blame.
|
-
Property mode set to
100644
|
File size:
883 bytes
|
Line | |
---|
1 | |
---|
2 | #include <aim.h> |
---|
3 | |
---|
4 | static int reportinterval(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, |
---|
5 | aim_bstream_t *bs) |
---|
6 | { |
---|
7 | guint16 interval; |
---|
8 | aim_rxcallback_t userfunc; |
---|
9 | |
---|
10 | interval = aimbs_get16(bs); |
---|
11 | |
---|
12 | if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) { |
---|
13 | return userfunc(sess, rx, interval); |
---|
14 | } |
---|
15 | |
---|
16 | return 0; |
---|
17 | } |
---|
18 | |
---|
19 | static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) |
---|
20 | { |
---|
21 | |
---|
22 | if (snac->subtype == 0x0002) { |
---|
23 | return reportinterval(sess, mod, rx, snac, bs); |
---|
24 | } |
---|
25 | |
---|
26 | return 0; |
---|
27 | } |
---|
28 | |
---|
29 | int stats_modfirst(aim_session_t *sess, aim_module_t *mod) |
---|
30 | { |
---|
31 | |
---|
32 | mod->family = 0x000b; |
---|
33 | mod->version = 0x0001; |
---|
34 | mod->toolid = 0x0104; |
---|
35 | mod->toolversion = 0x0001; |
---|
36 | mod->flags = 0; |
---|
37 | strncpy(mod->name, "stats", sizeof(mod->name)); |
---|
38 | mod->snachandler = snachandler; |
---|
39 | |
---|
40 | return 0; |
---|
41 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.