[PATCH 1/4] Don't keep testing if we're doing URL_METHOD_HTTP.

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

 



---
 loader/urlinstall.c |   52 +++++++++++++++++++++++++-------------------------
 1 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/loader/urlinstall.c b/loader/urlinstall.c
index eaff127..72fa7db 100644
--- a/loader/urlinstall.c
+++ b/loader/urlinstall.c
@@ -335,35 +335,35 @@ int getFileFromUrl(char * url, char * dest,
             logMessage(CRITICAL, "%s: %d: %m", __func__, __LINE__);
             abort();
         }
-    }
 
-    if (proto == URL_METHOD_HTTP && FL_KICKSTART_SEND_MAC(flags)) {
-        /* find all ethernet devices and make a header entry for each one */
-        int i;
-        char *dev, *mac, *tmpstr;
-        struct device **devices;
-
-        devices = getDevices(DEVICE_NETWORK);
-        for (i = 0; devices && devices[i]; i++) {
-            dev = devices[i]->device;
-            mac = iface_mac2str(dev);
-
-            if (mac) {
-                if (asprintf(&tmpstr, "X-RHN-Provisioning-MAC-%d: %s %s\r\n",
-                             i, dev, mac) == -1) {
-                    logMessage(CRITICAL, "%s: %d: %m", __func__, __LINE__);
-                    abort();
-                }
+        if (FL_KICKSTART_SEND_MAC(flags)) {
+            /* find all ethernet devices and make a header entry for each one */
+            int i;
+            char *dev, *mac, *tmpstr;
+            struct device **devices;
+
+            devices = getDevices(DEVICE_NETWORK);
+            for (i = 0; devices && devices[i]; i++) {
+                dev = devices[i]->device;
+                mac = iface_mac2str(dev);
+
+                if (mac) {
+                    if (asprintf(&tmpstr, "X-RHN-Provisioning-MAC-%d: %s %s\r\n",
+                                 i, dev, mac) == -1) {
+                        logMessage(CRITICAL, "%s: %d: %m", __func__, __LINE__);
+                        abort();
+                    }
 
-                if (!ehdrs) {
-                    ehdrs = strdup(tmpstr);
-                } else {
-                    ehdrs = (char *) realloc(ehdrs, strlen(ehdrs)+strlen(tmpstr)+1);
-                    strcat(ehdrs, tmpstr);
-                }
+                    if (!ehdrs) {
+                        ehdrs = strdup(tmpstr);
+                    } else {
+                        ehdrs = (char *) realloc(ehdrs, strlen(ehdrs)+strlen(tmpstr)+1);
+                        strcat(ehdrs, tmpstr);
+                    }
 
-                free(mac);
-                free(tmpstr);
+                    free(mac);
+                    free(tmpstr);
+                }
             }
         }
     }
-- 
1.6.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux