diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/socket.c b/net/socket.c index 6e5c902ea9..17e635de20 100644 --- a/net/socket.c +++ b/net/socket.c @@ -311,7 +311,7 @@ static void net_socket_cleanup(NetClientState *nc) } static NetClientInfo net_dgram_socket_info = { - .type = NET_CLIENT_OPTIONS_KIND_SOCKET, + .type = NET_CLIENT_DRIVER_SOCKET, .size = sizeof(NetSocketState), .receive = net_socket_receive_dgram, .cleanup = net_socket_cleanup, @@ -395,7 +395,7 @@ static void net_socket_connect(void *opaque) } static NetClientInfo net_socket_info = { - .type = NET_CLIENT_OPTIONS_KIND_SOCKET, + .type = NET_CLIENT_DRIVER_SOCKET, .size = sizeof(NetSocketState), .receive = net_socket_receive, .cleanup = net_socket_cleanup, @@ -670,8 +670,8 @@ int net_init_socket(const Netdev *netdev, const char *name, Error *err = NULL; const NetdevSocketOptions *sock; - assert(netdev->opts->type == NET_CLIENT_OPTIONS_KIND_SOCKET); - sock = netdev->opts->u.socket.data; + assert(netdev->type == NET_CLIENT_DRIVER_SOCKET); + sock = &netdev->u.socket; if (sock->has_fd + sock->has_listen + sock->has_connect + sock->has_mcast + sock->has_udp != 1) { |