From 2d1585e8fe737b122d41fac76b5a694f8dfb3c93 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Tue, 25 Nov 2014 20:53:24 +0100 Subject: [PATCH] kodi: add PR5817 Signed-off-by: Stephan Raue --- .../kodi/patches/kodi-999.95-PR5817.patch | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 packages/mediacenter/kodi/patches/kodi-999.95-PR5817.patch diff --git a/packages/mediacenter/kodi/patches/kodi-999.95-PR5817.patch b/packages/mediacenter/kodi/patches/kodi-999.95-PR5817.patch new file mode 100644 index 0000000000..9b313d821e --- /dev/null +++ b/packages/mediacenter/kodi/patches/kodi-999.95-PR5817.patch @@ -0,0 +1,46 @@ +From fda83f7aa4a82b8494e0b4e4a6a254d5784b5919 Mon Sep 17 00:00:00 2001 +From: Rainer Hochecker +Date: Tue, 25 Nov 2014 20:33:18 +0100 +Subject: [PATCH] Revert "smb: eliminate unused while loop in OpenDir" + +This reverts commit aeebd22d2e88fd14f1b0624d0bdbc6f791a75892. +--- + xbmc/filesystem/SMBDirectory.cpp | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/xbmc/filesystem/SMBDirectory.cpp b/xbmc/filesystem/SMBDirectory.cpp +index 1fa00e6..026bd02 100644 +--- a/xbmc/filesystem/SMBDirectory.cpp ++++ b/xbmc/filesystem/SMBDirectory.cpp +@@ -253,7 +253,7 @@ int CSMBDirectory::OpenDir(const CURL& url, std::string& strAuth) + fd = smbc_opendir(s.c_str()); + } + +- if (fd < 0) /* only to avoid goto in following code */ ++ while (fd < 0) /* only to avoid goto in following code */ + { + std::string cError; + +@@ -261,15 +261,21 @@ int CSMBDirectory::OpenDir(const CURL& url, std::string& strAuth) + { + if (m_flags & DIR_FLAG_ALLOW_PROMPT) + RequireAuthentication(urlIn); ++ break; + } +- else if (errno == ENODEV || errno == ENOENT) ++ ++ if (errno == ENODEV || errno == ENOENT) + cError = StringUtils::Format(g_localizeStrings.Get(770).c_str(),errno); + else + cError = strerror(errno); + + if (m_flags & DIR_FLAG_ALLOW_PROMPT) + SetErrorDialog(257, cError.c_str()); ++ break; ++ } + ++ if (fd < 0) ++ { + // write error to logfile + CLog::Log(LOGERROR, "SMBDirectory->GetDirectory: Unable to open directory : '%s'\nunix_err:'%x' error : '%s'", CURL::GetRedacted(strAuth).c_str(), errno, strerror(errno)); + }