Changeset 88a1bb9 in mainline for uspace/lib/c/generic/net/socket_client.c
- Timestamp:
- 2010-11-18T23:20:09Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4eca056
- Parents:
- f772bc55
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/net/socket_client.c
rf772bc55 r88a1bb9 78 78 */ 79 79 typedef struct socket socket_t; 80 81 /** Type definition of the socket specific data pointer.82 * @see socket83 */84 typedef socket_t *socket_ref;85 80 86 81 /** Socket specific data. … … 213 208 ipc_callid_t callid; 214 209 ipc_call_t call; 215 socket_ refsocket;210 socket_t *socket; 216 211 int rc; 217 212 … … 372 367 */ 373 368 static void 374 socket_initialize(socket_ refsocket, int socket_id, int phone,369 socket_initialize(socket_t *socket, int socket_id, int phone, 375 370 services_t service) 376 371 { … … 405 400 int socket(int domain, int type, int protocol) 406 401 { 407 socket_ refsocket;402 socket_t *socket; 408 403 int phone; 409 404 int socket_id; … … 463 458 464 459 // create a new socket structure 465 socket = (socket_ ref) malloc(sizeof(socket_t));460 socket = (socket_t *) malloc(sizeof(socket_t)); 466 461 if (!socket) 467 462 return ENOMEM; … … 524 519 const void *data, size_t datalength) 525 520 { 526 socket_ refsocket;521 socket_t *socket; 527 522 aid_t message_id; 528 523 ipcarg_t result; … … 588 583 int listen(int socket_id, int backlog) 589 584 { 590 socket_ refsocket;585 socket_t *socket; 591 586 int result; 592 587 … … 627 622 int accept(int socket_id, struct sockaddr * cliaddr, socklen_t * addrlen) 628 623 { 629 socket_ refsocket;630 socket_ refnew_socket;624 socket_t *socket; 625 socket_t *new_socket; 631 626 aid_t message_id; 632 627 ipcarg_t ipc_result; … … 661 656 662 657 // create a new scoket 663 new_socket = (socket_ ref) malloc(sizeof(socket_t));658 new_socket = (socket_t *) malloc(sizeof(socket_t)); 664 659 if (!new_socket) { 665 660 fibril_mutex_unlock(&socket->accept_lock); … … 745 740 * @param[in] socket The socket to be destroyed. 746 741 */ 747 static void socket_destroy(socket_ refsocket)742 static void socket_destroy(socket_t *socket) 748 743 { 749 744 int accepted_id; … … 770 765 int closesocket(int socket_id) 771 766 { 772 socket_ refsocket;767 socket_t *socket; 773 768 int rc; 774 769 … … 824 819 socklen_t addrlen) 825 820 { 826 socket_ refsocket;821 socket_t *socket; 827 822 aid_t message_id; 828 823 ipcarg_t result; … … 981 976 int flags, struct sockaddr *fromaddr, socklen_t *addrlen) 982 977 { 983 socket_ refsocket;978 socket_t *socket; 984 979 aid_t message_id; 985 980 ipcarg_t ipc_result; … … 1163 1158 getsockopt(int socket_id, int level, int optname, void *value, size_t *optlen) 1164 1159 { 1165 socket_ refsocket;1160 socket_t *socket; 1166 1161 aid_t message_id; 1167 1162 ipcarg_t result;
Note:
See TracChangeset
for help on using the changeset viewer.