libpurple/protocols/qq/group_join.c

changeset 30706
612b36b49058
parent 25117
ae5ff04ed0ae
child 31393
04447b1f6403
equal deleted inserted replaced
30705:7ff782ca5089 30706:612b36b49058
176 } 176 }
177 177
178 /* If comes here, cmd is OK already */ 178 /* If comes here, cmd is OK already */
179 void qq_process_group_cmd_exit_group(guint8 *data, gint len, PurpleConnection *gc) 179 void qq_process_group_cmd_exit_group(guint8 *data, gint len, PurpleConnection *gc)
180 { 180 {
181 qq_data *qd;
182 gint bytes; 181 gint bytes;
183 guint32 id; 182 guint32 id;
184 183
185 g_return_if_fail(data != NULL && len > 0); 184 g_return_if_fail(data != NULL && len > 0);
186 qd = (qq_data *) gc->proto_data;
187 185
188 if (len < 4) { 186 if (len < 4) {
189 purple_debug_error("QQ", "Invalid exit group reply, expect %d bytes, read %d bytes\n", 4, len); 187 purple_debug_error("QQ", "Invalid exit group reply, expect %d bytes, read %d bytes\n", 4, len);
190 return; 188 return;
191 } 189 }
199 /* Process the reply to group_auth subcmd */ 197 /* Process the reply to group_auth subcmd */
200 void qq_process_group_cmd_join_group_auth(guint8 *data, gint len, PurpleConnection *gc) 198 void qq_process_group_cmd_join_group_auth(guint8 *data, gint len, PurpleConnection *gc)
201 { 199 {
202 gint bytes; 200 gint bytes;
203 guint32 id; 201 guint32 id;
204 qq_data *qd;
205 qq_room_data *rmd; 202 qq_room_data *rmd;
206 gchar *msg; 203 gchar *msg;
207 204
208 g_return_if_fail(data != NULL && len > 0); 205 g_return_if_fail(data != NULL && len > 0);
209 qd = (qq_data *) gc->proto_data;
210 206
211 if (len < 4) { 207 if (len < 4) {
212 purple_debug_error("QQ", 208 purple_debug_error("QQ",
213 "Invalid join room reply, expect %d bytes, read %d bytes\n", 4, len); 209 "Invalid join room reply, expect %d bytes, read %d bytes\n", 4, len);
214 return; 210 return;
281 } 277 }
282 278
283 /* Attempt to join a group without auth */ 279 /* Attempt to join a group without auth */
284 void qq_group_join(PurpleConnection *gc, GHashTable *data) 280 void qq_group_join(PurpleConnection *gc, GHashTable *data)
285 { 281 {
286 qq_data *qd;
287 gchar *ext_id_str; 282 gchar *ext_id_str;
288 gchar *id_str; 283 gchar *id_str;
289 guint32 ext_id; 284 guint32 ext_id;
290 guint32 id; 285 guint32 id;
291 qq_room_data *rmd; 286 qq_room_data *rmd;
292 287
293 g_return_if_fail(data != NULL); 288 g_return_if_fail(data != NULL);
294 qd = (qq_data *) gc->proto_data;
295 289
296 ext_id_str = g_hash_table_lookup(data, QQ_ROOM_KEY_EXTERNAL_ID); 290 ext_id_str = g_hash_table_lookup(data, QQ_ROOM_KEY_EXTERNAL_ID);
297 id_str = g_hash_table_lookup(data, QQ_ROOM_KEY_INTERNAL_ID); 291 id_str = g_hash_table_lookup(data, QQ_ROOM_KEY_INTERNAL_ID);
298 purple_debug_info("QQ", "Join room %s, extend id %s\n", id_str, ext_id_str); 292 purple_debug_info("QQ", "Join room %s, extend id %s\n", id_str, ext_id_str);
299 293

mercurial