Project

General

Profile

Bug #4964 » httpc1.patch

Jaroslav Kysela, 2018-02-22 22:14

View differences:

src/httpc.c
241 241
static void
242 242
http_client_cmd_destroy( http_client_t *hc, http_client_wcmd_t *cmd )
243 243
{
244
  tvhtrace(LS_HTTPC, "%04X: cmd destroy", shortid(hc));
244 245
  TAILQ_REMOVE(&hc->hc_wqueue, cmd, link);
245 246
  free(cmd->wbuf);
246 247
  free(cmd);
......
568 569
      }
569 570
      return http_client_flush(hc, -errno);
570 571
    }
572
    if (tvhtrace_enabled()) {
573
      tvhtrace(LS_HTTPC, "%04X: sent %s cmd", shortid(hc), http_ver2str(hc->hc_version));
574
      tvhlog_hexdump(LS_HTTPC, wcmd->wbuf + wcmd->wpos, r);
575
    }
571 576
    wcmd->wpos += r;
572 577
    if (wcmd->wpos >= wcmd->wsize) {
573 578
      res = HTTP_CON_SENT;
......
662 667
  htsbuf_read(&q, body, body_size);
663 668

  
664 669
  if (tvhtrace_enabled()) {
665
    tvhtrace(LS_HTTPC, "%04X: sending %s cmd", shortid(hc), http_ver2str(hc->hc_version));
670
    tvhtrace(LS_HTTPC, "%04X: sending %s cmd (len %zd)", shortid(hc), http_ver2str(hc->hc_version), body_size);
666 671
    tvhlog_hexdump(LS_HTTPC, body, body_size);
667 672
  }
668 673

  
(6-6/6)