6
6
* Definition of mge_errno error descriptions and global error variables.
8
* @author Copyright (C) 2017-2018 Mark Grant
8
* @author Copyright (C) 2017-2019 Mark Grant
10
10
* Released under the GPLv3 only.\n
11
11
* SPDX-License-Identifier: GPL-3.0
13
* @version _v1.0.9 ==== 09/09/2018_
13
* @version _v1.0.10 ==== 08/06/2019_
16
16
/* **********************************************************************
31
31
* 09/09/2018 MG 1.0.9 Use ARRAY_SIZE macro from new *
32
32
* mge-general.h header file. *
33
* 08/06/2019 MG 1.0.10 clang-format coding style changes. *
34
35
************************************************************************
38
38
#include <sys/types.h>
40
41
#include <mge-errno.h>
41
42
#include <mge-general.h>
45
44
/* Error variables. */
46
int mge_errno; /**< Error number. */
47
int sav_errno; /**< Used to store errno, gai_errno etc. */
45
int mge_errno; /**< Error number. */
46
int sav_errno; /**< Used to store errno, gai_errno etc. */
50
49
* Global array of mge-errno descriptions.
52
const char *errno_desc[] = {
54
"sav_errno contains the errno error.",
55
"sav_errno contains the getaddrinfo error.",
56
"Bind or Connect failed on getaddrinfo data.",
57
"Error in parameters passed.",
58
"Duplicate node found.",
60
"Invalid config file parameter.",
61
"Cannot parse config file.",
62
"Invalid message received.",
51
const char *errno_desc[] = { "Success.",
52
"sav_errno contains the errno error.",
53
"sav_errno contains the getaddrinfo error.",
54
"Bind or Connect failed on getaddrinfo data.",
55
"Error in parameters passed.",
56
"Duplicate node found.",
58
"Invalid config file parameter.",
59
"Cannot parse config file.",
60
"Invalid message received.",
63
"Client is blocked." };
69
66
* Size of the error description array.
71
68
const size_t errno_desc_size = ARRAY_SIZE(errno_desc);