Copilot commented on code in PR #12199:
URL: https://github.com/apache/trafficserver/pull/12199#discussion_r2049736797
##########
src/proxy/http/HttpSM.cc:
##########
@@ -644,7 +644,11 @@ HttpSM::state_read_client_request_header(int event, void
*data)
_ua.get_entry()->vc_read_handler = &HttpSM::state_watch_for_client_abort;
_ua.get_entry()->vc_write_handler = &HttpSM::state_watch_for_client_abort;
_ua.get_txn()->cancel_inactivity_timeout();
- ATS_PROBE1(milestone_ua_read_header_done, sm_id);
+#ifdef ENABLE_SYSTEMTAP_PROBES
+ int url_len = 0;
+ char *url_str =
t_state.hdr_info.client_request.url_string_get_ref(&url_len);
+#endif
+ ATS_PROBE3(milestone_ua_read_header_done, sm_id, url_str, url_len);
milestones[TS_MILESTONE_UA_READ_HEADER_DONE] = ink_get_hrtime();
Review Comment:
The ATS_PROBE3 macro call uses 'url_str' and 'url_len' outside the
conditional block where they are defined, which can lead to undefined
identifier errors when ENABLE_SYSTEMTAP_PROBES is not defined. Consider moving
the ATS_PROBE3 call inside the #ifdef ENABLE_SYSTEMTAP_PROBES block or
providing default values for these variables.
```suggestion
ATS_PROBE3(milestone_ua_read_header_done, sm_id, url_str, url_len);
#endif
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]