mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-25 06:34:42 +02:00
commit
d8619cce6d
1
AUTHORS
1
AUTHORS
@ -5,6 +5,7 @@ Gaël Beaudoin <gaboo@gaboo.org>
|
|||||||
Gerd von Egidy <gerd@egidy.de>
|
Gerd von Egidy <gerd@egidy.de>
|
||||||
Gunnar Beutner <gunnar.beutner@netways.de>
|
Gunnar Beutner <gunnar.beutner@netways.de>
|
||||||
Ildar Hizbulin <hizel@vyborg.ru>
|
Ildar Hizbulin <hizel@vyborg.ru>
|
||||||
|
Jan Andres <jan.andres@berenberg.de>
|
||||||
Jan Wagner <waja@cyconet.org>
|
Jan Wagner <waja@cyconet.org>
|
||||||
Jason Young <jyoung15@gmail.com>
|
Jason Young <jyoung15@gmail.com>
|
||||||
Johannes Meyer <johannes.meyer@netways.de>
|
Johannes Meyer <johannes.meyer@netways.de>
|
||||||
|
@ -90,7 +90,7 @@ String Utility::GetSymbolName(const void *addr)
|
|||||||
#ifdef HAVE_DLADDR
|
#ifdef HAVE_DLADDR
|
||||||
Dl_info dli;
|
Dl_info dli;
|
||||||
|
|
||||||
if (dladdr(addr, &dli) > 0)
|
if (dladdr(const_cast<void *>(addr), &dli) > 0)
|
||||||
return dli.dli_sname;
|
return dli.dli_sname;
|
||||||
#endif /* HAVE_DLADDR */
|
#endif /* HAVE_DLADDR */
|
||||||
|
|
||||||
@ -545,13 +545,15 @@ bool Utility::GlobRecursive(const String& path, const String& pattern, const boo
|
|||||||
<< boost::errinfo_file_name(path));
|
<< boost::errinfo_file_name(path));
|
||||||
|
|
||||||
while (dirp) {
|
while (dirp) {
|
||||||
dirent ent, *pent;
|
dirent *pent;
|
||||||
|
|
||||||
if (readdir_r(dirp, &ent, &pent) < 0) {
|
errno = 0;
|
||||||
|
pent = readdir(dirp);
|
||||||
|
if (!pent && errno != 0) {
|
||||||
closedir(dirp);
|
closedir(dirp);
|
||||||
|
|
||||||
BOOST_THROW_EXCEPTION(posix_error()
|
BOOST_THROW_EXCEPTION(posix_error()
|
||||||
<< boost::errinfo_api_function("readdir_r")
|
<< boost::errinfo_api_function("readdir")
|
||||||
<< boost::errinfo_errno(errno)
|
<< boost::errinfo_errno(errno)
|
||||||
<< boost::errinfo_file_name(path));
|
<< boost::errinfo_file_name(path));
|
||||||
}
|
}
|
||||||
@ -559,10 +561,10 @@ bool Utility::GlobRecursive(const String& path, const String& pattern, const boo
|
|||||||
if (!pent)
|
if (!pent)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
if (strcmp(ent.d_name, ".") == 0 || strcmp(ent.d_name, "..") == 0)
|
if (strcmp(pent->d_name, ".") == 0 || strcmp(pent->d_name, "..") == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
String cpath = path + "/" + ent.d_name;
|
String cpath = path + "/" + pent->d_name;
|
||||||
|
|
||||||
struct stat statbuf;
|
struct stat statbuf;
|
||||||
|
|
||||||
@ -572,7 +574,7 @@ bool Utility::GlobRecursive(const String& path, const String& pattern, const boo
|
|||||||
if (S_ISDIR(statbuf.st_mode))
|
if (S_ISDIR(statbuf.st_mode))
|
||||||
alldirs.push_back(cpath);
|
alldirs.push_back(cpath);
|
||||||
|
|
||||||
if (!Utility::Match(pattern, ent.d_name))
|
if (!Utility::Match(pattern, pent->d_name))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (S_ISDIR(statbuf.st_mode) && (type & GlobDirectory))
|
if (S_ISDIR(statbuf.st_mode) && (type & GlobDirectory))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user