src/protocols/msn/directconn.c

changeset 10899
87d9aec5b72d
parent 10589
4e10236e06d4
child 12323
f52908fb23b0
equal deleted inserted replaced
10898:d5feea33d82a 10899:87d9aec5b72d
313 msn_directconn_destroy(directconn); 313 msn_directconn_destroy(directconn);
314 314
315 return; 315 return;
316 } 316 }
317 317
318 body = g_malloc(body_len); 318 body = g_try_malloc(body_len);
319 319
320 /* Let's read the data. */ 320 if (body != NULL)
321 len = read(directconn->fd, body, body_len); 321 {
322 322 /* Let's read the data. */
323 gaim_debug_info("msn", "len=%d\n", len); 323 len = read(directconn->fd, body, body_len);
324
325 gaim_debug_info("msn", "len=%d\n", len);
326 }
327 else
328 {
329 gaim_debug_error("msn", "Failed to allocate memory for read\n");
330 len = 0;
331 }
324 332
325 if (len > 0) 333 if (len > 0)
326 { 334 {
327 MsnMessage *msg; 335 MsnMessage *msg;
328 336

mercurial