Changeset 41811af in mainline for uspace/lib/c/generic/net/socket_client.c
- Timestamp:
- 2011-06-10T10:14:26Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ab547063
- Parents:
- 9536e6e (diff), 390d80d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/net/socket_client.c
r9536e6e r41811af 39 39 #include <assert.h> 40 40 #include <async.h> 41 #include <async_obsolete.h> 41 42 #include <fibril_synch.h> 42 43 #include <stdint.h> … … 472 473 } 473 474 474 rc = (int) async_ req_3_3(phone, NET_SOCKET, socket_id, 0, service, NULL,475 rc = (int) async_obsolete_req_3_3(phone, NET_SOCKET, socket_id, 0, service, NULL, 475 476 &fragment_size, &header_size); 476 477 if (rc != EOK) { … … 493 494 dyn_fifo_destroy(&socket->accepted); 494 495 free(socket); 495 async_ msg_3(phone, NET_SOCKET_CLOSE, (sysarg_t) socket_id, 0,496 async_obsolete_msg_3(phone, NET_SOCKET_CLOSE, (sysarg_t) socket_id, 0, 496 497 service); 497 498 return rc; … … 538 539 539 540 /* Request the message */ 540 message_id = async_ send_3(socket->phone, message,541 message_id = async_obsolete_send_3(socket->phone, message, 541 542 (sysarg_t) socket->socket_id, arg2, socket->service, NULL); 542 543 /* Send the address */ 543 async_ data_write_start(socket->phone, data, datalength);544 async_obsolete_data_write_start(socket->phone, data, datalength); 544 545 545 546 fibril_rwlock_read_unlock(&socket_globals.lock); … … 598 599 599 600 /* Request listen backlog change */ 600 result = (int) async_ req_3_0(socket->phone, NET_SOCKET_LISTEN,601 result = (int) async_obsolete_req_3_0(socket->phone, NET_SOCKET_LISTEN, 601 602 (sysarg_t) socket->socket_id, (sysarg_t) backlog, socket->service); 602 603 … … 681 682 682 683 /* Request accept */ 683 message_id = async_ send_5(socket->phone, NET_SOCKET_ACCEPT,684 message_id = async_obsolete_send_5(socket->phone, NET_SOCKET_ACCEPT, 684 685 (sysarg_t) socket->socket_id, 0, socket->service, 0, 685 686 new_socket->socket_id, &answer); 686 687 687 688 /* Read address */ 688 async_ data_read_start(socket->phone, cliaddr, *addrlen);689 async_obsolete_data_read_start(socket->phone, cliaddr, *addrlen); 689 690 fibril_rwlock_write_unlock(&socket_globals.lock); 690 691 async_wait_for(message_id, &ipc_result); … … 780 781 781 782 /* Request close */ 782 rc = (int) async_ req_3_0(socket->phone, NET_SOCKET_CLOSE,783 rc = (int) async_obsolete_req_3_0(socket->phone, NET_SOCKET_CLOSE, 783 784 (sysarg_t) socket->socket_id, 0, socket->service); 784 785 if (rc != EOK) { … … 853 854 854 855 /* Request send */ 855 message_id = async_ send_5(socket->phone, message,856 message_id = async_obsolete_send_5(socket->phone, message, 856 857 (sysarg_t) socket->socket_id, 857 858 (fragments == 1 ? datalength : socket->data_fragment_size), … … 860 861 /* Send the address if given */ 861 862 if (!toaddr || 862 (async_ data_write_start(socket->phone, toaddr, addrlen) == EOK)) {863 (async_obsolete_data_write_start(socket->phone, toaddr, addrlen) == EOK)) { 863 864 if (fragments == 1) { 864 865 /* Send all if only one fragment */ 865 async_ data_write_start(socket->phone, data, datalength);866 async_obsolete_data_write_start(socket->phone, data, datalength); 866 867 } else { 867 868 /* Send the first fragment */ 868 async_ data_write_start(socket->phone, data,869 async_obsolete_data_write_start(socket->phone, data, 869 870 socket->data_fragment_size - socket->header_size); 870 871 data = ((const uint8_t *) data) + … … 873 874 /* Send the middle fragments */ 874 875 while (--fragments > 1) { 875 async_ data_write_start(socket->phone, data,876 async_obsolete_data_write_start(socket->phone, data, 876 877 socket->data_fragment_size); 877 878 data = ((const uint8_t *) data) + … … 880 881 881 882 /* Send the last fragment */ 882 async_ data_write_start(socket->phone, data,883 async_obsolete_data_write_start(socket->phone, data, 883 884 (datalength + socket->header_size) % 884 885 socket->data_fragment_size); … … 1038 1039 1039 1040 /* Request packet data */ 1040 message_id = async_ send_4(socket->phone, message,1041 message_id = async_obsolete_send_4(socket->phone, message, 1041 1042 (sysarg_t) socket->socket_id, 0, socket->service, 1042 1043 (sysarg_t) flags, &answer); … … 1044 1045 /* Read the address if desired */ 1045 1046 if(!fromaddr || 1046 (async_ data_read_start(socket->phone, fromaddr,1047 (async_obsolete_data_read_start(socket->phone, fromaddr, 1047 1048 *addrlen) == EOK)) { 1048 1049 /* Read the fragment lengths */ 1049 if (async_ data_read_start(socket->phone, lengths,1050 if (async_obsolete_data_read_start(socket->phone, lengths, 1050 1051 sizeof(int) * (fragments + 1)) == EOK) { 1051 1052 if (lengths[fragments] <= datalength) { … … 1054 1055 for (index = 0; index < fragments; 1055 1056 ++index) { 1056 async_ data_read_start(1057 async_obsolete_data_read_start( 1057 1058 socket->phone, data, 1058 1059 lengths[index]); … … 1067 1068 } else { /* fragments == 1 */ 1068 1069 /* Request packet data */ 1069 message_id = async_ send_4(socket->phone, message,1070 message_id = async_obsolete_send_4(socket->phone, message, 1070 1071 (sysarg_t) socket->socket_id, 0, socket->service, 1071 1072 (sysarg_t) flags, &answer); … … 1073 1074 /* Read the address if desired */ 1074 1075 if (!fromaddr || 1075 (async_ data_read_start(socket->phone, fromaddr,1076 (async_obsolete_data_read_start(socket->phone, fromaddr, 1076 1077 *addrlen) == EOK)) { 1077 1078 /* Read all if only one fragment */ 1078 async_ data_read_start(socket->phone, data, datalength);1079 async_obsolete_data_read_start(socket->phone, data, datalength); 1079 1080 } 1080 1081 } … … 1190 1191 1191 1192 /* Request option value */ 1192 message_id = async_ send_3(socket->phone, NET_SOCKET_GETSOCKOPT,1193 message_id = async_obsolete_send_3(socket->phone, NET_SOCKET_GETSOCKOPT, 1193 1194 (sysarg_t) socket->socket_id, (sysarg_t) optname, socket->service, 1194 1195 NULL); 1195 1196 1196 1197 /* Read the length */ 1197 if (async_ data_read_start(socket->phone, optlen,1198 if (async_obsolete_data_read_start(socket->phone, optlen, 1198 1199 sizeof(*optlen)) == EOK) { 1199 1200 /* Read the value */ 1200 async_ data_read_start(socket->phone, value, *optlen);1201 async_obsolete_data_read_start(socket->phone, value, *optlen); 1201 1202 } 1202 1203
Note:
See TracChangeset
for help on using the changeset viewer.