Mercurial > pidgin
annotate src/protocols/oscar/stats.c @ 4833:a6960b4b0c9b
[gaim-migrate @ 5158]
A fix for the bug described in patch 702766, filed by darkrain:
"gaim still segfaults if you click on the docklet
just after starting gaim in the account editor."
https://sourceforge.net/tracker/index.php?func=detail&aid=702766&group_id=235&atid=300235
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 19 Mar 2003 22:31:05 +0000 |
parents | 07283934dedd |
children | 0b64f386a7b8 |
rev | line source |
---|---|
3952 | 1 /* |
2 * Family 0x000b - Statistics. | |
3 * | |
4 */ | |
2086 | 5 |
6 #define FAIM_INTERNAL | |
7 #include <aim.h> | |
8 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
9 static int reportinterval(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) |
2086 | 10 { |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
11 fu16_t interval; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
12 aim_rxcallback_t userfunc; |
2086 | 13 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
14 interval = aimbs_get16(bs); |
2086 | 15 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
16 if ((userfunc = aim_callhandler(sess, rx->conn, snac->family, snac->subtype))) |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
17 return userfunc(sess, rx, interval); |
2086 | 18 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
19 return 0; |
2086 | 20 } |
21 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
22 static int snachandler(aim_session_t *sess, aim_module_t *mod, aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs) |
2086 | 23 { |
24 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
25 if (snac->subtype == 0x0002) |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
26 return reportinterval(sess, mod, rx, snac, bs); |
2086 | 27 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
28 return 0; |
2086 | 29 } |
30 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
31 faim_internal int stats_modfirst(aim_session_t *sess, aim_module_t *mod) |
2086 | 32 { |
33 | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
34 mod->family = 0x000b; |
2672 | 35 mod->version = 0x0001; |
36 mod->toolid = 0x0104; | |
37 mod->toolversion = 0x0001; | |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
38 mod->flags = 0; |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
39 strncpy(mod->name, "stats", sizeof(mod->name)); |
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
40 mod->snachandler = snachandler; |
2086 | 41 |
2246
933346315b9b
[gaim-migrate @ 2256]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
2086
diff
changeset
|
42 return 0; |
2086 | 43 } |