Github user SolidWallOfCode commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/229#discussion_r33062790
  
    --- Diff: proxy/logging/LogField.cc ---
    @@ -212,6 +269,51 @@ LogField::~LogField()
       ats_free(m_symbol);
     }
     
    +TransactionMilestones::Milestone
    +LogField::milestone_from_m_name(const char *m_name)
    +{
    +  milestone_map::iterator it;
    +  TransactionMilestones::Milestone result = 
TransactionMilestones::LAST_ENTRY;
    +
    +  it = m_milestone_map.find(m_name);
    +  if (it != m_milestone_map.end())
    +    result = it->second;
    +
    +  return result;
    +}
    +
    +int
    +LogField::milestones_from_m_name(const char *m_name, 
TransactionMilestones::Milestone *ms1, TransactionMilestones::Milestone *ms2)
    +{
    +  milestone_map::iterator it;
    +  char *ms_name;
    +  size_t ms_name_len, skip;
    +
    +  ms_name_len = strcspn(m_name, " -");
    +  ms_name = strndup(m_name, ms_name_len);
    +  it = m_milestone_map.find(ms_name);
    +  free(ms_name);
    +  if (it != m_milestone_map.end()) {
    +    *ms1 = it->second;
    +  } else {
    +    for (it = m_milestone_map.begin(); it != m_milestone_map.end(); ++it)
    --- End diff --
    
    What is this point of this loop, if it returns on the first iteration?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to