| 347 | } |
| 348 | |
| 349 | static void copy_path_without_query(const char *path, char *out, size_t outsz) { |
| 350 | if (!out || outsz == 0) { |
| 351 | return; |
| 352 | } |
| 353 | out[0] = '\0'; |
| 354 | if (!path) { |
| 355 | return; |
| 356 | } |
| 357 | size_t n = 0; |
| 358 | while (path[n] && path[n] != '?' && path[n] != '#' && n < outsz - 1) { |
| 359 | out[n] = path[n]; |
| 360 | n++; |
| 361 | } |
| 362 | out[n] = '\0'; |
| 363 | } |
| 364 | |
| 365 | void cbm_log_mcp_request(const char *method, const char *tool_name, bool is_error, |
| 366 | int64_t duration_us) { |
no outgoing calls
no test coverage detected