[totem/wip/hadess/no-ssl] backend: Better error message when SSL/TLS support is missing



commit 13fd86f7038d67fde14af9f8900476b0e5cf2c63
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Feb 28 12:26:48 2020 +0100

    backend: Better error message when SSL/TLS support is missing
    
    Closes: #399

 src/backend/bacon-video-widget.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/backend/bacon-video-widget.c b/src/backend/bacon-video-widget.c
index 64401070d..b5ea95ef5 100644
--- a/src/backend/bacon-video-widget.c
+++ b/src/backend/bacon-video-widget.c
@@ -1945,6 +1945,8 @@ bvw_get_http_error_code (GstMessage *err_msg)
     code = 404;
   else if (strstr (dbg, "403") != NULL)
     code = 403;
+  else if (strstr (dbg, "install glib-networking") != NULL)
+    code = 495;
 
 done:
   if (err != NULL)
@@ -3957,6 +3959,12 @@ bvw_error_from_gst_error (BaconVideoWidget *bvw, GstMessage * err_msg)
     goto done;
   }
 
+  if (http_error_code == 495) {
+    ret = g_error_new_literal (BVW_ERROR, BVW_ERROR_READ_ERROR,
+                              _("SSL/TLS support is missing. Check your installation."));
+    goto done;
+  }
+
   if (is_error (e, RESOURCE, OPEN_READ)) {
     if (strstr (dbg, g_strerror (EACCES)) != NULL) {
       ret = g_error_new_literal (BVW_ERROR, BVW_ERROR_FILE_PERMISSION,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]