From: short <> Date: Tue, 11 Nov 2003 12:57:15 +0000 (+0000) Subject: Remove dynamic XPsp1 location URL detection to prevent lockups. X-Git-Tag: captive-1_1~24 X-Git-Url: http://git.jankratochvil.net/?p=captive.git;a=commitdiff_plain;h=ffbc05c1ef9bda1ea06feae7bde32b7954429ade Remove dynamic XPsp1 location URL detection to prevent lockups. --- diff --git a/src/install/acquire/microsoftcom.c b/src/install/acquire/microsoftcom.c index 5e78b5c..6459c6a 100644 --- a/src/install/acquire/microsoftcom.c +++ b/src/install/acquire/microsoftcom.c @@ -33,18 +33,27 @@ /* Do we really need to use indirection by the following 'base' URL? * It appears to me as if some Microsoft Service Pack files URLs * have changed in the past. + * Currently we use fixed MICROSOFTDOWNLOAD_URL as we would have to + * implement custom Gnome-VFS http timeouts as 'ACQUIRE_CABINET_READ_RAW_READ_TIMEOUT'. */ +#if 0 #define MICROSOFTCOM_URL "http://www.microsoft.com/WindowsXP/pro/downloads/servicepacks/sp1/checkedbuild.asp" +#else +#define MICROSOFTDOWNLOAD_URL "http://download.microsoft.com/download/9/7/6/9763833d-bd58-41e2-9911-50f64c7252a3/xpsp1a_en_x86_CHK.exe" +#endif GList * /* of (GnomeVFSURI *) */ mod_uri_microsoftcom_list(void) { +#ifdef MICROSOFTCOM_URL int base_size; -char *base_contents; -char *href,*href_end; +char *base_contents,*href_end; +#endif +char *href; const char *href2; GnomeVFSURI *uri; +#ifdef MICROSOFTCOM_URL base_contents=NULL; if (GNOME_VFS_OK!=gnome_vfs_read_entire_file(MICROSOFTCOM_URL,&base_size,&base_contents) || base_size<=0) { @@ -57,6 +66,9 @@ GnomeVFSURI *uri; goto fail_free_base_contents; } *href_end=0; +#else + href=MICROSOFTDOWNLOAD_URL; +#endif if (strncmp(href,"http://",strlen("http://"))) { g_warning(_("Destination file URL not valid: %s"),href); goto fail_free_base_contents; @@ -66,10 +78,14 @@ GnomeVFSURI *uri; g_warning(_("Found destination file URL not parsable: %s"),href2); goto fail_free_base_contents; } +#ifdef MICROSOFTCOM_URL g_free(base_contents); +#endif return g_list_append(NULL,uri); fail_free_base_contents: +#ifdef MICROSOFTCOM_URL g_free(base_contents); +#endif return NULL; }