comparison libfaim/aim_snac.c @ 1248:920c86b753d7

[gaim-migrate @ 1258] bah committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Wed, 13 Dec 2000 03:31:15 +0000
parents 1e7625916fa7
children
comparison
equal deleted inserted replaced
1247:f50146ce818e 1248:920c86b753d7
26 sess->snac_hash[i] = NULL; 26 sess->snac_hash[i] = NULL;
27 faim_mutex_init(&sess->snac_hash_locks[i]); 27 faim_mutex_init(&sess->snac_hash_locks[i]);
28 } 28 }
29 29
30 return; 30 return;
31 }
32
33 faim_internal unsigned long aim_cachesnac(struct aim_session_t *sess,
34 const unsigned short family,
35 const unsigned short type,
36 const unsigned short flags,
37 const void *data, const int datalen)
38 {
39 struct aim_snac_t snac;
40
41 snac.id = sess->snac_nextid++;
42 snac.family = family;
43 snac.type = type;
44 snac.flags = flags;
45
46 snac.data = malloc(datalen);
47 memcpy(snac.data, data, datalen);
48
49 return aim_newsnac(sess, &snac);
31 } 50 }
32 51
33 /* 52 /*
34 * Clones the passed snac structure and caches it in the 53 * Clones the passed snac structure and caches it in the
35 * list/hash. 54 * list/hash.