comparison lib/rfc959.c @ 15:82fabd6ef1c4

FXP fixes (from Tobias Gruetzmacher <tobias@portfolio16.de>)
author masneyb
date Wed, 04 Sep 2002 13:02:15 +0000
parents 83090328581e
children c8ec7877432e
comparison
equal deleted inserted replaced
14:83090328581e 15:82fabd6ef1c4
451 endpos++; 451 endpos++;
452 if (*endpos == ')') 452 if (*endpos == ')')
453 *endpos = '\0'; 453 *endpos = '\0';
454 454
455 tempstr = g_strconcat ("PORT ", pos, "\r\n", NULL); 455 tempstr = g_strconcat ("PORT ", pos, "\r\n", NULL);
456 g_free (tempstr);
457 if (rfc959_send_command (toreq, tempstr) != '2') 456 if (rfc959_send_command (toreq, tempstr) != '2')
458 return (-2); 457 {
458 g_free (tempstr);
459 return (-2);
460 }
461 g_free (tempstr);
459 462
460 tempstr = g_strconcat ("RETR ", fromfile, "\r\n", NULL); 463 tempstr = g_strconcat ("RETR ", fromfile, "\r\n", NULL);
461 g_free (tempstr);
462 if (write_to_socket (fromreq, tempstr) < 0) 464 if (write_to_socket (fromreq, tempstr) < 0)
463 return (-1); 465 {
466 g_free (tempstr);
467 return (-2);
468 }
469 g_free (tempstr);
464 470
465 tempstr = g_strconcat ("STOR ", tofile, "\r\n", NULL); 471 tempstr = g_strconcat ("STOR ", tofile, "\r\n", NULL);
466 g_free (tempstr);
467 if (write_to_socket (toreq, tempstr) < 0) 472 if (write_to_socket (toreq, tempstr) < 0)
468 return (-1); 473 {
474 g_free (tempstr);
475 return (-2);
476 }
477 g_free (tempstr);
469 478
470 if (rfc959_read_response (fromreq) < 0) 479 if (rfc959_read_response (fromreq) < 0)
471 return (-2); 480 return (-2);
472 if (rfc959_read_response (toreq) < 0) 481 if (rfc959_read_response (toreq) < 0)
473 return (-2); 482 return (-2);