| 339 | } |
| 340 | |
| 341 | static void copy_path_without_query(const char *path, char *out, size_t outsz) { |
| 342 | if (!out || outsz == 0) { |
| 343 | return; |
| 344 | } |
| 345 | out[0] = '\0'; |
| 346 | if (!path) { |
| 347 | return; |
| 348 | } |
| 349 | size_t n = 0; |
| 350 | while (path[n] && path[n] != '?' && path[n] != '#' && n < outsz - 1) { |
| 351 | out[n] = path[n]; |
| 352 | n++; |
| 353 | } |
| 354 | out[n] = '\0'; |
| 355 | } |
| 356 | |
| 357 | void cbm_log_mcp_request(const char *method, const char *tool_name, bool is_error, |
| 358 | int64_t duration_us) { |
no outgoing calls
no test coverage detected