X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmoof%2Fresource.cc;h=95b4c698501a05686a02d1789a3f428298939cb1;hp=3cf901b06473ae730fccd87d556a05d973460fa6;hb=d6990468d297a6cbee98e4d0d33ab37e1b2352c9;hpb=6f1b787a10d8ab1a3117a4b8c004dd2d90599608 diff --git a/src/moof/resource.cc b/src/moof/resource.cc index 3cf901b..95b4c69 100644 --- a/src/moof/resource.cc +++ b/src/moof/resource.cc @@ -13,7 +13,7 @@ #include -#ifdef USE_HOTLOADING +#if ENABLE_HOTLOADING #include #include #endif @@ -63,12 +63,12 @@ std::string resource::find_file(const std::string& name) // try it with the prefix first path = stlplus::filespec_to_path(*it, prefix); path = stlplus::filespec_to_path(path, name); - log_info("looking for", name, "at", path); + log_debug("looking for", name, "at", path); if (stlplus::file_exists(path)) return path; } path = stlplus::filespec_to_path(*it, name); - log_info("looking for", name, "at", path); + log_debug("looking for", name, "at", path); if (stlplus::file_exists(path)) return path; } @@ -112,7 +112,7 @@ static struct rsrc_list #endif } rsrc_list; -#ifdef USE_HOTLOADING +#if ENABLE_HOTLOADING static struct watch_list { // this table associates a watch descriptor with a loaded resource @@ -179,7 +179,7 @@ resource_ptr resource::load_with_path(const std::string& path, rsrc_list.table[path] = rsrc; rsrc->path_ = path; rsrc->type_ = ext; -#ifdef USE_HOTLOADING +#if ENABLE_HOTLOADING rsrc->wd_ = watch_list.add(rsrc); #endif return rsrc; @@ -197,7 +197,7 @@ int resource::reload_as_needed() { int count = 0; -#ifdef USE_HOTLOADING +#if ENABLE_HOTLOADING char bytes[BUF_SIZE]; int num_bytes; // an inotify file descriptor lets your read inotify_event structures @@ -255,7 +255,7 @@ void resource::reload() resource::~resource() { rsrc_list.table.erase(path_); -#ifdef USE_HOTLOADING +#if ENABLE_HOTLOADING watch_list.remove(wd_); #endif }