| 49 | } |
| 50 | |
| 51 | void |
| 52 | ConfigUpdateCbTable::invoke() |
| 53 | { |
| 54 | for (auto &&it : cb_table) { |
| 55 | auto &[contp, file_path, timestamp] = it.second; |
| 56 | |
| 57 | if (!file_path.empty()) { |
| 58 | std::error_code ec; |
| 59 | auto newtime = swoc::file::last_write_time(file_path, ec); |
| 60 | |
| 61 | if (!ec) { |
| 62 | if (newtime > timestamp) { |
| 63 | timestamp = newtime; |
| 64 | invoke(contp); |
| 65 | } |
| 66 | } else { |
| 67 | Error("Failed to stat %s: %s", file_path.c_str(), ec.message().c_str()); |
| 68 | } |
| 69 | } else { |
| 70 | invoke(contp); |
| 71 | } |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | void |
| 76 | ConfigUpdateCbTable::invoke(INKContInternal *contp) |
nothing calls this directly
no test coverage detected