Changes in uspace/srv/net/tcp/ucall.c [69a93df7:a2e3ee6] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tcp/ucall.c
r69a93df7 ra2e3ee6 70 70 tcp_conn_t *nconn; 71 71 72 log_msg(L VL_DEBUG, "tcp_uc_open(%p, %p, %s, %s, %p)",72 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_open(%p, %p, %s, %s, %p)", 73 73 lsock, fsock, acpass == ap_active ? "active" : "passive", 74 74 oflags == tcp_open_nonblock ? "nonblock" : "none", conn); … … 88 88 89 89 /* Wait for connection to be established or reset */ 90 log_msg(L VL_DEBUG, "tcp_uc_open: Wait for connection.");90 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_open: Wait for connection."); 91 91 fibril_mutex_lock(&nconn->lock); 92 92 while (nconn->cstate == st_listen || … … 97 97 98 98 if (nconn->cstate != st_established) { 99 log_msg(L VL_DEBUG, "tcp_uc_open: Connection was reset.");99 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_open: Connection was reset."); 100 100 assert(nconn->cstate == st_closed); 101 101 fibril_mutex_unlock(&nconn->lock); … … 104 104 105 105 fibril_mutex_unlock(&nconn->lock); 106 log_msg(L VL_DEBUG, "tcp_uc_open: Connection was established.");106 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_open: Connection was established."); 107 107 108 108 *conn = nconn; 109 log_msg(L VL_DEBUG, "tcp_uc_open -> %p", nconn);109 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_open -> %p", nconn); 110 110 return TCP_EOK; 111 111 } … … 118 118 size_t xfer_size; 119 119 120 log_msg(L VL_DEBUG, "%s: tcp_uc_send()", conn->name);120 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_uc_send()", conn->name); 121 121 122 122 fibril_mutex_lock(&conn->lock); … … 141 141 buf_free = conn->snd_buf_size - conn->snd_buf_used; 142 142 while (buf_free == 0 && !conn->reset) { 143 log_msg(L VL_DEBUG, "%s: buf_free == 0, waiting.",143 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: buf_free == 0, waiting.", 144 144 conn->name); 145 145 fibril_condvar_wait(&conn->snd_buf_cv, &conn->lock); … … 175 175 size_t xfer_size; 176 176 177 log_msg(L VL_DEBUG, "%s: tcp_uc_receive()", conn->name);177 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_uc_receive()", conn->name); 178 178 179 179 fibril_mutex_lock(&conn->lock); … … 186 186 /* Wait for data to become available */ 187 187 while (conn->rcv_buf_used == 0 && !conn->rcv_buf_fin && !conn->reset) { 188 log_msg(L VL_DEBUG, "tcp_uc_receive() - wait for data");188 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_receive() - wait for data"); 189 189 fibril_condvar_wait(&conn->rcv_buf_cv, &conn->lock); 190 190 } … … 223 223 tcp_tqueue_ctrl_seg(conn, CTL_ACK); 224 224 225 log_msg(L VL_DEBUG, "%s: tcp_uc_receive() - returning %zu bytes",225 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_uc_receive() - returning %zu bytes", 226 226 conn->name, xfer_size); 227 227 … … 234 234 tcp_error_t tcp_uc_close(tcp_conn_t *conn) 235 235 { 236 log_msg(L VL_DEBUG, "%s: tcp_uc_close()", conn->name);236 log_msg(LOG_DEFAULT, LVL_DEBUG, "%s: tcp_uc_close()", conn->name); 237 237 238 238 fibril_mutex_lock(&conn->lock); … … 258 258 void tcp_uc_abort(tcp_conn_t *conn) 259 259 { 260 log_msg(L VL_DEBUG, "tcp_uc_abort()");260 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_abort()"); 261 261 } 262 262 … … 264 264 void tcp_uc_status(tcp_conn_t *conn, tcp_conn_status_t *cstatus) 265 265 { 266 log_msg(L VL_DEBUG, "tcp_uc_status()");266 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_status()"); 267 267 cstatus->cstate = conn->cstate; 268 268 } … … 276 276 void tcp_uc_delete(tcp_conn_t *conn) 277 277 { 278 log_msg(L VL_DEBUG, "tcp_uc_delete()");278 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_delete()"); 279 279 tcp_conn_delete(conn); 280 280 } … … 282 282 void tcp_uc_set_cstate_cb(tcp_conn_t *conn, tcp_cstate_cb_t cb, void *arg) 283 283 { 284 log_msg(L VL_DEBUG, "tcp_uc_set_ctate_cb(%p, %p, %p)",284 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_uc_set_ctate_cb(%p, %p, %p)", 285 285 conn, cb, arg); 286 286 … … 298 298 tcp_conn_t *conn; 299 299 300 log_msg(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);303 304 300 conn = tcp_conn_find_ref(sp); 305 301 if (conn == NULL) { 306 log_msg(L VL_WARN, "No connection found.");302 log_msg(LOG_DEFAULT, LVL_WARN, "No connection found."); 307 303 tcp_unexpected_segment(sp, seg); 308 304 return; … … 312 308 313 309 if (conn->cstate == st_closed) { 314 log_msg(L VL_WARN, "Connection is closed.");310 log_msg(LOG_DEFAULT, LVL_WARN, "Connection is closed."); 315 311 tcp_unexpected_segment(sp, seg); 316 312 fibril_mutex_unlock(&conn->lock); … … 319 315 } 320 316 321 if (conn->ident.foreign.addr.ipv4 == TCP_IPV4_ANY) 322 conn->ident.foreign.addr.ipv4 = sp->foreign.addr.ipv4; 317 if (inet_addr_is_any(&conn->ident.foreign.addr)) 318 conn->ident.foreign.addr = sp->foreign.addr; 319 323 320 if (conn->ident.foreign.port == TCP_PORT_ANY) 324 321 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; 322 323 if (inet_addr_is_any(&conn->ident.local.addr)) 324 conn->ident.local.addr = sp->local.addr; 327 325 328 326 tcp_conn_segment_arrived(conn, seg); … … 339 337 void tcp_to_user(void) 340 338 { 341 log_msg(L VL_DEBUG, "tcp_to_user()");339 log_msg(LOG_DEFAULT, LVL_DEBUG, "tcp_to_user()"); 342 340 } 343 341
Note:
See TracChangeset
for help on using the changeset viewer.