simplify error conditions and output errrors on failure
SVN revision: 52378
This commit is contained in:
parent
c7608248dd
commit
d74f46d5a5
|
@ -353,14 +353,14 @@ _ecore_con_ssl_server_init_gnutls(Ecore_Con_Server *svr)
|
||||||
(ret == GNUTLS_E_INTERRUPTED))
|
(ret == GNUTLS_E_INTERRUPTED))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
_ecore_con_ssl_server_shutdown_gnutls(svr);
|
goto error;
|
||||||
return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ECORE_CON_SSL_ERROR_NONE;
|
return ECORE_CON_SSL_ERROR_NONE;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
ERR("gnutls returned with error: %s", gnutls_strerror(ret));
|
ERR("gnutls returned with error: %s - %s", gnutls_strerror_name(ret), gnutls_strerror(ret));
|
||||||
|
_ecore_con_ssl_server_shutdown_gnutls(svr);
|
||||||
return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED;
|
return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -568,14 +568,15 @@ _ecore_con_ssl_client_init_gnutls(Ecore_Con_Client *cl)
|
||||||
(ret == GNUTLS_E_INTERRUPTED))
|
(ret == GNUTLS_E_INTERRUPTED))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
_ecore_con_ssl_client_shutdown_gnutls(cl);
|
goto error;
|
||||||
return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: add cert verification support */
|
/* TODO: add cert verification support */
|
||||||
return ECORE_CON_SSL_ERROR_NONE;
|
return ECORE_CON_SSL_ERROR_NONE;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
ERR("gnutls returned with error: %s", gnutls_strerror(ret));
|
ERR("gnutls returned with error: %s - %s", gnutls_strerror_name(ret), gnutls_strerror(ret));
|
||||||
|
_ecore_con_ssl_client_shutdown_gnutls(cl);
|
||||||
return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED;
|
return ECORE_CON_SSL_ERROR_SERVER_INIT_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue