Changeset 79ae36dd in mainline for uspace/srv/net/tl
- Timestamp:
- 2011-06-08T19:01:55Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0eff68e
- Parents:
- 764d71e
- Location:
- uspace/srv/net/tl
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/icmp/icmp.c
r764d71e r79ae36dd 612 612 static void icmp_receiver(ipc_callid_t iid, ipc_call_t *icall) 613 613 { 614 bool loop = true;615 614 packet_t *packet; 616 615 int rc; 617 616 618 while (loop) { 617 while (true) { 618 if (!IPC_GET_IMETHOD(*icall)) 619 break; 620 619 621 switch (IPC_GET_IMETHOD(*icall)) { 620 622 case NET_TL_RECEIVED: … … 629 631 async_answer_0(iid, (sysarg_t) rc); 630 632 break; 631 case IPC_M_PHONE_HUNGUP:632 loop = false;633 continue;634 633 default: 635 634 async_answer_0(iid, (sysarg_t) ENOTSUP); -
uspace/srv/net/tl/tcp/tcp.c
r764d71e r79ae36dd 38 38 #include <assert.h> 39 39 #include <async.h> 40 #include <async_obsolete.h> 40 41 #include <fibril_synch.h> 41 42 #include <malloc.h> … … 72 73 #include "tcp.h" 73 74 #include "tcp_header.h" 75 76 // FIXME: remove this header 77 #include <kernel/ipc/ipc_methods.h> 74 78 75 79 /** TCP module name. */ … … 799 803 800 804 /* Notify the destination socket */ 801 async_ msg_5(socket->phone, NET_SOCKET_RECEIVED,805 async_obsolete_msg_5(socket->phone, NET_SOCKET_RECEIVED, 802 806 (sysarg_t) socket->socket_id, 803 807 ((packet_dimension->content < socket_data->data_fragment_size) ? … … 820 824 821 825 /* Notify the destination socket */ 822 async_ msg_5(socket->phone, NET_SOCKET_RECEIVED,826 async_obsolete_msg_5(socket->phone, NET_SOCKET_RECEIVED, 823 827 (sysarg_t) socket->socket_id, 824 828 0, 0, 0, … … 1078 1082 if (rc == EOK) { 1079 1083 /* Notify the destination socket */ 1080 async_ msg_5(socket->phone, NET_SOCKET_ACCEPTED,1084 async_obsolete_msg_5(socket->phone, NET_SOCKET_ACCEPTED, 1081 1085 (sysarg_t) listening_socket->socket_id, 1082 1086 socket_data->data_fragment_size, TCP_HEADER_SIZE, … … 1269 1273 { 1270 1274 int res; 1271 bool keep_on_going = true;1272 1275 socket_cores_t local_sockets; 1273 1276 int app_phone = IPC_GET_PHONE(call); … … 1293 1296 fibril_rwlock_initialize(&lock); 1294 1297 1295 while ( keep_on_going) {1298 while (true) { 1296 1299 1297 1300 /* Answer the call */ … … 1301 1304 /* Get the next call */ 1302 1305 callid = async_get_call(&call); 1306 1307 if (!IPC_GET_IMETHOD(call)) { 1308 res = EHANGUP; 1309 break; 1310 } 1303 1311 1304 1312 /* Process the call */ 1305 1313 switch (IPC_GET_IMETHOD(call)) { 1306 case IPC_M_PHONE_HUNGUP:1307 keep_on_going = false;1308 res = EHANGUP;1309 break;1310 1311 1314 case NET_SOCKET: 1312 1315 socket_data = … … 1506 1509 1507 1510 /* Release the application phone */ 1508 async_ hangup(app_phone);1511 async_obsolete_hangup(app_phone); 1509 1512 1510 1513 printf("release\n"); -
uspace/srv/net/tl/udp/udp.c
r764d71e r79ae36dd 37 37 38 38 #include <async.h> 39 #include <async_obsolete.h> 39 40 #include <fibril_synch.h> 40 41 #include <malloc.h> … … 69 70 #include "udp.h" 70 71 #include "udp_header.h" 72 73 // FIXME: remove this header 74 #include <kernel/ipc/ipc_methods.h> 71 75 72 76 /** UDP module name. */ … … 299 303 /* Notify the destination socket */ 300 304 fibril_rwlock_write_unlock(&udp_globals.lock); 301 async_ msg_5(socket->phone, NET_SOCKET_RECEIVED,305 async_obsolete_msg_5(socket->phone, NET_SOCKET_RECEIVED, 302 306 (sysarg_t) socket->socket_id, packet_dimension->content, 0, 0, 303 307 (sysarg_t) fragments); … … 748 752 { 749 753 int res; 750 bool keep_on_going = true;751 754 socket_cores_t local_sockets; 752 755 int app_phone = IPC_GET_PHONE(call); … … 773 776 socket_cores_initialize(&local_sockets); 774 777 775 while ( keep_on_going) {778 while (true) { 776 779 777 780 /* Answer the call */ … … 783 786 /* Get the next call */ 784 787 callid = async_get_call(&call); 788 789 if (!IPC_GET_IMETHOD(call)) { 790 res = EHANGUP; 791 break; 792 } 785 793 786 794 /* Process the call */ 787 795 switch (IPC_GET_IMETHOD(call)) { 788 case IPC_M_PHONE_HUNGUP:789 keep_on_going = false;790 res = EHANGUP;791 break;792 793 796 case NET_SOCKET: 794 797 socket_id = SOCKET_GET_SOCKET_ID(call); … … 880 883 881 884 /* Release the application phone */ 882 async_ hangup(app_phone);885 async_obsolete_hangup(app_phone); 883 886 884 887 /* Release all local sockets */
Note:
See TracChangeset
for help on using the changeset viewer.
