Last change
on this file since 913a663 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
|
Rev | Line | |
---|
[b7d3cc34] | 1 | |
---|
| 2 | #include <aim.h> |
---|
| 3 | |
---|
[5ebff60] | 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) |
---|
[b7d3cc34] | 6 | { |
---|
| 7 | guint16 interval; |
---|
| 8 | aim_rxcallback_t userfunc; |
---|
| 9 | |
---|
| 10 | interval = aimbs_get16(bs); |
---|
| 11 | |
---|
[5ebff60] | 12 | if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) { |
---|
[b7d3cc34] | 13 | return userfunc(sess, rx, interval); |
---|
[5ebff60] | 14 | } |
---|
[b7d3cc34] | 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 | |
---|
[5ebff60] | 22 | if (snac->subtype == 0x0002) { |
---|
[b7d3cc34] | 23 | return reportinterval(sess, mod, rx, snac, bs); |
---|
[5ebff60] | 24 | } |
---|
[b7d3cc34] | 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.