Skip to content
Commit cf6c5c22 authored by Peter Wu's avatar Peter Wu Committed by Daniel Stenberg
Browse files

sws: move away from IPv4/IPv4-only assumption



Instead of depending the socket domain type on use_ipv6, specify the
domain type (AF_INET / AF_INET6) as variable. An enum is used here with
switch to avoid compiler warnings in connect_to, complaining that rc
is possibly undefined (which is not possible as socket_domain is
always set).

Besides abstracting the socket type, make the debugging messages be
independent on IP (introduce location_str which points to "port XXXXX").
Rename "ipv_inuse" to "socket_type" and tighten the scope (main).

Signed-off-by: default avatarPeter Wu <peter@lekensteyn.nl>
parent aba5888f
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