103,235c103
<
< const char *DEBUG_GET_MESSAGE_SOCKET(int code) {
< switch(code) {
< case EAFNOSUPPORT: return "EAFNOSUPPORT";
< case EPROTONOSUPPORT: return "EPROTONOSUPPORT";
< case EPROTOTYPE: return "EPROTOTYPE";
< case EMFILE: return "EMFILE";
< case ENFILE: return "ENFILE";
< case ENOBUFS: return "ENOBUFS";
< case EACCES: return "EACCES";
< default: return "E????";
< };
< };
<
< const char *DEBUG_GET_MESSAGE_BIND(int code) {
< switch(code) {
< case EBADF: return "EBADF";
< case ENOTSOCK: return "ENOTSOCK";
< case EADDRNOTAVAIL: return "EADDRNOTAVAIL";
< case EADDRINUSE: return "EADDRINUSE";
< case EINVAL: return "EINVAL";
< case EAFNOSUPPORT: return "EAFNOSUPPORT";
< case ENOBUFS: return "ENOBUFS";
< case EACCES: return "EACCES";
< case EFAULT: return "EFAULT";
< case ENOTDIR: return "ENOTDIR";
< case ENAMETOOLONG: return "ENAMETOOLONG";
< case ENOENT: return "ENOENT";
< case ELOOP: return "ELOOP";
< case EIO: return "EIO";
< case EROFS: return "EROFS";
< case EISDIR: return "EISDIR";
< default: return "E????";
< };
< };
<
< const char *DEBUG_GET_MESSAGE_LISTEN(int code) {
< switch(code) {
< case EBADF: return "EBADF";
< case ENOTSOCK: return "ENOTSOCK";
< case EOPNOTSUPP: return "EOPNOTSUPP";
< case EINVAL: return "EINVAL";
< default: return "E????";
< };
< };
<
< const char *DEBUG_GET_MESSAGE_CONNECT(int code) {
< switch(code) {
< case EBADF: return "EBADF";
< case ENOTSOCK: return "ENOTSOCK";
< case EADDRNOTAVAIL: return "EADDRNOTAVAIL";
< case EAFNOSUPPORT: return "EAFNOSUPPORT";
< case EISCONN: return "EISCONN";
< case ETIMEDOUT: return "ETIMEDOUT";
< case EINVAL: return "EINVAL";
< case ECONNREFUSED: return "ECONNREFUSED";
< case EHOSTUNREACH: return "EHOSTUNREACH";
< case EINTR: return "EINTR";
< case ENETUNREACH: return "ENETUNREACH";
< case EADDRINUSE: return "EADDRINUSE";
< case EFAULT: return "EFAULT";
< case EINPROGRESS: return "EINPROGRESS";
< case EALREADY: return "EALREADY";
< case EPERM: return "EPERM";
< case ENOTDIR: return "ENOTDIR";
< case ENAMETOOLONG: return "ENAMETOOLONG";
< case ENOENT: return "ENOENT";
< case EACCES: return "EACCES";
< case ELOOP: return "ELOOP";
< case EPROTOTYPE: return "EPROTOTYPE";
< default: return "E????";
< };
< };
<
< const char *DEBUG_GET_MESSAGE_SEND(int code) {
< switch(code) {
< case EBADF: return "EBADF";
< case ENOTSOCK: return "ENOTSOCK";
< case EFAULT: return "EFAULT";
< case EMSGSIZE: return "EMSGSIZE";
< case EAGAIN: return "EAGAIN";
< case ENOBUFS: return "ENOBUFS";
< case EACCES: return "EACCES";
< case EHOSTUNREACH: return "EHOSTUNREACH";
< case EINVAL: return "EINVAL";
< case EHOSTDOWN: return "EHOSTDOWN";
< case ENETDOWN: return "ENETDOWN";
< case ECONNREFUSED: return "ECONNREFUSED";
< case ENOPROTOOPT: return "ENORPOTOOPT";
< case EDESTADDRREQ: return "EDESTADDRREQ";
< case EPIPE: return "EPIPE";
< case EADDRNOTAVAIL: return "EADDRNOTAVAIL";
< case EAFNOSUPPORT: return "EAFNOSUPPORT";
< case EISCONN: return "EISCONN";
< case EMFILE: return "EMFILE";
< default: return "E????";
< };
< };
<
< const char *DEBUG_GET_MESSAGE_ACCEPT(int code) {
< switch(code) {
< case EBADF: return "EBADF";
< case ENOTSOCK: return "ENOTSOCK";
< case EOPNOTSUPP: return "EOPNOTSUPP";
< case EINTR: return "EINTR";
< case EINVAL: return "EINVAL";
< case EFAULT: return "EFAULT";
< case EWOULDBLOCK: return "EWOULDBLOCK";
< case EMFILE: return "EMFILE";
< case ENFILE: return "ENFILE";
< case ECONNABORTED: return "ECONNABORTED";
< default: return "E????";
< };
< };
<
< const char *DEBUG_GET_MESSAGE_RECV(int code) {
< switch(code) {
< case EBADF: return "EBADF";
< case ENOTCONN: return "ENOTCONN";
< case ENOTSOCK: return "ENOTSOCK";
< case EAGAIN: return "EAGAIN";
< case EINTR: return "EINTR";
< case EFAULT: return "EFAULT";
< case EHOSTUNREACH: return "EHOSTUNREACH";
< case EHOSTDOWN: return "EHOSTDOWN";
< case ENETDOWN: return "ENETDOWN";
< case ECONNREFUSED: return "ECONNREFUSED";
< case EINVAL: return "EINVAL";
< case EMSGSIZE: return "EMSGSIZE";
< default: return "E????";
< };
< };
<
---
>
277c145
< status_message = DEBUG_GET_MESSAGE_SOCKET(errno);
---
> status_message = std::strerror(errno);
313c181
< status_message = DEBUG_GET_MESSAGE_BIND(errno);
---
> status_message = std::strerror(errno);
325c193
< status_message = DEBUG_GET_MESSAGE_LISTEN(errno);;
---
> status_message = std::strerror(errno);;
352c220
< status_message = DEBUG_GET_MESSAGE_CONNECT(errno);
---
> status_message = std::strerror(errno);
364c232
< status_message = DEBUG_GET_MESSAGE_SEND(errno);
---
> status_message = std::strerror(errno);
393c261
< status_message = DEBUG_GET_MESSAGE_SEND(errno);
---
> status_message = std::strerror(errno);
420c288
< status_message = DEBUG_GET_MESSAGE_ACCEPT(errno);
---
> status_message = std::strerror(errno);
442c310
< status_message = DEBUG_GET_MESSAGE_RECV(errno);
---
> status_message = std::strerror(errno);