42 lines
1.3 KiB
C
42 lines
1.3 KiB
C
/* ************************************************************************** */
|
|
/* _____ _ */
|
|
/* packet/send_error.c |_ _|__ _ _| |__ ___ _ _ */
|
|
/* | Project: libp7 | |/ _ \| | | | '_ \ / _ \ | | | */
|
|
/* | | (_) | |_| | | | | __/ |_| | */
|
|
/* By: thomas <thomas@touhey.fr> |_|\___/ \__,_|_| |_|\___|\__, |.fr */
|
|
/* Last updated: 2016/10/13 07:33:17 |___/ */
|
|
/* */
|
|
/* ************************************************************************** */
|
|
#include <libp7/internals.h>
|
|
|
|
/**
|
|
* p7_send_err:
|
|
* Send error.
|
|
*
|
|
* Default response if problem occur.
|
|
*
|
|
* @arg handle the libp7 handle
|
|
* @arg error error subtype
|
|
* @return if it worked
|
|
*/
|
|
|
|
static int p7_send_err(p7_handle_t *handle, p7_errcode_t error)
|
|
{
|
|
return (p7_send_basic(handle, p7_pt_error, error, 1));
|
|
}
|
|
|
|
/**
|
|
* p7_send_err_overwrite_no:
|
|
* Denies overwrite.
|
|
*
|
|
* This packet is the "no" response to overwrite confirmation.
|
|
*
|
|
* @arg handle the libp7 handle
|
|
* @return if it worked
|
|
*/
|
|
|
|
int p7_send_err_overwrite_no(p7_handle_t *handle)
|
|
{
|
|
return (p7_send_err(handle, p7_ec_overwrite_noresponse));
|
|
}
|