Skip to content

Commit 5dbba8a

Browse files
fixup! transport: add the WolfCertTransport vtable and WOLFCERT_ERR_CONN_CLOSED
1 parent d1f3dc9 commit 5dbba8a

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/http.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,13 +1164,13 @@ static int http_read_response(WolfCertConn* c,
11641164

11651165
int wolfcert_http_request(const WolfCertHttpRequest* req, WolfCertHttpResponse* resp)
11661166
{
1167-
if (req != NULL && req->connect_cb != NULL && req->transport != NULL)
1168-
return WOLFCERT_ERR(WOLFCERT_ERR_BAD_ARG, "http",
1169-
"set either connect_cb or transport, not both");
1170-
11711167
if (req == NULL || resp == NULL || req->url == NULL || req->method == NULL)
11721168
return WOLFCERT_ERR_BAD_ARG;
11731169

1170+
if (req->connect_cb != NULL && req->transport != NULL)
1171+
return WOLFCERT_ERR(WOLFCERT_ERR_BAD_ARG, "http",
1172+
"set either connect_cb or transport, not both");
1173+
11741174
memset(resp, 0, sizeof(*resp));
11751175
void* heap = req->heap ? req->heap : wolfcert_default_heap();
11761176
resp->heap = heap;

0 commit comments

Comments
 (0)