| 931 | } |
| 932 | |
| 933 | int |
| 934 | LogObjectManager::_manage_object(LogObject *log_object, bool is_api_object, int maxConflicts) |
| 935 | { |
| 936 | if (is_api_object) { |
| 937 | ACQUIRE_API_MUTEX("A LogObjectManager::_manage_object"); |
| 938 | } |
| 939 | |
| 940 | int retVal = _solve_internal_filename_conflicts(log_object, maxConflicts); |
| 941 | |
| 942 | if (retVal == NO_FILENAME_CONFLICTS) { |
| 943 | if (retVal = _solve_filename_conflicts(log_object, maxConflicts), retVal == NO_FILENAME_CONFLICTS) { |
| 944 | // do filesystem checks |
| 945 | // |
| 946 | { |
| 947 | // no conflicts, add object to the list of managed objects |
| 948 | // |
| 949 | log_object->refcount_inc(); |
| 950 | if (is_api_object) { |
| 951 | _APIobjects.push_back(log_object); |
| 952 | } else { |
| 953 | _objects.push_back(log_object); |
| 954 | } |
| 955 | |
| 956 | ink_release_assert(retVal == NO_FILENAME_CONFLICTS); |
| 957 | |
| 958 | Dbg(dbg_ctl_log, |
| 959 | "LogObjectManager managing object %s (%s) " |
| 960 | "[signature = %" PRIu64 ", address = %p]", |
| 961 | log_object->get_base_filename(), log_object->get_full_filename(), log_object->get_signature(), log_object); |
| 962 | |
| 963 | if (log_object->has_alternate_name()) { |
| 964 | Warning("The full path for the (%s) LogObject " |
| 965 | "with signature %" PRIu64 " " |
| 966 | "has been set to %s rather than %s because the latter " |
| 967 | "is being used by another LogObject", |
| 968 | log_object->get_base_filename(), log_object->get_signature(), log_object->get_full_filename(), |
| 969 | log_object->get_original_filename()); |
| 970 | } |
| 971 | } |
| 972 | } |
| 973 | } |
| 974 | |
| 975 | if (is_api_object) { |
| 976 | RELEASE_API_MUTEX("R LogObjectManager::_manage_object"); |
| 977 | } |
| 978 | |
| 979 | return retVal; |
| 980 | } |
| 981 | |
| 982 | int |
| 983 | LogObjectManager::_solve_filename_conflicts(LogObject *log_object, int maxConflicts) |
nothing calls this directly
no test coverage detected