comparison libpurple/protocols/oscar/flap_connection.c @ 27505:5048054d319a

Use the ui_info hash table instead of prefs when passing the clientstring and distid from the UIs to the oscar prpl. I realized that using a pref wasn't great because it's persistent, and if you switch from a UI that sets one of those strings to a UI that doesn't hen we'll keep using the old value.
author Mark Doliner <mark@kingant.net>
date Wed, 08 Jul 2009 20:11:07 +0000
parents f541583e31bd
children 74e487f82f39
comparison
equal deleted inserted replaced
27504:4f24d5da4cb3 27505:5048054d319a
75 void 75 void
76 flap_connection_send_version_with_cookie_and_clientinfo(OscarData *od, FlapConnection *conn, guint16 length, const guint8 *chipsahoy, ClientInfo *ci) 76 flap_connection_send_version_with_cookie_and_clientinfo(OscarData *od, FlapConnection *conn, guint16 length, const guint8 *chipsahoy, ClientInfo *ci)
77 { 77 {
78 FlapFrame *frame; 78 FlapFrame *frame;
79 GSList *tlvlist = NULL; 79 GSList *tlvlist = NULL;
80 const char *clientstring;
80 81
81 frame = flap_frame_new(od, 0x01, 1152 + length); 82 frame = flap_frame_new(od, 0x01, 1152 + length);
82 83
83 byte_stream_put32(&frame->data, 0x00000001); /* FLAP Version */ 84 byte_stream_put32(&frame->data, 0x00000001); /* FLAP Version */
84 aim_tlvlist_add_raw(&tlvlist, 0x0006, length, chipsahoy); 85 aim_tlvlist_add_raw(&tlvlist, 0x0006, length, chipsahoy);
85 86
86 if (ci->clientstring) 87 clientstring = oscar_get_ui_info_string(
87 aim_tlvlist_add_str(&tlvlist, 0x0003, ci->clientstring); 88 od->icq ? "prpl-icq-clientstring" : "prpl-aim-clientstring",
89 ci->clientstring);
90
91 if (clientstring != NULL)
92 aim_tlvlist_add_str(&tlvlist, 0x0003, clientstring);
88 aim_tlvlist_add_16(&tlvlist, 0x0017, (guint16)ci->major); 93 aim_tlvlist_add_16(&tlvlist, 0x0017, (guint16)ci->major);
89 aim_tlvlist_add_16(&tlvlist, 0x0018, (guint16)ci->minor); 94 aim_tlvlist_add_16(&tlvlist, 0x0018, (guint16)ci->minor);
90 aim_tlvlist_add_16(&tlvlist, 0x0019, (guint16)ci->point); 95 aim_tlvlist_add_16(&tlvlist, 0x0019, (guint16)ci->point);
91 aim_tlvlist_add_16(&tlvlist, 0x001a, (guint16)ci->build); 96 aim_tlvlist_add_16(&tlvlist, 0x001a, (guint16)ci->build);
92 aim_tlvlist_add_8(&tlvlist, 0x004a, 0x01); 97 aim_tlvlist_add_8(&tlvlist, 0x004a, 0x01);