Changeset a873201 in mainline
- Timestamp:
- 2010-11-04T18:57:59Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d94f309
- Parents:
- 46ae62c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/udp/udp.c
r46ae62c ra873201 481 481 if ((socket->port <= 0) && udp_globals.autobinding) { 482 482 // bind the socket to a random free port if not bound 483 // do { 484 // try to find a free port 485 // fibril_rwlock_read_unlock(&udp_globals.lock); 486 // fibril_rwlock_write_lock(&udp_globals.lock); 487 // might be changed in the meantime 488 // if (socket->port <= 0) { 489 rc = socket_bind_free_port(&udp_globals.sockets, 490 socket, UDP_FREE_PORTS_START, 491 UDP_FREE_PORTS_END, 492 udp_globals.last_used_port); 493 if (rc != EOK) { 494 // fibril_rwlock_write_unlock( 495 // &udp_globals.lock); 496 // fibril_rwlock_read_lock( 497 // &udp_globals.lock); 498 return rc; 499 } 500 // set the next port as the search starting port 501 // number 502 udp_globals.last_used_port = socket->port; 503 // } 504 // fibril_rwlock_write_unlock(&udp_globals.lock); 505 // fibril_rwlock_read_lock(&udp_globals.lock); 506 // might be changed in the meantime 507 // } while (socket->port <= 0); 483 rc = socket_bind_free_port(&udp_globals.sockets, socket, 484 UDP_FREE_PORTS_START, UDP_FREE_PORTS_END, 485 udp_globals.last_used_port); 486 if (rc != EOK) 487 return rc; 488 // set the next port as the search starting port number 489 udp_globals.last_used_port = socket->port; 508 490 } 509 491
Note:
See TracChangeset
for help on using the changeset viewer.