Mercurial > pidgin
comparison libgaim/protocols/qq/group_info.c @ 14629:6b8bc59414f0
[gaim-migrate @ 17375]
Get rid of these useless checks.
committer: Tailor Script <tailor@pidgin.im>
author | Mark Huetsch <markhuetsch> |
---|---|
date | Tue, 26 Sep 2006 22:54:24 +0000 |
parents | 7e8dbf00f7a7 |
children | c039c920e11c |
comparison
equal
deleted
inserted
replaced
14628:58202142e9ad | 14629:6b8bc59414f0 |
---|---|
62 void qq_send_cmd_group_get_group_info(GaimConnection *gc, qq_group *group) | 62 void qq_send_cmd_group_get_group_info(GaimConnection *gc, qq_group *group) |
63 { | 63 { |
64 guint8 *raw_data, *cursor; | 64 guint8 *raw_data, *cursor; |
65 gint bytes, data_len; | 65 gint bytes, data_len; |
66 | 66 |
67 g_return_if_fail(gc != NULL && group != NULL); | 67 g_return_if_fail(group != NULL); |
68 | 68 |
69 data_len = 5; | 69 data_len = 5; |
70 raw_data = g_newa(guint8, data_len); | 70 raw_data = g_newa(guint8, data_len); |
71 cursor = raw_data; | 71 cursor = raw_data; |
72 | 72 |
85 void qq_send_cmd_group_get_online_members(GaimConnection *gc, qq_group *group) | 85 void qq_send_cmd_group_get_online_members(GaimConnection *gc, qq_group *group) |
86 { | 86 { |
87 guint8 *raw_data, *cursor; | 87 guint8 *raw_data, *cursor; |
88 gint bytes, data_len; | 88 gint bytes, data_len; |
89 | 89 |
90 g_return_if_fail(gc != NULL && group != NULL); | 90 g_return_if_fail(group != NULL); |
91 | 91 |
92 /* only get online members when conversation window is on */ | 92 /* only get online members when conversation window is on */ |
93 if (NULL == gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT,group->group_name_utf8, gaim_connection_get_account(gc))) { | 93 if (NULL == gaim_find_conversation_with_account(GAIM_CONV_TYPE_CHAT,group->group_name_utf8, gaim_connection_get_account(gc))) { |
94 gaim_debug(GAIM_DEBUG_WARNING, "QQ", | 94 gaim_debug(GAIM_DEBUG_WARNING, "QQ", |
95 "Conv windows for \"%s\" is not on, do not get online members\n", group->group_name_utf8); | 95 "Conv windows for \"%s\" is not on, do not get online members\n", group->group_name_utf8); |
117 guint8 *raw_data, *cursor; | 117 guint8 *raw_data, *cursor; |
118 gint bytes, data_len, i; | 118 gint bytes, data_len, i; |
119 GList *list; | 119 GList *list; |
120 qq_buddy *member; | 120 qq_buddy *member; |
121 | 121 |
122 g_return_if_fail(gc != NULL && group != NULL); | 122 g_return_if_fail(group != NULL); |
123 for (i = 0, list = group->members; list != NULL; list = list->next) { | 123 for (i = 0, list = group->members; list != NULL; list = list->next) { |
124 member = (qq_buddy *) list->data; | 124 member = (qq_buddy *) list->data; |
125 if (_is_group_member_need_update_info(member)) | 125 if (_is_group_member_need_update_info(member)) |
126 i++; | 126 i++; |
127 } | 127 } |
166 GSList *pending_id; | 166 GSList *pending_id; |
167 gint pascal_len, i; | 167 gint pascal_len, i; |
168 guint32 unknown4; | 168 guint32 unknown4; |
169 guint8 unknown1; | 169 guint8 unknown1; |
170 | 170 |
171 g_return_if_fail(gc != NULL && gc->proto_data != NULL); | |
172 g_return_if_fail(data != NULL && len > 0); | 171 g_return_if_fail(data != NULL && len > 0); |
173 qd = (qq_data *) gc->proto_data; | 172 qd = (qq_data *) gc->proto_data; |
174 | 173 |
175 read_packet_dw(data, cursor, len, &(internal_group_id)); | 174 read_packet_dw(data, cursor, len, &(internal_group_id)); |
176 g_return_if_fail(internal_group_id > 0); | 175 g_return_if_fail(internal_group_id > 0); |
248 guint8 unknown; | 247 guint8 unknown; |
249 gint bytes, i; | 248 gint bytes, i; |
250 qq_group *group; | 249 qq_group *group; |
251 qq_buddy *member; | 250 qq_buddy *member; |
252 | 251 |
253 g_return_if_fail(gc != NULL && data != NULL && len > 0); | 252 g_return_if_fail(data != NULL && len > 0); |
254 | 253 |
255 if (data + len - *cursor < 4) { | 254 if (data + len - *cursor < 4) { |
256 gaim_debug(GAIM_DEBUG_ERROR, "QQ", "Invalid group online member reply, discard it!\n"); | 255 gaim_debug(GAIM_DEBUG_ERROR, "QQ", "Invalid group online member reply, discard it!\n"); |
257 return; | 256 return; |
258 } | 257 } |
294 guint16 unknown; | 293 guint16 unknown; |
295 gint pascal_len, i; | 294 gint pascal_len, i; |
296 qq_group *group; | 295 qq_group *group; |
297 qq_buddy *member; | 296 qq_buddy *member; |
298 | 297 |
299 g_return_if_fail(gc != NULL && data != NULL && len > 0); | 298 g_return_if_fail(data != NULL && len > 0); |
300 | 299 |
301 read_packet_dw(data, cursor, len, &internal_group_id); | 300 read_packet_dw(data, cursor, len, &internal_group_id); |
302 g_return_if_fail(internal_group_id > 0); | 301 g_return_if_fail(internal_group_id > 0); |
303 | 302 |
304 group = qq_group_find_by_id(gc, internal_group_id, QQ_INTERNAL_ID); | 303 group = qq_group_find_by_id(gc, internal_group_id, QQ_INTERNAL_ID); |