Mercurial > pidgin.yaz
comparison libpurple/protocols/msn/xfer.c @ 32748:845885bd5e4d
Since we don't know what these fields are, and we don't use them,
there's probably no need to waste memory for them.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 15 Oct 2011 23:43:14 +0000 |
parents | 92711688c245 |
children | b2b704d658da |
comparison
equal
deleted
inserted
replaced
32747:13b5d6eb099d | 32748:845885bd5e4d |
---|---|
172 msn_push32le(tmp, context->version); | 172 msn_push32le(tmp, context->version); |
173 msn_push64le(tmp, context->file_size); | 173 msn_push64le(tmp, context->file_size); |
174 msn_push32le(tmp, context->type); | 174 msn_push32le(tmp, context->type); |
175 memcpy(tmp, context->file_name, MAX_FILE_NAME_LEN * 2); | 175 memcpy(tmp, context->file_name, MAX_FILE_NAME_LEN * 2); |
176 tmp += MAX_FILE_NAME_LEN * 2; | 176 tmp += MAX_FILE_NAME_LEN * 2; |
177 #if 0 | |
177 memcpy(tmp, context->unknown1, sizeof(context->unknown1)); | 178 memcpy(tmp, context->unknown1, sizeof(context->unknown1)); |
178 tmp += sizeof(context->unknown1); | 179 tmp += sizeof(context->unknown1); |
179 msn_push32le(tmp, context->unknown2); | 180 msn_push32le(tmp, context->unknown2); |
181 #else | |
182 memset(tmp, 0, sizeof(gchar[30])); | |
183 tmp += sizeof(gchar[30]); | |
184 msn_push32le(tmp, 0); | |
185 #endif | |
180 if (context->preview) { | 186 if (context->preview) { |
181 memcpy(tmp, context->preview, context->preview_len); | 187 memcpy(tmp, context->preview, context->preview_len); |
182 } | 188 } |
183 tmp[context->preview_len] = '\0'; | 189 tmp[context->preview_len] = '\0'; |
184 | 190 |
216 | 222 |
217 context->file_size = msn_pop64le(buf); | 223 context->file_size = msn_pop64le(buf); |
218 context->type = msn_pop32le(buf); | 224 context->type = msn_pop32le(buf); |
219 memcpy(context->file_name, buf, MAX_FILE_NAME_LEN * 2); | 225 memcpy(context->file_name, buf, MAX_FILE_NAME_LEN * 2); |
220 buf += MAX_FILE_NAME_LEN * 2; | 226 buf += MAX_FILE_NAME_LEN * 2; |
227 #if 0 | |
221 memcpy(context->unknown1, buf, sizeof(context->unknown1)); | 228 memcpy(context->unknown1, buf, sizeof(context->unknown1)); |
222 buf += sizeof(context->unknown1); | 229 buf += sizeof(context->unknown1); |
223 context->unknown2 = msn_pop32le(buf); | 230 context->unknown2 = msn_pop32le(buf); |
231 #else | |
232 buf += sizeof(gchar[30]) + sizeof(guint32); | |
233 #endif | |
224 | 234 |
225 if (context->type == 0 && len > context->length) { | 235 if (context->type == 0 && len > context->length) { |
226 context->preview_len = len - context->length; | 236 context->preview_len = len - context->length; |
227 context->preview = g_memdup(buf, context->preview_len); | 237 context->preview = g_memdup(buf, context->preview_len); |
228 } else { | 238 } else { |