Changes in uspace/lib/c/generic/net/socket_client.c [b4c9c61:aaa3f33a] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/net/socket_client.c
rb4c9c61 raaa3f33a 79 79 typedef struct socket socket_t; 80 80 81 /** Type definition of the socket specific data pointer.82 * @see socket83 */84 typedef socket_t *socket_ref;85 86 81 /** Socket specific data. 87 82 * … … 162 157 163 158 /** Active sockets. */ 164 sockets_ refsockets;159 sockets_t *sockets; 165 160 166 161 /** Safety lock. … … 185 180 * @returns The active sockets. 186 181 */ 187 static sockets_ refsocket_get_sockets(void)182 static sockets_t *socket_get_sockets(void) 188 183 { 189 184 if (!socket_globals.sockets) { 190 185 socket_globals.sockets = 191 (sockets_ ref) malloc(sizeof(sockets_t));186 (sockets_t *) malloc(sizeof(sockets_t)); 192 187 if (!socket_globals.sockets) 193 188 return NULL; … … 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 … … 332 327 static int socket_generate_new_id(void) 333 328 { 334 sockets_ refsockets;329 sockets_t *sockets; 335 330 int socket_id = 0; 336 331 int count; … … 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.