Changes in uspace/srv/net/tcp/tqueue.c [f303f2cf:c0f3460] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tcp/tqueue.c
rf303f2cf rc0f3460 62 62 { 63 63 tqueue->conn = conn; 64 tqueue->timer = fibril_timer_create( &conn->lock);64 tqueue->timer = fibril_timer_create(); 65 65 if (tqueue->timer == NULL) 66 66 return ENOMEM; … … 92 92 seg = tcp_segment_make_ctrl(ctrl); 93 93 tcp_tqueue_seg(conn, seg); 94 tcp_segment_delete(seg);95 94 } 96 95 … … 213 212 214 213 tcp_tqueue_seg(conn, seg); 215 tcp_segment_delete(seg);216 214 } 217 215 … … 319 317 log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: retransmit_timeout_func(%p)", conn->name, conn); 320 318 321 tcp_conn_lock(conn);319 fibril_mutex_lock(&conn->lock); 322 320 323 321 if (conn->cstate == st_closed) { 324 322 log_msg(LOG_DEFAULT, LVL_DEBUG, "Connection already closed."); 325 tcp_conn_unlock(conn);323 fibril_mutex_unlock(&conn->lock); 326 324 tcp_conn_delref(conn); 327 325 return; … … 331 329 if (link == NULL) { 332 330 log_msg(LOG_DEFAULT, LVL_DEBUG, "Nothing to retransmit"); 333 tcp_conn_unlock(conn);331 fibril_mutex_unlock(&conn->lock); 334 332 tcp_conn_delref(conn); 335 333 return; … … 341 339 if (rt_seg == NULL) { 342 340 log_msg(LOG_DEFAULT, LVL_ERROR, "Memory allocation failed."); 343 tcp_conn_unlock(conn);341 fibril_mutex_unlock(&conn->lock); 344 342 tcp_conn_delref(conn); 345 343 /* XXX Handle properly */ … … 353 351 tcp_tqueue_timer_set(tqe->conn); 354 352 355 tcp_conn_unlock(conn);353 fibril_mutex_unlock(&conn->lock); 356 354 tcp_conn_delref(conn); 357 358 log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: retransmit_timeout_func(%p) end", conn->name, conn);359 355 } 360 356 … … 362 358 static void tcp_tqueue_timer_set(tcp_conn_t *conn) 363 359 { 364 log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: tcp_tqueue_timer_set() begin", conn->name);360 log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: tcp_tqueue_timer_set()", conn->name); 365 361 366 362 /* Clear first to make sure we update refcnt correctly */ … … 368 364 369 365 tcp_conn_addref(conn); 370 fibril_timer_set _locked(conn->retransmit.timer, RETRANSMIT_TIMEOUT,366 fibril_timer_set(conn->retransmit.timer, RETRANSMIT_TIMEOUT, 371 367 retransmit_timeout_func, (void *) conn); 372 373 log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: tcp_tqueue_timer_set() end", conn->name);374 368 } 375 369 … … 377 371 static void tcp_tqueue_timer_clear(tcp_conn_t *conn) 378 372 { 379 log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: tcp_tqueue_timer_clear() begin", conn->name);380 381 if (fibril_timer_clear _locked(conn->retransmit.timer) == fts_active)373 log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: tcp_tqueue_timer_clear()", conn->name); 374 375 if (fibril_timer_clear(conn->retransmit.timer) == fts_active) 382 376 tcp_conn_delref(conn); 383 384 log_msg(LOG_DEFAULT, LVL_DEBUG, "### %s: tcp_tqueue_timer_clear() end", conn->name);385 377 } 386 378
Note:
See TracChangeset
for help on using the changeset viewer.