Mercurial > pidgin
comparison src/protocols/oscar/auth.c @ 10991:1798ad0be460
[gaim-migrate @ 12829]
Rename aim_tlvlist_add_string to aim_tlvlist_add_str.
Yes, that's one of the functions I just added.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Thu, 09 Jun 2005 04:38:10 +0000 |
parents | 8d74ae785a46 |
children | 677a3862260f |
comparison
equal
deleted
inserted
replaced
10990:8d74ae785a46 | 10991:1798ad0be460 |
---|---|
156 } | 156 } |
157 | 157 |
158 aim_encode_password(password, password_encoded); | 158 aim_encode_password(password, password_encoded); |
159 | 159 |
160 aimbs_put32(&fr->data, 0x00000001); /* FLAP Version */ | 160 aimbs_put32(&fr->data, 0x00000001); /* FLAP Version */ |
161 aim_tlvlist_add_string(&tl, 0x0001, sn); | 161 aim_tlvlist_add_str(&tl, 0x0001, sn); |
162 aim_tlvlist_add_raw(&tl, 0x0002, passwdlen, password_encoded); | 162 aim_tlvlist_add_raw(&tl, 0x0002, passwdlen, password_encoded); |
163 | 163 |
164 if (ci->clientstring) | 164 if (ci->clientstring) |
165 aim_tlvlist_add_string(&tl, 0x0003, ci->clientstring); | 165 aim_tlvlist_add_str(&tl, 0x0003, ci->clientstring); |
166 aim_tlvlist_add_16(&tl, 0x0016, (fu16_t)ci->clientid); | 166 aim_tlvlist_add_16(&tl, 0x0016, (fu16_t)ci->clientid); |
167 aim_tlvlist_add_16(&tl, 0x0017, (fu16_t)ci->major); | 167 aim_tlvlist_add_16(&tl, 0x0017, (fu16_t)ci->major); |
168 aim_tlvlist_add_16(&tl, 0x0018, (fu16_t)ci->minor); | 168 aim_tlvlist_add_16(&tl, 0x0018, (fu16_t)ci->minor); |
169 aim_tlvlist_add_16(&tl, 0x0019, (fu16_t)ci->point); | 169 aim_tlvlist_add_16(&tl, 0x0019, (fu16_t)ci->point); |
170 aim_tlvlist_add_16(&tl, 0x001a, (fu16_t)ci->build); | 170 aim_tlvlist_add_16(&tl, 0x001a, (fu16_t)ci->build); |
171 aim_tlvlist_add_32(&tl, 0x0014, (fu32_t)ci->distrib); /* distribution chan */ | 171 aim_tlvlist_add_32(&tl, 0x0014, (fu32_t)ci->distrib); /* distribution chan */ |
172 aim_tlvlist_add_string(&tl, 0x000f, ci->lang); | 172 aim_tlvlist_add_str(&tl, 0x000f, ci->lang); |
173 aim_tlvlist_add_string(&tl, 0x000e, ci->country); | 173 aim_tlvlist_add_str(&tl, 0x000e, ci->country); |
174 | 174 |
175 aim_tlvlist_write(&fr->data, &tl); | 175 aim_tlvlist_write(&fr->data, &tl); |
176 | 176 |
177 free(password_encoded); | 177 free(password_encoded); |
178 aim_tlvlist_free(&tl); | 178 aim_tlvlist_free(&tl); |
232 return -ENOMEM; | 232 return -ENOMEM; |
233 | 233 |
234 snacid = aim_cachesnac(sess, 0x0017, 0x0002, 0x0000, NULL, 0); | 234 snacid = aim_cachesnac(sess, 0x0017, 0x0002, 0x0000, NULL, 0); |
235 aim_putsnac(&fr->data, 0x0017, 0x0002, 0x0000, snacid); | 235 aim_putsnac(&fr->data, 0x0017, 0x0002, 0x0000, snacid); |
236 | 236 |
237 aim_tlvlist_add_string(&tl, 0x0001, sn); | 237 aim_tlvlist_add_str(&tl, 0x0001, sn); |
238 | 238 |
239 /* Truncate ICQ passwords, if necessary */ | 239 /* Truncate ICQ passwords, if necessary */ |
240 if (isdigit(sn[0]) && (strlen(password) > MAXICQPASSLEN)) | 240 if (isdigit(sn[0]) && (strlen(password) > MAXICQPASSLEN)) |
241 { | 241 { |
242 char truncated[MAXICQPASSLEN + 1]; | 242 char truncated[MAXICQPASSLEN + 1]; |
254 #ifndef USE_OLD_MD5 | 254 #ifndef USE_OLD_MD5 |
255 aim_tlvlist_add_noval(&tl, 0x004c); | 255 aim_tlvlist_add_noval(&tl, 0x004c); |
256 #endif | 256 #endif |
257 | 257 |
258 if (ci->clientstring) | 258 if (ci->clientstring) |
259 aim_tlvlist_add_string(&tl, 0x0003, ci->clientstring); | 259 aim_tlvlist_add_str(&tl, 0x0003, ci->clientstring); |
260 aim_tlvlist_add_16(&tl, 0x0016, (fu16_t)ci->clientid); | 260 aim_tlvlist_add_16(&tl, 0x0016, (fu16_t)ci->clientid); |
261 aim_tlvlist_add_16(&tl, 0x0017, (fu16_t)ci->major); | 261 aim_tlvlist_add_16(&tl, 0x0017, (fu16_t)ci->major); |
262 aim_tlvlist_add_16(&tl, 0x0018, (fu16_t)ci->minor); | 262 aim_tlvlist_add_16(&tl, 0x0018, (fu16_t)ci->minor); |
263 aim_tlvlist_add_16(&tl, 0x0019, (fu16_t)ci->point); | 263 aim_tlvlist_add_16(&tl, 0x0019, (fu16_t)ci->point); |
264 aim_tlvlist_add_16(&tl, 0x001a, (fu16_t)ci->build); | 264 aim_tlvlist_add_16(&tl, 0x001a, (fu16_t)ci->build); |
265 aim_tlvlist_add_32(&tl, 0x0014, (fu32_t)ci->distrib); | 265 aim_tlvlist_add_32(&tl, 0x0014, (fu32_t)ci->distrib); |
266 aim_tlvlist_add_string(&tl, 0x000f, ci->lang); | 266 aim_tlvlist_add_str(&tl, 0x000f, ci->lang); |
267 aim_tlvlist_add_string(&tl, 0x000e, ci->country); | 267 aim_tlvlist_add_str(&tl, 0x000e, ci->country); |
268 | 268 |
269 /* | 269 /* |
270 * If set, old-fashioned buddy lists will not work. You will need | 270 * If set, old-fashioned buddy lists will not work. You will need |
271 * to use SSI. | 271 * to use SSI. |
272 */ | 272 */ |
492 return -ENOMEM; | 492 return -ENOMEM; |
493 | 493 |
494 snacid = aim_cachesnac(sess, 0x0017, 0x0006, 0x0000, NULL, 0); | 494 snacid = aim_cachesnac(sess, 0x0017, 0x0006, 0x0000, NULL, 0); |
495 aim_putsnac(&fr->data, 0x0017, 0x0006, 0x0000, snacid); | 495 aim_putsnac(&fr->data, 0x0017, 0x0006, 0x0000, snacid); |
496 | 496 |
497 aim_tlvlist_add_string(&tl, 0x0001, sn); | 497 aim_tlvlist_add_str(&tl, 0x0001, sn); |
498 | 498 |
499 /* Tell the server we support SecurID logins. */ | 499 /* Tell the server we support SecurID logins. */ |
500 aim_tlvlist_add_noval(&tl, 0x004b); | 500 aim_tlvlist_add_noval(&tl, 0x004b); |
501 | 501 |
502 /* Unknown. Sent in recent WinAIM clients.*/ | 502 /* Unknown. Sent in recent WinAIM clients.*/ |