hsa: fix http client logging with file 25/43225/2
authorFlorin Coras <[email protected]>
Wed, 18 Jun 2025 19:18:08 +0000 (15:18 -0400)
committerDave Wallace <[email protected]>
Wed, 18 Jun 2025 23:54:50 +0000 (23:54 +0000)
Print response status and headers as vectors.

Type: fix

Change-Id: I7321776e4914c139d85cd3f45ee67afd0850caee
Signed-off-by: Florin Coras <[email protected]>
src/plugins/hs_apps/http_client.c

index fbb2b1c..d49c6a4 100644 (file)
@@ -714,7 +714,7 @@ hc_connect ()
 }
 
 static void
-hc_get_repeat_stats (vlib_main_t *vm)
+hc_get_req_stats (vlib_main_t *vm)
 {
   hc_main_t *hcm = &hc_main;
 
@@ -770,7 +770,7 @@ hc_get_event (vlib_main_t *vm)
     event_timeout += 5;
   vlib_process_wait_for_event_or_clock (vm, event_timeout);
   event_type = vlib_process_get_events (vm, &event_data);
-  hc_get_repeat_stats (vm);
+  hc_get_req_stats (vm);
 
   switch (event_type)
     {
@@ -795,7 +795,7 @@ hc_get_event (vlib_main_t *vm)
          wrk = hc_worker_get (hcm->worker_index);
          hc_session = hc_session_get (wrk->session_index, wrk->thread_index);
          vlib_cli_output (
-           vm, "< %s\n< %s\n* %u bytes saved to file (/tmp/%s)",
+           vm, "< %v\n< %v\n* %u bytes saved to file (/tmp/%s)",
            hc_session->response_status, hc_session->resp_headers,
            hc_session->body_recv, hcm->filename);
          fclose (hc_session->file_ptr);