]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
httpc: add more traces
authorJaroslav Kysela <perex@perex.cz>
Tue, 13 Jan 2015 15:31:48 +0000 (16:31 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 13 Jan 2015 15:31:48 +0000 (16:31 +0100)
src/httpc.c

index 3a4393e7abde3950137efec7052e1becd09a0c6e..0995d506ca91df1f4d8771b5df7ab22e5a74c2a3 100644 (file)
@@ -205,6 +205,7 @@ static int
 http_client_flush( http_client_t *hc, int result )
 {
   hc->hc_result       = result;
+  tvhtrace("httpc", "%04X: client flush %i", shortid(hc), result);
   if (result < 0)
     http_client_shutdown(hc, 0, 0);
   hc->hc_in_data      = 0;
@@ -907,6 +908,7 @@ retry:
     r = http_client_ssl_recv(hc, buf, hc->hc_io_size);
   else
     r = recv(hc->hc_fd, buf, hc->hc_io_size, MSG_DONTWAIT);
+  tvhtrace("httpc", "%04X: recv %zi", shortid(hc), r);
   if (r == 0) {
     if (hc->hc_in_data && !hc->hc_keepalive)
       return http_client_finish(hc);
@@ -1385,6 +1387,7 @@ http_client_close ( http_client_t *hc )
   }
   http_client_shutdown(hc, 1, 0);
   http_client_flush(hc, 0);
+  tvhtrace("httpc", "%04X: Closed", shortid(hc));
   while ((wcmd = TAILQ_FIRST(&hc->hc_wqueue)) != NULL)
     http_client_cmd_destroy(hc, wcmd);
   http_client_ssl_free(hc);