Changeset 0d520a2 in mainline


Ignore:
Timestamp:
2012-04-20T09:48:56Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
50b581d, d37d500e
Parents:
606c369
Message:

tcp_sock_connection() and udp_sock_connection() need to clean up when exiting.

Location:
uspace/srv/net
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tcp/sock.c

    r606c369 r0d520a2  
    8989        socket = (tcp_sockdata_t *)sock_core->specific_data;
    9090        (void)socket;
     91
     92        /* XXX We need to initiate connection cleanup here */
    9193}
    9294
     
    835837                }
    836838        }
     839
     840        /* Clean up */
     841        log_msg(LVL_DEBUG, "tcp_sock_connection: Clean up");
     842        async_hangup(client.sess);
     843        socket_cores_release(NULL, &client.sockets, &gsock, tcp_free_sock_data);
    837844}
    838845
  • uspace/srv/net/udp/sock.c

    r606c369 r0d520a2  
    8585
    8686        socket = (udp_sockdata_t *)sock_core->specific_data;
    87         (void)socket;
     87        assert(socket->assoc != NULL);
     88        udp_uc_destroy(socket->assoc);
    8889}
    8990
     
    513514        fibril_mutex_lock(&socket->lock);
    514515
    515         assert(socket->assoc != NULL);
    516         udp_uc_destroy(socket->assoc);
    517 
    518516        rc = socket_destroy(NULL, socket_id, &client->sockets, &gsock,
    519517            udp_free_sock_data);
     
    599597                }
    600598        }
     599
     600        /* Clean up */
     601        log_msg(LVL_DEBUG, "udp_sock_connection: Clean up");
     602        async_hangup(client.sess);
     603        socket_cores_release(NULL, &client.sockets, &gsock, udp_free_sock_data);
    601604}
    602605
Note: See TracChangeset for help on using the changeset viewer.