Changes in uspace/srv/net/tcp/ucall.c [b243da3:a1a101d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tcp/ucall.c
rb243da3 ra1a101d 83 83 84 84 if (oflags == tcp_open_nonblock) { 85 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_open -> %p", nconn);86 85 *conn = nconn; 87 86 return TCP_EOK; … … 235 234 tcp_error_t tcp_uc_close(tcp_conn_t *conn) 236 235 { 237 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_uc_close(%p)", conn->name, 238 conn); 236 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_uc_close()", conn->name); 239 237 240 238 fibril_mutex_lock(&conn->lock); 241 239 242 240 if (conn->cstate == st_closed) { 243 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_close - ENOTEXIST");244 241 fibril_mutex_unlock(&conn->lock); 245 242 return TCP_ENOTEXIST; 246 243 } 247 244 248 if (conn->cstate == st_listen || conn->cstate == st_syn_sent) {249 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_close - listen/syn_sent");250 tcp_conn_reset(conn);251 tcp_conn_remove(conn);252 return TCP_EOK;253 }254 255 245 if (conn->snd_buf_fin) { 256 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_close - ECLOSING");257 246 fibril_mutex_unlock(&conn->lock); 258 247 return TCP_ECLOSING; 259 248 } 260 249 261 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_close - set snd_buf_fin");262 250 conn->snd_buf_fin = true; 263 251 tcp_tqueue_new_data(conn); … … 310 298 tcp_conn_t *conn; 311 299 312 log_msg(LOG_DEFAULT, LVL_DEBUG, 313 "tcp_as_segment_arrived(f:(%u), l:(%u))",314 sp-> foreign.port, sp->local.port);300 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_as_segment_arrived(f:(%x,%u), l:(%x,%u))", 301 sp->foreign.addr.ipv4, sp->foreign.port, 302 sp->local.addr.ipv4, sp->local.port); 315 303 316 304 conn = tcp_conn_find_ref(sp); … … 331 319 } 332 320 333 if (inet_addr_is_any(&conn->ident.foreign.addr)) 334 conn->ident.foreign.addr = sp->foreign.addr; 335 321 if (conn->ident.foreign.addr.ipv4 == TCP_IPV4_ANY) 322 conn->ident.foreign.addr.ipv4 = sp->foreign.addr.ipv4; 336 323 if (conn->ident.foreign.port == TCP_PORT_ANY) 337 324 conn->ident.foreign.port = sp->foreign.port; 338 339 if (inet_addr_is_any(&conn->ident.local.addr)) 340 conn->ident.local.addr = sp->local.addr; 325 if (conn->ident.local.addr.ipv4 == TCP_IPV4_ANY) 326 conn->ident.local.addr.ipv4 = sp->local.addr.ipv4; 341 327 342 328 tcp_conn_segment_arrived(conn, seg);
Note:
See TracChangeset
for help on using the changeset viewer.