Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 6b0b508 in mainline


Ignore:
Timestamp:
2013-03-14T15:39:53Z (9 years ago)
Author:
Martin Decky <martin@…>
Branches:
lfn, master
Children:
05bfce7
Parents:
22e80508
Message:

better workaround for #521

Location:
uspace
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/net/tl/socket_core.c

    r22e80508 r6b0b508  
    8383{
    8484        /* If bound */
    85        
    86         // FIXME:
    87         // Temporary workaround for ticket #521
    88         // (causes port leak)
    89 #if 0
    9085        if (socket->port) {
    9186                /* Release the port */
    9287                socket_port_release(global_sockets, socket);
    9388        }
    94 #endif
    9589       
    9690        dyn_fifo_destroy(&socket->accepted);
  • uspace/srv/net/udp/sock.c

    r22e80508 r6b0b508  
    289289            (udp_sockdata_t *) sock_core->specific_data;
    290290       
    291         if ((sock_core->port == 0) || (sock_core->port == -1)) {
     291        if (sock_core->port <= 0) {
    292292                /* Implicitly bind socket to port */
    293293                int rc = socket_bind_free_port(&gsock, sock_core,
     
    299299               
    300300                assert(sock_core->port > 0);
     301               
    301302                udp_error_t urc = udp_uc_set_local_port(socket->assoc,
    302303                    sock_core->port);
     
    307308                        goto out;
    308309                }
     310               
     311                last_used_port = sock_core->port;
    309312        }
    310313       
Note: See TracChangeset for help on using the changeset viewer.