added sample data for user 'a'
This commit is contained in:
parent
85d0716fbe
commit
d7d427e902
5 changed files with 8 additions and 5 deletions
1
ftp/data/a/hello.txt
Normal file
1
ftp/data/a/hello.txt
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
Hello ftp world
|
||||||
0
ftp/data/a/testdir/emptyfile
Normal file
0
ftp/data/a/testdir/emptyfile
Normal file
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/11/09 14:04:01 by jhalford #+# #+# */
|
/* Created: 2017/11/09 14:04:01 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/11/12 15:02:32 by jhalford ### ########.fr */
|
/* Updated: 2017/11/12 15:09:21 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/04/02 19:18:31 by jhalford #+# #+# */
|
/* Created: 2017/04/02 19:18:31 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/11/12 14:56:28 by jhalford ### ########.fr */
|
/* Updated: 2017/11/12 15:14:18 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -29,7 +29,7 @@ t_cmd_map g_cli_cmd[] =
|
||||||
{"debug", cli_debug, "set debugging level"},
|
{"debug", cli_debug, "set debugging level"},
|
||||||
{0, 0, 0},
|
{0, 0, 0},
|
||||||
};
|
};
|
||||||
int g_debug = 1;
|
int g_debug = 0;
|
||||||
|
|
||||||
t_cmd_map *get_cmd(char *cmd)
|
t_cmd_map *get_cmd(char *cmd)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
/* By: jhalford <jack@crans.org> +#+ +:+ +#+ */
|
||||||
/* +#+#+#+#+#+ +#+ */
|
/* +#+#+#+#+#+ +#+ */
|
||||||
/* Created: 2017/11/08 19:52:07 by jhalford #+# #+# */
|
/* Created: 2017/11/08 19:52:07 by jhalford #+# #+# */
|
||||||
/* Updated: 2017/11/12 14:45:09 by jhalford ### ########.fr */
|
/* Updated: 2017/11/12 15:13:42 by jhalford ### ########.fr */
|
||||||
/* */
|
/* */
|
||||||
/* ************************************************************************** */
|
/* ************************************************************************** */
|
||||||
|
|
||||||
|
|
@ -54,9 +54,11 @@ int ftp_recv(int sock, char **msg)
|
||||||
buf[ret] = 0;
|
buf[ret] = 0;
|
||||||
if (buf[ret - 1] == '\n' && buf[ret - 2] == '\r')
|
if (buf[ret - 1] == '\n' && buf[ret - 2] == '\r')
|
||||||
buf[ret - 2] = 0;
|
buf[ret - 2] = 0;
|
||||||
|
else if (buf[ret - 1] == '\n')
|
||||||
|
buf[ret - 1] = 0;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
console_msg(2, "recv'd non-crlf message '%s'", buf);
|
console_msg(2, "recv'd non-crlf/lf message '%s'", buf);
|
||||||
return (1);
|
return (1);
|
||||||
}
|
}
|
||||||
*msg = ft_strdup(buf);
|
*msg = ft_strdup(buf);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue