Changes in uspace/srv/net/tl/tcp/tcp.c [0743493a:9934f7d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/tl/tcp/tcp.c
r0743493a r9934f7d 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"); … … 2439 2442 * @param[in] iid Message identifier. 2440 2443 * @param[in,out] icall Message parameters. 2441 * 2444 * @param[in] arg Local argument. 2442 2445 */ 2443 static void tcp_receiver(ipc_callid_t iid, ipc_call_t *icall )2446 static void tcp_receiver(ipc_callid_t iid, ipc_call_t *icall, void *arg) 2444 2447 { 2445 2448 packet_t *packet;
Note:
See TracChangeset
for help on using the changeset viewer.