7 |
7 |
8 #include <string.h> |
8 #include <string.h> |
9 #include <stdio.h> |
9 #include <stdio.h> |
10 |
10 |
11 struct error_desc _core_error_desc[] = { |
11 struct error_desc _core_error_desc[] = { |
12 { ERR_CALLOC, "calloc", ERR_EXTRA_NONE }, |
12 { ERR_CALLOC, "calloc", ERR_EXTRA_NONE }, |
13 { ERR_GETADDRINFO, "getaddrinfo", ERR_EXTRA_GAI }, |
13 { ERR_GETADDRINFO, "getaddrinfo", ERR_EXTRA_GAI }, |
14 { ERR_GETADDRINFO_EMPTY, "getaddrinfo: no results", ERR_EXTRA_NONE }, |
14 { ERR_GETADDRINFO_EMPTY, "getaddrinfo: no results", ERR_EXTRA_NONE }, |
15 { ERR_EVENT_NEW, "event_new", ERR_EXTRA_NONE }, |
15 { ERR_EVENT_NEW, "event_new", ERR_EXTRA_NONE }, |
16 { ERR_EVENT_ADD, "event_add", ERR_EXTRA_NONE }, |
16 { ERR_EVENT_ADD, "event_add", ERR_EXTRA_NONE }, |
17 { ERR_EVSQL_NEW_PQ, "evsql_new_pq", ERR_EXTRA_NONE }, |
17 { ERR_EVSQL_NEW_PQ, "evsql_new_pq", ERR_EXTRA_NONE }, |
18 }; |
18 { _ERR_INVALID, NULL, 0 } |
19 |
19 |
20 struct error_desc _sock_error_desc[] = { |
20 }, _sock_error_desc[] = { |
21 { ERR_SOCKET, "socket", ERR_EXTRA_ERRNO }, |
21 { ERR_SOCKET, "socket", ERR_EXTRA_ERRNO }, |
22 { ERR_CONNECT, "connect", ERR_EXTRA_ERRNO }, |
22 { ERR_CONNECT, "connect", ERR_EXTRA_ERRNO }, |
23 { ERR_READ, "read", ERR_EXTRA_ERRNO }, |
23 { ERR_READ, "read", ERR_EXTRA_ERRNO }, |
24 { ERR_READ_EOF, "read: EOF", ERR_EXTRA_NONE }, |
24 { ERR_READ_EOF, "read: EOF", ERR_EXTRA_NONE }, |
25 { ERR_WRITE, "write", ERR_EXTRA_ERRNO }, |
25 { ERR_WRITE, "write", ERR_EXTRA_ERRNO }, |
26 { ERR_WRITE_EOF, "write: EOF", ERR_EXTRA_NONE }, |
26 { ERR_WRITE_EOF, "write: EOF", ERR_EXTRA_NONE }, |
27 { ERR_FCNTL, "fcntl", ERR_EXTRA_ERRNO }, |
27 { ERR_FCNTL, "fcntl", ERR_EXTRA_ERRNO }, |
28 { ERR_CLOSE, "close", ERR_EXTRA_ERRNO }, |
28 { ERR_CLOSE, "close", ERR_EXTRA_ERRNO }, |
29 { _ERR_INVALID, NULL, 0 } |
29 { _ERR_INVALID, NULL, 0 } |
30 }; |
|
31 |
30 |
32 struct error_desc _sock_gnutls_error_desc[] = { |
31 }, _sock_gnutls_error_desc[] = { |
33 { ERR_GNUTLS_CERT_ALLOC_CRED, "gnutls_certificate_allocate_credentials", ERR_EXTRA_GNUTLS }, |
32 { ERR_GNUTLS_CERT_ALLOC_CRED, "gnutls_certificate_allocate_credentials", ERR_EXTRA_GNUTLS }, |
34 { ERR_GNUTLS_GLOBAL_INIT, "gnutls_global_init", ERR_EXTRA_GNUTLS }, |
33 { ERR_GNUTLS_GLOBAL_INIT, "gnutls_global_init", ERR_EXTRA_GNUTLS }, |
35 { ERR_GNUTLS_SET_DEFAULT_PRIORITY,"gnutls_set_default_priority", ERR_EXTRA_GNUTLS }, |
34 { ERR_GNUTLS_SET_DEFAULT_PRIORITY, "gnutls_set_default_priority", ERR_EXTRA_GNUTLS }, |
36 { ERR_GNUTLS_CRED_SET, "gnutls_credentials_set", ERR_EXTRA_GNUTLS }, |
35 { ERR_GNUTLS_CRED_SET, "gnutls_credentials_set", ERR_EXTRA_GNUTLS }, |
37 { ERR_GNUTLS_HANDSHAKE, "gnutls_handshake", ERR_EXTRA_GNUTLS }, |
36 { ERR_GNUTLS_HANDSHAKE, "gnutls_handshake", ERR_EXTRA_GNUTLS }, |
38 { ERR_GNUTLS_RECORD_SEND, "gnutls_record_send", ERR_EXTRA_GNUTLS }, |
37 { ERR_GNUTLS_RECORD_SEND, "gnutls_record_send", ERR_EXTRA_GNUTLS }, |
39 { ERR_GNUTLS_RECORD_RECV, "gnutls_record_recv", ERR_EXTRA_GNUTLS }, |
38 { ERR_GNUTLS_RECORD_RECV, "gnutls_record_recv", ERR_EXTRA_GNUTLS }, |
40 { ERR_GNUTLS_RECORD_GET_DIRECTION,"gnutls_record_get_direction", ERR_EXTRA_GNUTLS }, |
39 { ERR_GNUTLS_RECORD_GET_DIRECTION, "gnutls_record_get_direction", ERR_EXTRA_GNUTLS }, |
41 { _ERR_INVALID, NULL, 0 } |
40 { _ERR_INVALID, NULL, 0 } |
|
41 |
42 }; |
42 }; |
43 |
43 |
44 /** |
44 /** |
45 * Array of error_desc tables |
45 * Array of error_desc tables |
46 */ |
46 */ |