Changeset a438de4 in mainline for uspace/srv/net/tl/tcp/tqueue.c
- Timestamp:
- 2011-12-19T18:50:17Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1440eae, d9cf684a
- Parents:
- 58f6229 (diff), 522a4f9 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/tcp/tqueue.c
r58f6229 ra438de4 188 188 /* We are sending out FIN */ 189 189 ctrl = CTL_FIN; 190 tcp_conn_fin_sent(conn);191 190 } else { 192 191 ctrl = 0; … … 206 205 if (send_fin) 207 206 conn->snd_buf_fin = false; 207 208 fibril_condvar_broadcast(&conn->snd_buf_cv); 209 210 if (send_fin) 211 tcp_conn_fin_sent(conn); 208 212 209 213 tcp_tqueue_seg(conn, seg); … … 313 317 log_msg(LVL_DEBUG, "### %s: retransmit_timeout_func(%p)", conn->name, conn); 314 318 319 fibril_mutex_lock(&conn->lock); 320 315 321 if (conn->cstate == st_closed) { 316 322 log_msg(LVL_DEBUG, "Connection already closed."); 323 fibril_mutex_unlock(&conn->lock); 324 tcp_conn_delref(conn); 317 325 return; 318 326 } … … 321 329 if (link == NULL) { 322 330 log_msg(LVL_DEBUG, "Nothing to retransmit"); 331 fibril_mutex_unlock(&conn->lock); 332 tcp_conn_delref(conn); 323 333 return; 324 334 } … … 329 339 if (rt_seg == NULL) { 330 340 log_msg(LVL_ERROR, "Memory allocation failed."); 341 fibril_mutex_unlock(&conn->lock); 342 tcp_conn_delref(conn); 331 343 /* XXX Handle properly */ 332 344 return; … … 338 350 /* Reset retransmission timer */ 339 351 tcp_tqueue_timer_set(tqe->conn); 352 353 fibril_mutex_unlock(&conn->lock); 354 tcp_conn_delref(conn); 340 355 } 341 356 … … 345 360 log_msg(LVL_DEBUG, "### %s: tcp_tqueue_timer_set()", conn->name); 346 361 347 (void) retransmit_timeout_func; 362 /* Clear first to make sure we update refcnt correctly */ 363 tcp_tqueue_timer_clear(conn); 364 365 tcp_conn_addref(conn); 348 366 fibril_timer_set(conn->retransmit.timer, RETRANSMIT_TIMEOUT, 349 367 retransmit_timeout_func, (void *) conn); … … 355 373 log_msg(LVL_DEBUG, "### %s: tcp_tqueue_timer_clear()", conn->name); 356 374 357 fibril_timer_clear(conn->retransmit.timer); 375 if (fibril_timer_clear(conn->retransmit.timer) == fts_active) 376 tcp_conn_delref(conn); 358 377 } 359 378
Note:
See TracChangeset
for help on using the changeset viewer.