cake
/
p7utils
Archived
1
0
Fork 0
This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
p7utils/src/p7servtest/client.c

31 lines
1.2 KiB
C

/* ************************************************************************** */
/* _____ _ */
/* client.c |_ _|__ _ _| |__ ___ _ _ */
/* | Project: p7test | |/ _ \| | | | '_ \ / _ \ | | | */
/* | | (_) | |_| | | | | __/ |_| | */
/* By: thomas <thomas@touhey.fr> |_|\___/ \__,_|_| |_|\___|\__, |.fr */
/* Last updated: 2017/01/13 01:40:23 |___/ */
/* */
/* ************************************************************************** */
#include "main.h"
#include <libp7.h>
#include <libp7/packetio.h>
void run_client(int in, int out)
{
/* make the handle */
p7_handle_t *handle = NULL; int err;
if ((err = p7_fdinit(&handle, P7_ACTIVE | P7_CHECK | P7_TERM, "client",
in, out))) {
fprintf(stderr, "Client initialization encountered an error: %s\n",
p7_strerror(err));
return ;
}
/* change working directory. */
p7_send_cmdfls_cwd(handle, "oui", "fls0");
/* we're done. */
p7_exit(handle);
}