Mercurial > pidgin
comparison src/protocols/oscar/misc.c @ 13253:87a7c3077c19
[gaim-migrate @ 15619]
More cleaning up of oscar. Renamed some functions to be more clear.
Got rid of some stuff that wasn't used. Inlined some small things
in conn.c that were only used once.
The goals of all this are
1. Non-blocking I/O for all connections
2. p2p stuff won't use the same struct as oscar connections, because
that's stupid
3. The oscar PRPL should be less scary
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 12 Feb 2006 21:27:04 +0000 |
parents | f260d319bbbc |
children | e9802db22b06 |
comparison
equal
deleted
inserted
replaced
13252:2871c385c45a | 13253:87a7c3077c19 |
---|---|
42 faim_internal int aim_genericreq_n(OscarSession *sess, OscarConnection *conn, guint16 family, guint16 subtype) | 42 faim_internal int aim_genericreq_n(OscarSession *sess, OscarConnection *conn, guint16 family, guint16 subtype) |
43 { | 43 { |
44 FlapFrame *fr; | 44 FlapFrame *fr; |
45 aim_snacid_t snacid = 0x00000000; | 45 aim_snacid_t snacid = 0x00000000; |
46 | 46 |
47 if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10))) | 47 if (!(fr = flap_frame_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10))) |
48 return -ENOMEM; | 48 return -ENOMEM; |
49 | 49 |
50 aim_putsnac(&fr->data, family, subtype, 0x0000, snacid); | 50 aim_putsnac(&fr->data, family, subtype, 0x0000, snacid); |
51 | 51 |
52 aim_tx_enqueue(sess, fr); | 52 aim_tx_enqueue(sess, fr); |
57 faim_internal int aim_genericreq_n_snacid(OscarSession *sess, OscarConnection *conn, guint16 family, guint16 subtype) | 57 faim_internal int aim_genericreq_n_snacid(OscarSession *sess, OscarConnection *conn, guint16 family, guint16 subtype) |
58 { | 58 { |
59 FlapFrame *fr; | 59 FlapFrame *fr; |
60 aim_snacid_t snacid; | 60 aim_snacid_t snacid; |
61 | 61 |
62 if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10))) | 62 if (!(fr = flap_frame_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10))) |
63 return -ENOMEM; | 63 return -ENOMEM; |
64 | 64 |
65 snacid = aim_cachesnac(sess, family, subtype, 0x0000, NULL, 0); | 65 snacid = aim_cachesnac(sess, family, subtype, 0x0000, NULL, 0); |
66 aim_putsnac(&fr->data, family, subtype, 0x0000, snacid); | 66 aim_putsnac(&fr->data, family, subtype, 0x0000, snacid); |
67 | 67 |
76 aim_snacid_t snacid; | 76 aim_snacid_t snacid; |
77 | 77 |
78 if (!longdata) | 78 if (!longdata) |
79 return aim_genericreq_n(sess, conn, family, subtype); | 79 return aim_genericreq_n(sess, conn, family, subtype); |
80 | 80 |
81 if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+4))) | 81 if (!(fr = flap_frame_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+4))) |
82 return -ENOMEM; | 82 return -ENOMEM; |
83 | 83 |
84 snacid = aim_cachesnac(sess, family, subtype, 0x0000, NULL, 0); | 84 snacid = aim_cachesnac(sess, family, subtype, 0x0000, NULL, 0); |
85 | 85 |
86 aim_putsnac(&fr->data, family, subtype, 0x0000, snacid); | 86 aim_putsnac(&fr->data, family, subtype, 0x0000, snacid); |
97 aim_snacid_t snacid; | 97 aim_snacid_t snacid; |
98 | 98 |
99 if (!shortdata) | 99 if (!shortdata) |
100 return aim_genericreq_n(sess, conn, family, subtype); | 100 return aim_genericreq_n(sess, conn, family, subtype); |
101 | 101 |
102 if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+2))) | 102 if (!(fr = flap_frame_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02, 10+2))) |
103 return -ENOMEM; | 103 return -ENOMEM; |
104 | 104 |
105 snacid = aim_cachesnac(sess, family, subtype, 0x0000, NULL, 0); | 105 snacid = aim_cachesnac(sess, family, subtype, 0x0000, NULL, 0); |
106 | 106 |
107 aim_putsnac(&fr->data, family, subtype, 0x0000, snacid); | 107 aim_putsnac(&fr->data, family, subtype, 0x0000, snacid); |