32 lines
1.0 KiB
C
32 lines
1.0 KiB
C
/* ************************************************************************** */
|
|
/* _____ _ */
|
|
/* packet/shift.c |_ _|__ _ _| |__ ___ _ _ */
|
|
/* | Project: libp7 | |/ _ \| | | | '_ \ / _ \ | | | */
|
|
/* | | (_) | |_| | | | | __/ |_| | */
|
|
/* By: thomas <thomas@touhey.fr> |_|\___/ \__,_|_| |_|\___|\__, |.fr */
|
|
/* Last updated: 2016/10/13 07:33:17 |___/ */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
#include <libp7/internals.h>
|
|
#include <string.h>
|
|
|
|
/**
|
|
* p7_unshift:
|
|
* Unshift packet.
|
|
*
|
|
* @arg handle the libp7 handle
|
|
* @return if it worked
|
|
*/
|
|
|
|
int p7_unshift(p7_handle_t *handle)
|
|
{
|
|
/* truly unshift */
|
|
int err;
|
|
if ((err = p7_recv(handle, 1)))
|
|
return (err);
|
|
handle->_shifted = 0;
|
|
|
|
/* then return */
|
|
return (0);
|
|
}
|