comparison libpurple/protocols/oscar/flap_connection.c @ 27506:74e487f82f39

Oh, we don't need a special ui_info field for the AIM clientstring because we can just concat the name and version. And set the distids for libpurple, Pidgin and Finch AOL would like Adium to use 1551 (0x060f)
author Mark Doliner <mark@kingant.net>
date Wed, 08 Jul 2009 20:44:16 +0000
parents 5048054d319a
children bff61dad9a6b
comparison
equal deleted inserted replaced
27505:5048054d319a 27506:74e487f82f39
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;
81 80
82 frame = flap_frame_new(od, 0x01, 1152 + length); 81 frame = flap_frame_new(od, 0x01, 1152 + length);
83 82
84 byte_stream_put32(&frame->data, 0x00000001); /* FLAP Version */ 83 byte_stream_put32(&frame->data, 0x00000001); /* FLAP Version */
85 aim_tlvlist_add_raw(&tlvlist, 0x0006, length, chipsahoy); 84 aim_tlvlist_add_raw(&tlvlist, 0x0006, length, chipsahoy);
86 85
87 clientstring = oscar_get_ui_info_string( 86 if (ci->clientstring != NULL)
88 od->icq ? "prpl-icq-clientstring" : "prpl-aim-clientstring", 87 aim_tlvlist_add_str(&tlvlist, 0x0003, ci->clientstring);
89 ci->clientstring); 88 else {
90 89 gchar *clientstring = oscar_get_clientstring();
91 if (clientstring != NULL)
92 aim_tlvlist_add_str(&tlvlist, 0x0003, clientstring); 90 aim_tlvlist_add_str(&tlvlist, 0x0003, clientstring);
91 g_free(clientstring);
92 }
93 aim_tlvlist_add_16(&tlvlist, 0x0017, (guint16)ci->major); 93 aim_tlvlist_add_16(&tlvlist, 0x0017, (guint16)ci->major);
94 aim_tlvlist_add_16(&tlvlist, 0x0018, (guint16)ci->minor); 94 aim_tlvlist_add_16(&tlvlist, 0x0018, (guint16)ci->minor);
95 aim_tlvlist_add_16(&tlvlist, 0x0019, (guint16)ci->point); 95 aim_tlvlist_add_16(&tlvlist, 0x0019, (guint16)ci->point);
96 aim_tlvlist_add_16(&tlvlist, 0x001a, (guint16)ci->build); 96 aim_tlvlist_add_16(&tlvlist, 0x001a, (guint16)ci->build);
97 aim_tlvlist_add_8(&tlvlist, 0x004a, 0x01); 97 aim_tlvlist_add_8(&tlvlist, 0x004a, 0x01);