comparison lib/rfc959.c @ 478:97fd5eb34be0

2004-6-6 Brian Masney <masneyb@gftp.org> * acinclude.m4 configure.in - added AC_TYPE_INTPTR_T that will define intptr_t if it does not exist on the system * lib/gftp.h lib/protocols.c lib/rfc959.c src/uicommon/gftpuicallbacks.c - added specify site argument to rfc959_site(). If this is set, then SITE will be prepended to the command
author masneyb
date Sun, 06 Jun 2004 15:12:35 +0000
parents 39d9cf1bf0df
children 7334a74db6f6
comparison
equal deleted inserted replaced
477:4222894fcc10 478:97fd5eb34be0
1663 return (GFTP_ERETRYABLE); 1663 return (GFTP_ERETRYABLE);
1664 } 1664 }
1665 1665
1666 1666
1667 static int 1667 static int
1668 rfc959_site (gftp_request * request, const char *command) 1668 rfc959_site (gftp_request * request, int specify_site, const char *command)
1669 { 1669 {
1670 char *tempstr, ret; 1670 char *tempstr, ret;
1671 1671
1672 g_return_val_if_fail (request != NULL, GFTP_EFATAL); 1672 g_return_val_if_fail (request != NULL, GFTP_EFATAL);
1673 g_return_val_if_fail (command != NULL, GFTP_EFATAL); 1673 g_return_val_if_fail (command != NULL, GFTP_EFATAL);
1674 g_return_val_if_fail (request->datafd > 0, GFTP_EFATAL); 1674 g_return_val_if_fail (request->datafd > 0, GFTP_EFATAL);
1675 1675
1676 tempstr = g_strconcat ("SITE ", command, "\r\n", NULL); 1676 if (specify_site)
1677 tempstr = g_strconcat ("SITE ", command, "\r\n", NULL);
1678 else
1679 tempstr = g_strconcat (command, "\r\n", NULL);
1680
1677 ret = rfc959_send_command (request, tempstr, 1); 1681 ret = rfc959_send_command (request, tempstr, 1);
1678 g_free (tempstr); 1682 g_free (tempstr);
1679 1683
1680 if (ret < 0) 1684 if (ret < 0)
1681 return (ret); 1685 return (ret);