Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tl/tcp/tcp.c

    r9934f7d r0743493a  
    3838#include <assert.h>
    3939#include <async.h>
    40 #include <async_obsolete.h>
    4140#include <fibril_synch.h>
    4241#include <malloc.h>
     
    7372#include "tcp.h"
    7473#include "tcp_header.h"
    75 
    76 // FIXME: remove this header
    77 #include <kernel/ipc/ipc_methods.h>
    7874
    7975/** TCP module name. */
     
    803799
    804800        /* Notify the destination socket */
    805         async_obsolete_msg_5(socket->phone, NET_SOCKET_RECEIVED,
     801        async_msg_5(socket->phone, NET_SOCKET_RECEIVED,
    806802            (sysarg_t) socket->socket_id,
    807803            ((packet_dimension->content < socket_data->data_fragment_size) ?
     
    824820
    825821        /* Notify the destination socket */
    826         async_obsolete_msg_5(socket->phone, NET_SOCKET_RECEIVED,
     822        async_msg_5(socket->phone, NET_SOCKET_RECEIVED,
    827823            (sysarg_t) socket->socket_id,
    828824            0, 0, 0,
     
    10821078                if (rc == EOK) {
    10831079                        /* Notify the destination socket */
    1084                         async_obsolete_msg_5(socket->phone, NET_SOCKET_ACCEPTED,
     1080                        async_msg_5(socket->phone, NET_SOCKET_ACCEPTED,
    10851081                            (sysarg_t) listening_socket->socket_id,
    10861082                            socket_data->data_fragment_size, TCP_HEADER_SIZE,
     
    12731269{
    12741270        int res;
     1271        bool keep_on_going = true;
    12751272        socket_cores_t local_sockets;
    12761273        int app_phone = IPC_GET_PHONE(call);
     
    12961293        fibril_rwlock_initialize(&lock);
    12971294
    1298         while (true) {
     1295        while (keep_on_going) {
    12991296
    13001297                /* Answer the call */
     
    13041301                /* Get the next call */
    13051302                callid = async_get_call(&call);
    1306                
    1307                 if (!IPC_GET_IMETHOD(call)) {
     1303
     1304                /* Process the call */
     1305                switch (IPC_GET_IMETHOD(call)) {
     1306                case IPC_M_PHONE_HUNGUP:
     1307                        keep_on_going = false;
    13081308                        res = EHANGUP;
    13091309                        break;
    1310                 }
    1311 
    1312                 /* Process the call */
    1313                 switch (IPC_GET_IMETHOD(call)) {
     1310
    13141311                case NET_SOCKET:
    13151312                        socket_data =
     
    15091506
    15101507        /* Release the application phone */
    1511         async_obsolete_hangup(app_phone);
     1508        async_hangup(app_phone);
    15121509
    15131510        printf("release\n");
     
    24422439 * @param[in]     iid   Message identifier.
    24432440 * @param[in,out] icall Message parameters.
    2444  * @param[in]     arg   Local argument.
     2441 *
    24452442 */
    2446 static void tcp_receiver(ipc_callid_t iid, ipc_call_t *icall, void *arg)
     2443static void tcp_receiver(ipc_callid_t iid, ipc_call_t *icall)
    24472444{
    24482445        packet_t *packet;
Note: See TracChangeset for help on using the changeset viewer.