+ const char *type = "Unknown error";
+ bool ignore = false;
+
+ switch(code) {
+ case UCLIENT_ERROR_CONNECT:
+ type = "Connection failed";
+ error_ret = 4;
+ break;
+ case UCLIENT_ERROR_SSL_INVALID_CERT:
+ type = "Invalid SSL certificate";
+ ignore = !verify;
+ error_ret = 5;
+ break;
+ case UCLIENT_ERROR_SSL_CN_MISMATCH:
+ type = "Server hostname does not match SSL certificate";
+ ignore = !verify;
+ error_ret = 5;
+ break;
+ default:
+ error_ret = 1;
+ break;
+ }
+