Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/tcp_usrreq.c
Show First 20 Lines • Show All 1,723 Lines • ▼ Show 20 Lines | case TCP_CONGESTION: | ||||
break; | break; | ||||
} | } | ||||
/* | /* | ||||
* We hold a write lock over the tcb so it's safe to | * We hold a write lock over the tcb so it's safe to | ||||
* do these things without ordering concerns. | * do these things without ordering concerns. | ||||
*/ | */ | ||||
if (CC_ALGO(tp)->cb_destroy != NULL) | if (CC_ALGO(tp)->cb_destroy != NULL) | ||||
CC_ALGO(tp)->cb_destroy(tp->ccv); | CC_ALGO(tp)->cb_destroy(tp->ccv); | ||||
CC_DATA(tp) = NULL; | |||||
CC_ALGO(tp) = algo; | CC_ALGO(tp) = algo; | ||||
/* | /* | ||||
* If something goes pear shaped initialising the new | * If something goes pear shaped initialising the new | ||||
* algo, fall back to newreno (which does not | * algo, fall back to newreno (which does not | ||||
* require initialisation). | * require initialisation). | ||||
*/ | */ | ||||
if (algo->cb_init != NULL && | if (algo->cb_init != NULL && | ||||
algo->cb_init(tp->ccv) != 0) { | algo->cb_init(tp->ccv) != 0) { | ||||
▲ Show 20 Lines • Show All 767 Lines • Show Last 20 Lines |