Commit cc89c685 authored by Timothy B. Terriberry's avatar Timothy B. Terriberry
Browse files

http: Fix assertion broken for IPv6 addresses.

These two asserts used to be in separate branches, but the code was
 consolidated into a single branch by e6350334.
However, the asserts were not updated at the same time.
With an IPv6 address, the sockaddr_in assert would always fail.
parent 1fbe0cd1
......@@ -2032,8 +2032,8 @@ static int op_http_connect_impl(OpusHTTPStream *_stream,OpusHTTPConn *_conn,
families were returned in the DNS records in accordance with RFC 6555.*/
OP_ASSERT(addr->ai_addrlen<=sizeof(struct sockaddr_in6));
OP_ASSERT(addr->ai_addrlen<=sizeof(struct sockaddr_in));
OP_MAX(sizeof(struct sockaddr_in6),sizeof(struct sockaddr_in)));
/*If we've seen this address family before, skip this address for now.*/
......@@ -3408,7 +3408,7 @@ static void *op_url_stream_create_impl(OpusFileCallbacks *_cb,const char *_url,
*_pinfo will be NULL.
Our caller is responsible for copying *_info to **_pinfo if it ultimately
succeeds, or for clearing *_info if it ultimately fails.*/
void *op_url_stream_vcreate_impl(OpusFileCallbacks *_cb,
static void *op_url_stream_vcreate_impl(OpusFileCallbacks *_cb,
const char *_url,OpusServerInfo *_info,OpusServerInfo **_pinfo,va_list _ap){
int skip_certificate_check;
const char *proxy_host;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment