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