فهرست منبع

2007-10-15 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>

	* src/MetalinkRequestInfo.cc: When no file entry is found in a
	metalink without querying user preferences, print the error message
	that suggests metalink file is probably broken.
Tatsuhiro Tsujikawa 18 سال پیش
والد
کامیت
90a9be7594
2فایلهای تغییر یافته به همراه9 افزوده شده و 0 حذف شده
  1. 6 0
      ChangeLog
  2. 3 0
      src/MetalinkRequestInfo.cc

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2007-10-15  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
+
+	* src/MetalinkRequestInfo.cc: When no file entry is found in a
+	metalink without querying user preferences, print the error message
+	that suggests metalink file is probably broken. 
+
 2007-10-12  Tatsuhiro Tsujikawa  <tujikawa at rednoah dot com>
 
 	Do not send referer when redirected.

+ 3 - 0
src/MetalinkRequestInfo.cc

@@ -88,6 +88,9 @@ RequestInfos MetalinkRequestInfo::execute() {
   RequestInfos nextReqInfos;
   try {
     MetalinkerHandle metalinker = proc.parseFile(metalinkFile);
+    if(metalinker->entries.empty()) {
+      throw new DlAbortEx("No file entry found. Probably, the metalink file is not configured properly or broken.");
+    }
     MetalinkEntries entries =
       metalinker->queryEntry(op->get(PREF_METALINK_VERSION),
 			     op->get(PREF_METALINK_LANGUAGE),