aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Makefile_Ecore_Con.am1
-rw-r--r--src/lib/ecore_con/Ecore_Con_Eo.h2
-rw-r--r--src/lib/ecore_con/ecore_con.c20
-rw-r--r--src/lib/ecore_con/ecore_con_url_curl.c2
-rw-r--r--src/lib/ecore_con/efl_net_dialer.eo1
-rw-r--r--src/lib/ecore_con/efl_net_dialer_udp.c2
-rw-r--r--src/lib/ecore_con/efl_net_dialer_unix.c4
-rw-r--r--src/lib/ecore_con/efl_net_server.eo2
-rw-r--r--src/lib/ecore_con/efl_net_server_tcp.c2
-rw-r--r--src/lib/ecore_con/efl_net_server_udp.c2
-rw-r--r--src/lib/ecore_con/efl_net_server_unix.c4
-rw-r--r--src/lib/ecore_con/efl_net_types.eot3
12 files changed, 23 insertions, 22 deletions
diff --git a/src/Makefile_Ecore_Con.am b/src/Makefile_Ecore_Con.am
index 1fc3ea5441..10285c6f0c 100644
--- a/src/Makefile_Ecore_Con.am
+++ b/src/Makefile_Ecore_Con.am
@@ -40,6 +40,7 @@ ecore_con_eolian_files += \
endif
ecore_con_eolian_type_files = \
+ lib/ecore_con/efl_net_types.eot \
lib/ecore_con/efl_net_http_types.eot \
lib/ecore_con/efl_net_ssl_types.eot
diff --git a/src/lib/ecore_con/Ecore_Con_Eo.h b/src/lib/ecore_con/Ecore_Con_Eo.h
index 76c6d304ec..089c88cbea 100644
--- a/src/lib/ecore_con/Ecore_Con_Eo.h
+++ b/src/lib/ecore_con/Ecore_Con_Eo.h
@@ -1,3 +1,5 @@
+#include "efl_net_types.eot.h"
+
#include "efl_net_socket.eo.h"
#include "efl_net_dialer.eo.h"
#include "efl_net_server.eo.h"
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index d603eae052..7aaeb35104 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -56,13 +56,12 @@ int sd_fd_index = 0;
int sd_fd_max = 0;
#endif
+EWAPI Eina_Error EFL_NET_ERROR_COULDNT_RESOLVE_HOST = 0;
+
EWAPI Eina_Error EFL_NET_DIALER_ERROR_COULDNT_CONNECT = 0;
EWAPI Eina_Error EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_PROXY = 0;
-EWAPI Eina_Error EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_HOST = 0;
EWAPI Eina_Error EFL_NET_DIALER_ERROR_PROXY_AUTHENTICATION_FAILED = 0;
-EWAPI Eina_Error EFL_NET_SERVER_ERROR_COULDNT_RESOLVE_HOST = 0;
-
EWAPI Eina_Error EFL_NET_SOCKET_SSL_ERROR_HANDSHAKE = 0;
EWAPI Eina_Error EFL_NET_SOCKET_SSL_ERROR_CERTIFICATE_VERIFY_FAILED = 0;
@@ -101,13 +100,12 @@ ecore_con_init(void)
ecore_con_mempool_init();
ecore_con_legacy_init();
+ EFL_NET_ERROR_COULDNT_RESOLVE_HOST = eina_error_msg_static_register("Couldn't resolve host name");
+
EFL_NET_DIALER_ERROR_COULDNT_CONNECT = eina_error_msg_static_register("Couldn't connect to server");
EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_PROXY = eina_error_msg_static_register("Couldn't resolve proxy name");
- EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_HOST = eina_error_msg_static_register("Couldn't resolve host name");
EFL_NET_DIALER_ERROR_PROXY_AUTHENTICATION_FAILED = eina_error_msg_static_register("Proxy authentication failed");
- EFL_NET_SERVER_ERROR_COULDNT_RESOLVE_HOST = eina_error_msg_static_register("Couldn't resolve host name");
-
EFL_NET_SOCKET_SSL_ERROR_HANDSHAKE = eina_error_msg_static_register("Failed SSL handshake");
EFL_NET_SOCKET_SSL_ERROR_CERTIFICATE_VERIFY_FAILED = eina_error_msg_static_register("Failed to verify peer's certificate");
@@ -1000,7 +998,7 @@ _efl_net_ip_resolve_and_connect(const char *host, const char *port, int type, in
{
DBG("couldn't resolve host='%s', port='%s': %s",
host, port, gai_strerror(r));
- ret = EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_HOST;
+ ret = EFL_NET_ERROR_COULDNT_RESOLVE_HOST;
*sockfd = INVALID_SOCKET;
}
else
@@ -1218,7 +1216,7 @@ _efl_net_ip_connect_async_run_socks4(Efl_Net_Ip_Connect_Async_Data *d, const cha
{
DBG("couldn't resolve host='%s', port='%s': %s",
host, port, gai_strerror(r));
- d->error = EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_HOST;
+ d->error = EFL_NET_ERROR_COULDNT_RESOLVE_HOST;
}
else
{
@@ -1317,7 +1315,7 @@ _efl_net_ip_connect_async_run_socks4a(Efl_Net_Ip_Connect_Async_Data *d, const ch
if (r != 0)
{
DBG("couldn't resolve port='%s': %s", port, gai_strerror(r));
- d->error = EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_HOST;
+ d->error = EFL_NET_ERROR_COULDNT_RESOLVE_HOST;
}
else
{
@@ -1806,7 +1804,7 @@ _efl_net_ip_connect_async_run_socks5(Efl_Net_Ip_Connect_Async_Data *d, const cha
{
DBG("couldn't resolve host='%s', port='%s': %s",
host, port, gai_strerror(r));
- d->error = EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_HOST;
+ d->error = EFL_NET_ERROR_COULDNT_RESOLVE_HOST;
}
else
{
@@ -1928,7 +1926,7 @@ _efl_net_ip_connect_async_run_socks5h(Efl_Net_Ip_Connect_Async_Data *d, const ch
if (r != 0)
{
DBG("couldn't resolve port='%s': %s", port, gai_strerror(r));
- d->error = EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_HOST;
+ d->error = EFL_NET_ERROR_COULDNT_RESOLVE_HOST;
}
else
{
diff --git a/src/lib/ecore_con/ecore_con_url_curl.c b/src/lib/ecore_con/ecore_con_url_curl.c
index 507dd61e74..4b325a15cf 100644
--- a/src/lib/ecore_con/ecore_con_url_curl.c
+++ b/src/lib/ecore_con/ecore_con_url_curl.c
@@ -89,7 +89,7 @@ _curlcode_to_eina_error(const CURLcode code)
case CURLE_COULDNT_CONNECT: return EFL_NET_DIALER_ERROR_COULDNT_CONNECT;
case CURLE_COULDNT_RESOLVE_PROXY: return EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_PROXY;
- case CURLE_COULDNT_RESOLVE_HOST: return EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_HOST;
+ case CURLE_COULDNT_RESOLVE_HOST: return EFL_NET_ERROR_COULDNT_RESOLVE_HOST;
#define _MAP(n) case CURLE_ ## n: return EFL_NET_HTTP_ERROR_ ## n
diff --git a/src/lib/ecore_con/efl_net_dialer.eo b/src/lib/ecore_con/efl_net_dialer.eo
index f9d6d02663..acc6908ac9 100644
--- a/src/lib/ecore_con/efl_net_dialer.eo
+++ b/src/lib/ecore_con/efl_net_dialer.eo
@@ -1,6 +1,5 @@
var Efl.Net.Dialer.Error.COULDNT_CONNECT: Eina.Error; [[The dialer could not connect to the remote]]
var Efl.Net.Dialer.Error.COULDNT_RESOLVE_PROXY: Eina.Error; [[The dialer could not resolve the given proxy server]]
-var Efl.Net.Dialer.Error.COULDNT_RESOLVE_HOST: Eina.Error; [[The dialer could not resolve the given host name ]]
var Efl.Net.Dialer.Error.PROXY_AUTHENTICATION_FAILED: Eina.Error; [[The dialer failed to authenticate against the proxy server]]
interface Efl.Net.Dialer (Efl.Net.Socket) {
diff --git a/src/lib/ecore_con/efl_net_dialer_udp.c b/src/lib/ecore_con/efl_net_dialer_udp.c
index 9b7e687758..ec7ea9ea69 100644
--- a/src/lib/ecore_con/efl_net_dialer_udp.c
+++ b/src/lib/ecore_con/efl_net_dialer_udp.c
@@ -189,7 +189,7 @@ _efl_net_dialer_udp_resolved(void *data, const char *host EINA_UNUSED, const cha
if (gai_error)
{
- err = EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_HOST;
+ err = EFL_NET_ERROR_COULDNT_RESOLVE_HOST;
goto end;
}
diff --git a/src/lib/ecore_con/efl_net_dialer_unix.c b/src/lib/ecore_con/efl_net_dialer_unix.c
index e3e3619045..295d1b1c0f 100644
--- a/src/lib/ecore_con/efl_net_dialer_unix.c
+++ b/src/lib/ecore_con/efl_net_dialer_unix.c
@@ -141,7 +141,7 @@ _efl_net_dialer_unix_efl_net_dialer_dial(Eo *o, Efl_Net_Dialer_Unix_Data *pd EIN
if (strlen(path) + 2 > sizeof(addr.sun_path))
{
ERR("abstract path is too long: %s", path);
- return EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_HOST;
+ return EFL_NET_ERROR_COULDNT_RESOLVE_HOST;
}
addr.sun_path[0] = '\0';
memcpy(addr.sun_path + 1, path, strlen(path) + 1);
@@ -153,7 +153,7 @@ _efl_net_dialer_unix_efl_net_dialer_dial(Eo *o, Efl_Net_Dialer_Unix_Data *pd EIN
if (strlen(path) + 1 > sizeof(addr.sun_path))
{
ERR("path is too long: %s", path);
- return EFL_NET_DIALER_ERROR_COULDNT_RESOLVE_HOST;
+ return EFL_NET_ERROR_COULDNT_RESOLVE_HOST;
}
memcpy(addr.sun_path, path, strlen(path) + 1);
addrlen = strlen(path) + 1 + offsetof(struct sockaddr_un, sun_path);
diff --git a/src/lib/ecore_con/efl_net_server.eo b/src/lib/ecore_con/efl_net_server.eo
index f4a7cd74a3..64b73e57ca 100644
--- a/src/lib/ecore_con/efl_net_server.eo
+++ b/src/lib/ecore_con/efl_net_server.eo
@@ -1,5 +1,3 @@
-var Efl.Net.Server.Error.COULDNT_RESOLVE_HOST: Eina.Error; [[The server could not resolve the given host name or port given as address.]]
-
interface Efl.Net.Server {
[[The basic server interface.
diff --git a/src/lib/ecore_con/efl_net_server_tcp.c b/src/lib/ecore_con/efl_net_server_tcp.c
index f13010996c..c4d1a6259f 100644
--- a/src/lib/ecore_con/efl_net_server_tcp.c
+++ b/src/lib/ecore_con/efl_net_server_tcp.c
@@ -137,7 +137,7 @@ _efl_net_server_tcp_resolved(void *data, const char *host EINA_UNUSED, const cha
if (gai_error)
{
- err = EFL_NET_SERVER_ERROR_COULDNT_RESOLVE_HOST;
+ err = EFL_NET_ERROR_COULDNT_RESOLVE_HOST;
goto end;
}
diff --git a/src/lib/ecore_con/efl_net_server_udp.c b/src/lib/ecore_con/efl_net_server_udp.c
index 258f4ad3e7..b83f5826b0 100644
--- a/src/lib/ecore_con/efl_net_server_udp.c
+++ b/src/lib/ecore_con/efl_net_server_udp.c
@@ -184,7 +184,7 @@ _efl_net_server_udp_resolved(void *data, const char *host EINA_UNUSED, const cha
if (gai_error)
{
- err = EFL_NET_SERVER_ERROR_COULDNT_RESOLVE_HOST;
+ err = EFL_NET_ERROR_COULDNT_RESOLVE_HOST;
goto end;
}
diff --git a/src/lib/ecore_con/efl_net_server_unix.c b/src/lib/ecore_con/efl_net_server_unix.c
index c27f59c8c0..4ec917689d 100644
--- a/src/lib/ecore_con/efl_net_server_unix.c
+++ b/src/lib/ecore_con/efl_net_server_unix.c
@@ -77,7 +77,7 @@ _efl_net_server_unix_bind(Eo *o, Efl_Net_Server_Unix_Data *pd)
if (strlen(path) + 2 > sizeof(addr.sun_path))
{
ERR("abstract path is too long: %s", path);
- err = EFL_NET_SERVER_ERROR_COULDNT_RESOLVE_HOST;
+ err = EFL_NET_ERROR_COULDNT_RESOLVE_HOST;
}
addr.sun_path[0] = '\0';
memcpy(addr.sun_path + 1, path, strlen(path) + 1);
@@ -89,7 +89,7 @@ _efl_net_server_unix_bind(Eo *o, Efl_Net_Server_Unix_Data *pd)
if (strlen(path) + 1 > sizeof(addr.sun_path))
{
ERR("path is too long: %s", path);
- err = EFL_NET_SERVER_ERROR_COULDNT_RESOLVE_HOST;
+ err = EFL_NET_ERROR_COULDNT_RESOLVE_HOST;
}
memcpy(addr.sun_path, path, strlen(path) + 1);
addrlen = strlen(path) + 1 + offsetof(struct sockaddr_un, sun_path);
diff --git a/src/lib/ecore_con/efl_net_types.eot b/src/lib/ecore_con/efl_net_types.eot
new file mode 100644
index 0000000000..f999b4f451
--- /dev/null
+++ b/src/lib/ecore_con/efl_net_types.eot
@@ -0,0 +1,3 @@
+import eina_types;
+
+var Efl.Net.Error.COULDNT_RESOLVE_HOST: Eina.Error; [[Could not resolve the given host name]]