Do not mask CAMEL_ERROR_GENERIC in composer_send_completed()
Any provider can return a generic error code, which makes the check useless, only hiding important error information from a user. Since the camel_getaddrinfo() returns CAMEL_SERVICE_ERROR_URL_INVALID, the check could be adapted and be more useful.
This commit is contained in:
@ -523,9 +523,10 @@ composer_send_completed (GObject *source_object,
|
||||
g_error_matches (
|
||||
local_error, CAMEL_SERVICE_ERROR,
|
||||
CAMEL_SERVICE_ERROR_UNAVAILABLE) ||
|
||||
/* XXX camel_getaddrinfo() sets this, unfortunately. */
|
||||
/* a name resolution failed */
|
||||
g_error_matches (
|
||||
local_error, CAMEL_ERROR, CAMEL_ERROR_GENERIC);
|
||||
local_error, CAMEL_SERVICE_ERROR,
|
||||
CAMEL_SERVICE_ERROR_URL_INVALID);
|
||||
if (service_unavailable) {
|
||||
/* Inform the user. */
|
||||
e_alert_run_dialog_for_args (
|
||||
|
||||
Reference in New Issue
Block a user