Changes in uspace/lib/c/generic/inet/tcp.c [cde999a:f9b2cb4c] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/inet/tcp.c
rcde999a rf9b2cb4c 59 59 * 60 60 * @param tcp TCP service 61 * @return EOK on success or anerror code61 * @return EOK on success or negative error code 62 62 */ 63 63 static int tcp_callback_create(tcp_t *tcp) … … 76 76 return rc; 77 77 78 int retval;78 sysarg_t retval; 79 79 async_wait_for(req, &retval); 80 80 … … 205 205 * @param rconn Place to store pointer to new connection 206 206 * 207 * @return EOK on success or anerror code.207 * @return EOK on success or negative error code. 208 208 */ 209 209 int tcp_conn_create(tcp_t *tcp, inet_ep2_t *epp, tcp_cb_t *cb, void *arg, … … 216 216 exch = async_exchange_begin(tcp->sess); 217 217 aid_t req = async_send_0(exch, TCP_CONN_CREATE, &answer); 218 int rc = async_data_write_start(exch, (void *)epp,218 sysarg_t rc = async_data_write_start(exch, (void *)epp, 219 219 sizeof(inet_ep2_t)); 220 220 async_exchange_end(exch); 221 221 222 222 if (rc != EOK) { 223 int rc_orig;223 sysarg_t rc_orig; 224 224 async_wait_for(req, &rc_orig); 225 225 if (rc_orig != EOK) … … 260 260 261 261 exch = async_exchange_begin(conn->tcp->sess); 262 int rc = async_req_1_0(exch, TCP_CONN_DESTROY, conn->id);262 sysarg_t rc = async_req_1_0(exch, TCP_CONN_DESTROY, conn->id); 263 263 async_exchange_end(exch); 264 264 … … 316 316 * @param rlst Place to store pointer to new listener 317 317 * 318 * @return EOK on success or anerror code318 * @return EOK on success or negative error code 319 319 */ 320 320 int tcp_listener_create(tcp_t *tcp, inet_ep_t *ep, tcp_listen_cb_t *lcb, … … 331 331 exch = async_exchange_begin(tcp->sess); 332 332 aid_t req = async_send_0(exch, TCP_LISTENER_CREATE, &answer); 333 int rc = async_data_write_start(exch, (void *)ep,333 sysarg_t rc = async_data_write_start(exch, (void *)ep, 334 334 sizeof(inet_ep_t)); 335 335 async_exchange_end(exch); 336 336 337 337 if (rc != EOK) { 338 int rc_orig;338 sysarg_t rc_orig; 339 339 async_wait_for(req, &rc_orig); 340 340 if (rc_orig != EOK) … … 377 377 378 378 exch = async_exchange_begin(lst->tcp->sess); 379 int rc = async_req_1_0(exch, TCP_LISTENER_DESTROY, lst->id);379 sysarg_t rc = async_req_1_0(exch, TCP_LISTENER_DESTROY, lst->id); 380 380 async_exchange_end(exch); 381 381 … … 446 446 * @param bytes Data size in bytes 447 447 * 448 * @return EOK on success or anerror code448 * @return EOK on success or negative error code 449 449 */ 450 450 int tcp_conn_send(tcp_conn_t *conn, const void *data, size_t bytes) 451 451 { 452 452 async_exch_t *exch; 453 int rc;453 sysarg_t rc; 454 454 455 455 exch = async_exchange_begin(conn->tcp->sess); … … 478 478 * 479 479 * @param conn Connection 480 * @return EOK on success or anerror code480 * @return EOK on success or negative error code 481 481 */ 482 482 int tcp_conn_send_fin(tcp_conn_t *conn) … … 485 485 486 486 exch = async_exchange_begin(conn->tcp->sess); 487 int rc = async_req_1_0(exch, TCP_CONN_SEND_FIN, conn->id);487 sysarg_t rc = async_req_1_0(exch, TCP_CONN_SEND_FIN, conn->id); 488 488 async_exchange_end(exch); 489 489 … … 494 494 * 495 495 * @param conn Connection 496 * @return EOK on success or anerror code496 * @return EOK on success or negative error code 497 497 */ 498 498 int tcp_conn_push(tcp_conn_t *conn) … … 501 501 502 502 exch = async_exchange_begin(conn->tcp->sess); 503 int rc = async_req_1_0(exch, TCP_CONN_PUSH, conn->id);503 sysarg_t rc = async_req_1_0(exch, TCP_CONN_PUSH, conn->id); 504 504 async_exchange_end(exch); 505 505 … … 510 510 * 511 511 * @param conn Connection 512 * @return EOK on success or anerror code512 * @return EOK on success or negative error code 513 513 */ 514 514 int tcp_conn_reset(tcp_conn_t *conn) … … 517 517 518 518 exch = async_exchange_begin(conn->tcp->sess); 519 int rc = async_req_1_0(exch, TCP_CONN_RESET, conn->id);519 sysarg_t rc = async_req_1_0(exch, TCP_CONN_RESET, conn->id); 520 520 async_exchange_end(exch); 521 521 … … 538 538 * 539 539 * @return EOK on success, EAGAIN if no received data is pending, or other 540 * error code in case of other error540 * negative error code in case of other error 541 541 */ 542 542 int tcp_conn_recv(tcp_conn_t *conn, void *buf, size_t bsize, size_t *nrecv) … … 562 562 } 563 563 564 int retval;564 sysarg_t retval; 565 565 async_wait_for(req, &retval); 566 566 if (retval != EOK) { … … 586 586 * @param nrecv Place to store actual number of received bytes 587 587 * 588 * @return EOK on success or anerror code588 * @return EOK on success or negative error code 589 589 */ 590 590 int tcp_conn_recv_wait(tcp_conn_t *conn, void *buf, size_t bsize, … … 616 616 } 617 617 618 int retval;618 sysarg_t retval; 619 619 async_wait_for(req, &retval); 620 620 if (retval != EOK) {
Note:
See TracChangeset
for help on using the changeset viewer.