Blame SOURCES/0104-rhtsupport-never-use-uReport-URL-from-ureport.config.patch

0c9110
From 218ae6bbc9ecd1538bfde2c8033cd1ff82a53bbe Mon Sep 17 00:00:00 2001
0c9110
From: Jakub Filak <jfilak@redhat.com>
0c9110
Date: Wed, 22 Oct 2014 10:21:07 +0200
0c9110
Subject: [LIBREPORT PATCH 104/105] rhtsupport: never use uReport URL from
0c9110
 ureport.config
0c9110
0c9110
The GUI reporter always export uReport_URL, thus reporter-rhtsupport
0c9110
never use the Strata URL.
0c9110
0c9110
Moreover, usage of uReport_URL is really bad idea, because a reporter
0c9110
thinks he is going to send data to the portal but the ureport might end
0c9110
somewhere else.
0c9110
0c9110
Related #1139987
0c9110
0c9110
Signed-off-by: Jakub Filak <jfilak@redhat.com>
0c9110
---
0c9110
 src/plugins/reporter-rhtsupport.c | 24 ++++++++++++------------
0c9110
 1 file changed, 12 insertions(+), 12 deletions(-)
0c9110
0c9110
diff --git a/src/plugins/reporter-rhtsupport.c b/src/plugins/reporter-rhtsupport.c
0c9110
index e1c73d0..4b74c5c 100644
0c9110
--- a/src/plugins/reporter-rhtsupport.c
0c9110
+++ b/src/plugins/reporter-rhtsupport.c
0c9110
@@ -383,18 +383,18 @@ void prepare_ureport_configuration(const char *urcfile,
0c9110
     load_conf_file(urcfile, settings, false);
0c9110
     ureport_server_config_init(urconf);
0c9110
 
0c9110
-    char *url = NULL;
0c9110
-    UREPORT_OPTION_VALUE_FROM_CONF(settings, "URL", url, xstrdup);
0c9110
-    if (url == NULL)
0c9110
-    {
0c9110
-        ureport_server_config_set_url(urconf, concat_path_file(portal_url, "/telemetry/abrt"));
0c9110
-        urconf->ur_ssl_verify = ssl_verify;
0c9110
-    }
0c9110
-    else
0c9110
-    {
0c9110
-        UREPORT_OPTION_VALUE_FROM_CONF(settings, "SSLVerify", urconf->ur_ssl_verify, string_to_bool);
0c9110
-        ureport_server_config_set_url(urconf, url);
0c9110
-    }
0c9110
+    /* The following lines cause that we always use URL from ureport's
0c9110
+     * configuration becuase the GUI reporter always exports uReport_URL env
0c9110
+     * var.
0c9110
+     *
0c9110
+     *   char *url = NULL;
0c9110
+     *   UREPORT_OPTION_VALUE_FROM_CONF(settings, "URL", url, xstrdup);
0c9110
+     *   if (url != NULL)
0c9110
+     *       ureport_server_config_set_url(urconf, url);
0c9110
+     */
0c9110
+
0c9110
+    ureport_server_config_set_url(urconf, concat_path_file(portal_url, "/telemetry/abrt"));
0c9110
+    urconf->ur_ssl_verify = ssl_verify;
0c9110
 
0c9110
     ureport_server_config_set_basic_auth(urconf, login, password);
0c9110
 
0c9110
-- 
0c9110
1.8.3.1
0c9110