Like http_read_stream(), but no short reads. Assumes partial reads are an error.
| 1903 | // Like http_read_stream(), but no short reads. |
| 1904 | // Assumes partial reads are an error. |
| 1905 | static int http_read_stream_all(URLContext *h, uint8_t *buf, int size) |
| 1906 | { |
| 1907 | int pos = 0; |
| 1908 | while (pos < size) { |
| 1909 | int len = http_read_stream(h, buf + pos, size - pos); |
| 1910 | if (len < 0) |
| 1911 | return len; |
| 1912 | pos += len; |
| 1913 | } |
| 1914 | return pos; |
| 1915 | } |
| 1916 | |
| 1917 | static void update_metadata(URLContext *h, char *data) |
| 1918 | { |
no test coverage detected