Changes in / [557c7d0:11658b64] in mainline


Ignore:
Files:
5 deleted
30 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r557c7d0 r11658b64  
    2828
    2929CSCOPE = cscope
    30 CHECK = tools/check.sh
    3130CONFIG = tools/config.py
    3231AUTOTOOL = tools/autotool.py
     
    4241CONFIG_HEADER = config.h
    4342
    44 .PHONY: all precheck cscope autotool config_auto config_default config distclean clean check
     43.PHONY: all precheck cscope autotool config_auto config_default config distclean clean
    4544
    4645all: $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER)
     
    5554cscope:
    5655        find kernel boot uspace -regex '^.*\.[chsS]$$' | xargs $(CSCOPE) -b -k -u -f$(CSCOPE).out
    57 
    58 # Pre-integration build check
    59 check: $(CHECK)
    60 ifdef JOBS
    61         $(CHECK) -j $(JOBS)
    62 else
    63         $(CHECK)
    64 endif
    6556
    6657$(COMMON_MAKEFILE): autotool
  • uspace/app/tester/Makefile

    r557c7d0 r11658b64  
    5555        loop/loop1.c \
    5656        mm/malloc1.c \
    57         hw/misc/virtchar1.c \
    5857        hw/serial/serial1.c
    5958
  • uspace/app/tester/tester.c

    r557c7d0 r11658b64  
    6666#include "hw/serial/serial1.def"
    6767#include "adt/usbaddrkeep.def"
    68 #include "hw/misc/virtchar1.def"
    6968        {NULL, NULL, NULL, false}
    7069};
  • uspace/app/tester/tester.h

    r557c7d0 r11658b64  
    8383extern const char *test_serial1(void);
    8484extern const char *test_usbaddrkeep(void);
    85 extern const char *test_virtchar1(void);
    8685
    8786extern test_t tests[];
  • uspace/drv/rootvirt/devices.def

    r557c7d0 r11658b64  
    1717        .match_id = "virtual&test2"
    1818},
    19 {
    20         .name = "null",
    21         .match_id = "virtual&test1"
    22 },
    2319#endif
    2420/* Virtual USB host controller. */
  • uspace/drv/test1/Makefile

    r557c7d0 r11658b64  
    3333
    3434SOURCES = \
    35         char.c \
    3635        test1.c
    3736
  • uspace/drv/test1/test1.c

    r557c7d0 r11658b64  
    3434#include <errno.h>
    3535#include <str_error.h>
    36 #include "test1.h"
     36#include <driver.h>
     37
     38#define NAME "test1"
    3739
    3840static int add_device(device_t *dev);
     
    9698        add_device_to_class(dev, "virtual");
    9799
    98         if (str_cmp(dev->name, "null") == 0) {
    99                 dev->ops = &char_device_ops;
    100                 add_device_to_class(dev, "virt-null");
    101         } else if (dev->parent == NULL) {
     100        if (dev->parent == NULL) {
    102101                register_child_verbose(dev, "cloning myself ;-)", "clone",
    103102                    "virtual&test1", 10);
     
    118117}
    119118
     119
  • uspace/lib/c/generic/devmap.c

    r557c7d0 r11658b64  
    127127/** Register new device.
    128128 *
    129  * The @p interface is used when forwarding connection to the driver.
    130  * If not 0, the first argument is the interface and the second argument
    131  * is the devmap handle of the device.
    132  * When the interface is zero (default), the first argument is directly
    133  * the handle (to ensure backward compatibility).
    134  *
    135  * @param fqdn Fully qualified device name.
    136  * @param[out] handle Handle to the created instance of device.
    137  * @param interface Interface when forwarding.
    138  *
    139  */
    140 int devmap_device_register_with_iface(const char *fqdn,
    141     devmap_handle_t *handle, sysarg_t interface)
    142 {
    143         int phone = devmap_get_phone(DEVMAP_DRIVER, IPC_FLAG_BLOCKING);
    144        
    145         if (phone < 0)
    146                 return phone;
    147        
    148         async_serialize_start();
    149        
    150         ipc_call_t answer;
    151         aid_t req = async_send_2(phone, DEVMAP_DEVICE_REGISTER, interface, 0,
    152             &answer);
    153        
    154         sysarg_t retval = async_data_write_start(phone, fqdn, str_size(fqdn));
    155         if (retval != EOK) {
    156                 async_wait_for(req, NULL);
    157                 async_serialize_end();
    158                 return retval;
    159         }
    160        
    161         async_wait_for(req, &retval);
    162        
    163         async_serialize_end();
    164        
    165         if (retval != EOK) {
    166                 if (handle != NULL)
    167                         *handle = -1;
    168                 return retval;
    169         }
    170        
    171         if (handle != NULL)
    172                 *handle = (devmap_handle_t) IPC_GET_ARG1(answer);
    173        
    174         return retval;
    175 }
    176 
    177 /** Register new device.
    178  *
     129 * @param namespace Namespace name.
    179130 * @param fqdn      Fully qualified device name.
    180131 * @param handle    Output: Handle to the created instance of device.
     
    183134int devmap_device_register(const char *fqdn, devmap_handle_t *handle)
    184135{
    185         return devmap_device_register_with_iface(fqdn, handle, 0);
    186 }
    187 
     136        int phone = devmap_get_phone(DEVMAP_DRIVER, IPC_FLAG_BLOCKING);
     137       
     138        if (phone < 0)
     139                return phone;
     140       
     141        async_serialize_start();
     142       
     143        ipc_call_t answer;
     144        aid_t req = async_send_2(phone, DEVMAP_DEVICE_REGISTER, 0, 0,
     145            &answer);
     146       
     147        sysarg_t retval = async_data_write_start(phone, fqdn, str_size(fqdn));
     148        if (retval != EOK) {
     149                async_wait_for(req, NULL);
     150                async_serialize_end();
     151                return retval;
     152        }
     153       
     154        async_wait_for(req, &retval);
     155       
     156        async_serialize_end();
     157       
     158        if (retval != EOK) {
     159                if (handle != NULL)
     160                        *handle = -1;
     161                return retval;
     162        }
     163       
     164        if (handle != NULL)
     165                *handle = (devmap_handle_t) IPC_GET_ARG1(answer);
     166       
     167        return retval;
     168}
    188169
    189170int devmap_device_get_handle(const char *fqdn, devmap_handle_t *handle, unsigned int flags)
  • uspace/lib/c/generic/net/modules.c

    r557c7d0 r11658b64  
    198198}
    199199
     200/** Receives data from the other party.
     201 *
     202 * The received data buffer is allocated and returned.
     203 *
     204 * @param[out] data     The data buffer to be filled.
     205 * @param[out] length   The buffer length.
     206 * @return              EOK on success.
     207 * @return              EBADMEM if the data or the length parameter is NULL.
     208 * @return              EINVAL if the client does not send data.
     209 * @return              ENOMEM if there is not enough memory left.
     210 * @return              Other error codes as defined for the
     211 *                      async_data_write_finalize() function.
     212 */
     213int data_receive(void **data, size_t *length)
     214{
     215        ipc_callid_t callid;
     216        int rc;
     217
     218        if (!data || !length)
     219                return EBADMEM;
     220
     221        // fetch the request
     222        if (!async_data_write_receive(&callid, length))
     223                return EINVAL;
     224
     225        // allocate the buffer
     226        *data = malloc(*length);
     227        if (!*data)
     228                return ENOMEM;
     229
     230        // fetch the data
     231        rc = async_data_write_finalize(callid, *data, *length);
     232        if (rc != EOK) {
     233                free(data);
     234                return rc;
     235        }
     236
     237        return EOK;
     238}
     239
    200240/** Replies the data to the other party.
    201241 *
  • uspace/lib/c/include/devmap.h

    r557c7d0 r11658b64  
    4545extern int devmap_driver_register(const char *, async_client_conn_t);
    4646extern int devmap_device_register(const char *, devmap_handle_t *);
    47 extern int devmap_device_register_with_iface(const char *, devmap_handle_t *, sysarg_t);
    4847
    4948extern int devmap_device_get_handle(const char *, devmap_handle_t *, unsigned int);
  • uspace/lib/c/include/ipc/devman.h

    r557c7d0 r11658b64  
    123123        DEVMAN_CLIENT,
    124124        DEVMAN_CONNECT_TO_DEVICE,
    125         DEVMAN_CONNECT_FROM_DEVMAP,
    126125        DEVMAN_CONNECT_TO_PARENTS_DEVICE
    127126} devman_interface_t;
  • uspace/lib/c/include/net/modules.h

    r557c7d0 r11658b64  
    4949#include <sys/time.h>
    5050
     51/** Converts the data length between different types.
     52 *
     53 * @param[in] type_from The source type.
     54 * @param[in] type_to   The destination type.
     55 * @param[in] count     The number units of the source type size.
     56 */
     57#define CONVERT_SIZE(type_from, type_to, count) \
     58        ((sizeof(type_from) / sizeof(type_to)) * (count))
     59
     60/** Registers the module service at the name server.
     61 *
     62 * @param[in] me        The module service.
     63 * @param[out] phonehash The created phone hash.
     64 */
     65#define REGISTER_ME(me, phonehash) \
     66        ipc_connect_to_me(PHONE_NS, (me), 0, 0, (phonehash))
     67
    5168/** Connect to the needed module function type definition.
    5269 *
     
    6380extern int connect_to_service(services_t);
    6481extern int connect_to_service_timeout(services_t, suseconds_t);
     82extern int data_receive(void **, size_t *);
    6583extern int data_reply(void *, size_t);
    6684extern void refresh_answer(ipc_call_t *, int *);
  • uspace/srv/devman/devman.c

    r557c7d0 r11658b64  
    6262}
    6363
    64 static int devmap_devices_class_compare(unsigned long key[], hash_count_t keys,
    65     link_t *item)
    66 {
    67         dev_class_info_t *class_info
    68             = hash_table_get_instance(item, dev_class_info_t, devmap_link);
    69         assert(class_info != NULL);
    70 
    71         return (class_info->devmap_handle == (devmap_handle_t) key[0]);
    72 }
    73 
    7464static void devices_remove_callback(link_t *item)
    7565{
     
    8575        .hash = devices_hash,
    8676        .compare = devmap_devices_compare,
    87         .remove_callback = devices_remove_callback
    88 };
    89 
    90 static hash_table_operations_t devmap_devices_class_ops = {
    91         .hash = devices_hash,
    92         .compare = devmap_devices_class_compare,
    9377        .remove_callback = devices_remove_callback
    9478};
     
    694678        }
    695679       
    696         devmap_device_register_with_iface(devmap_pathname,
    697             &node->devmap_handle, DEVMAN_CONNECT_FROM_DEVMAP);
     680        devmap_device_register(devmap_pathname, &node->devmap_handle);
    698681       
    699682        tree_add_devmap_device(tree, node);
     
    10671050       
    10681051        info = (dev_class_info_t *) malloc(sizeof(dev_class_info_t));
    1069         if (info != NULL) {
     1052        if (info != NULL)
    10701053                memset(info, 0, sizeof(dev_class_info_t));
    1071                 list_initialize(&info->dev_classes);
    1072                 list_initialize(&info->devmap_link);
    1073                 list_initialize(&info->link);
    1074         }
    10751054       
    10761055        return info;
     
    11961175        fibril_rwlock_initialize(&class_list->rwlock);
    11971176        hash_table_create(&class_list->devmap_devices, DEVICE_BUCKETS, 1,
    1198             &devmap_devices_class_ops);
     1177            &devmap_devices_ops);
    11991178}
    12001179
     
    12441223        hash_table_insert(&class_list->devmap_devices, &key, &cli->devmap_link);
    12451224        fibril_rwlock_write_unlock(&class_list->rwlock);
    1246 
    1247         assert(find_devmap_class_device(class_list, cli->devmap_handle) != NULL);
    12481225}
    12491226
  • uspace/srv/devman/main.c

    r557c7d0 r11658b64  
    281281         * handle.
    282282         */
    283         devmap_device_register_with_iface(devmap_pathname,
    284             &cli->devmap_handle, DEVMAN_CONNECT_FROM_DEVMAP);
     283        devmap_device_register(devmap_pathname, &cli->devmap_handle);
    285284       
    286285        /*
     
    487486static void devman_connection_devmapper(ipc_callid_t iid, ipc_call_t *icall)
    488487{
    489         devmap_handle_t devmap_handle = IPC_GET_ARG2(*icall);
     488        devmap_handle_t devmap_handle = IPC_GET_IMETHOD(*icall);
    490489        node_t *dev;
    491490
     
    504503        }
    505504       
     505        printf(NAME ": devman_connection_devmapper: forward connection to "
     506            "device %s to driver %s.\n", dev->pathname, dev->drv->name);
    506507        ipc_forward_fast(iid, dev->drv->phone, DRIVER_CLIENT, dev->handle, 0,
    507508            IPC_FF_NONE);
    508         printf(NAME ": devman_connection_devmapper: forwarded connection to "
    509             "device %s to driver %s.\n", dev->pathname, dev->drv->name);
    510509}
    511510
     
    513512static void devman_connection(ipc_callid_t iid, ipc_call_t *icall)
    514513{
     514        /*
     515         * Silly hack to enable the device manager to register as a driver by
     516         * the device mapper. If the ipc method is not IPC_M_CONNECT_ME_TO, this
     517         * is not the forwarded connection from naming service, so it must be a
     518         * connection from the devmapper which thinks this is a devmapper-style
     519         * driver. So pretend this is a devmapper-style driver. (This does not
     520         * work for device with handle == IPC_M_CONNECT_ME_TO, because devmapper
     521         * passes device handle to the driver as an ipc method.)
     522         */
     523        if (IPC_GET_IMETHOD(*icall) != IPC_M_CONNECT_ME_TO)
     524                devman_connection_devmapper(iid, icall);
     525
     526        /*
     527         * ipc method is IPC_M_CONNECT_ME_TO, so this is forwarded connection
     528         * from naming service by which we registered as device manager, so be
     529         * device manager.
     530         */
     531       
    515532        /* Select interface. */
    516533        switch ((sysarg_t) (IPC_GET_ARG1(*icall))) {
     
    525542                devman_forward(iid, icall, false);
    526543                break;
    527         case DEVMAN_CONNECT_FROM_DEVMAP:
    528                 /* Someone connected through devmap node. */
    529                 devman_connection_devmapper(iid, icall);
    530                 break;
    531544        case DEVMAN_CONNECT_TO_PARENTS_DEVICE:
    532545                /* Connect client to selected device. */
  • uspace/srv/devmap/devmap.c

    r557c7d0 r11658b64  
    9999        /** Device driver handling this device */
    100100        devmap_driver_t *driver;
    101         /** Use this interface when forwarding to driver. */
    102         sysarg_t forward_interface;
    103101} devmap_device_t;
    104102
     
    519517        }
    520518       
    521         /* Set the interface, if any. */
    522         device->forward_interface = IPC_GET_ARG1(*icall);
    523 
    524519        /* Get fqdn */
    525520        char *fqdn;
     
    571566        /* Get unique device handle */
    572567        device->handle = devmap_create_handle();
    573 
     568       
    574569        devmap_namespace_addref(namespace, device);
    575570        device->driver = driver;
     
    622617        }
    623618       
    624         if (dev->forward_interface == 0) {
    625                 ipc_forward_fast(callid, dev->driver->phone,
    626                     dev->handle, 0, 0,
    627                     IPC_FF_NONE);
    628         } else {
    629                 ipc_forward_fast(callid, dev->driver->phone,
    630                     dev->forward_interface, dev->handle, 0,
    631                     IPC_FF_NONE);
    632         }
     619        ipc_forward_fast(callid, dev->driver->phone, dev->handle,
     620            IPC_GET_ARG3(*call), 0, IPC_FF_NONE);
    633621       
    634622        fibril_mutex_unlock(&devices_list_mutex);
  • uspace/srv/hw/netif/dp8390/dp8390_module.c

    r557c7d0 r11658b64  
    197197                return rc;
    198198        address->value = (char *) (&((dpeth_t *) device->specific)->de_address);
    199         address->length = sizeof(ether_addr_t);
     199        address->length = CONVERT_SIZE(ether_addr_t, char, 1);
    200200        return EOK;
    201201}
     
    310310        async_set_interrupt_received(irq_handler);
    311311
    312         return ipc_connect_to_me(PHONE_NS, SERVICE_DP8390, 0, 0, &phonehash);
     312        return REGISTER_ME(SERVICE_DP8390, &phonehash);
    313313}
    314314
  • uspace/srv/net/il/arp/arp.c

    r557c7d0 r11658b64  
    483483        des_proto = des_hw + header->hardware_length;
    484484        trans = arp_addr_find(&proto->addresses, (char *) src_proto,
    485             header->protocol_length);
     485            CONVERT_SIZE(uint8_t, char, header->protocol_length));
    486486        /* Exists? */
    487487        if (trans && trans->hw_addr) {
    488                 if (trans->hw_addr->length != header->hardware_length)
     488                if (trans->hw_addr->length != CONVERT_SIZE(uint8_t, char,
     489                    header->hardware_length)) {
    489490                        return EINVAL;
     491                }
    490492                memcpy(trans->hw_addr->value, src_hw, trans->hw_addr->length);
    491493        }
    492494        /* Is my protocol address? */
    493         if (proto->addr->length != header->protocol_length)
     495        if (proto->addr->length != CONVERT_SIZE(uint8_t, char,
     496            header->protocol_length)) {
    494497                return EINVAL;
     498        }
    495499        if (!str_lcmp(proto->addr->value, (char *) des_proto,
    496500            proto->addr->length)) {
     
    503507                        fibril_condvar_initialize(&trans->cv);
    504508                        rc = arp_addr_add(&proto->addresses, (char *) src_proto,
    505                             header->protocol_length, trans);
     509                            CONVERT_SIZE(uint8_t, char, header->protocol_length),
     510                            trans);
    506511                        if (rc != EOK) {
    507512                                /* The generic char map has already freed trans! */
     
    511516                if (!trans->hw_addr) {
    512517                        trans->hw_addr = measured_string_create_bulk(
    513                             (char *) src_hw, header->hardware_length);
     518                            (char *) src_hw, CONVERT_SIZE(uint8_t, char,
     519                            header->hardware_length));
    514520                        if (!trans->hw_addr)
    515521                                return ENOMEM;
     
    600606
    601607        /* ARP packet content size = header + (address + translation) * 2 */
    602         length = 8 + 2 * (proto->addr->length + device->addr->length);
     608        length = 8 + 2 * (CONVERT_SIZE(char, uint8_t, proto->addr->length) +
     609            CONVERT_SIZE(char, uint8_t, device->addr->length));
    603610        if (length > device->packet_dimension.content)
    604611                return ELIMIT;
     
    633640
    634641        rc = packet_set_addr(packet, (uint8_t *) device->addr->value,
    635             (uint8_t *) device->broadcast_addr->value, device->addr->length);
     642            (uint8_t *) device->broadcast_addr->value,
     643            CONVERT_SIZE(char, uint8_t, device->addr->length));
    636644        if (rc != EOK) {
    637645                pq_release_remote(arp_globals.net_phone, packet_get_id(packet));
  • uspace/srv/net/il/arp/arp_module.c

    r557c7d0 r11658b64  
    7979                goto out;
    8080       
    81         rc = ipc_connect_to_me(PHONE_NS, SERVICE_ARP, 0, 0, &phonehash);
     81        rc = REGISTER_ME(SERVICE_ARP, &phonehash);
    8282        if (rc != EOK)
    8383                goto out;
  • uspace/srv/net/il/ip/ip.c

    r557c7d0 r11658b64  
    442442                if (route) {
    443443                        address.value = (char *) &route->address.s_addr;
    444                         address.length = sizeof(in_addr_t);
     444                        address.length = CONVERT_SIZE(in_addr_t, char, 1);
    445445                       
    446446                        rc = arp_device_req(ip_netif->arp->phone,
     
    639639        if (destination) {
    640640                rc = packet_set_addr(packet, NULL, (uint8_t *) destination->value,
    641                     destination->length);
     641                    CONVERT_SIZE(char, uint8_t, destination->length));
    642642        } else {
    643643                rc = packet_set_addr(packet, NULL, NULL, 0);
     
    687687                                rc = packet_set_addr(next, NULL,
    688688                                    (uint8_t *) destination->value,
    689                                     destination->length);
     689                                    CONVERT_SIZE(char, uint8_t,
     690                                    destination->length));
    690691                                if (rc != EOK) {
    691692                                        free(last_header);
     
    717718                        rc = packet_set_addr(next, NULL,
    718719                            (uint8_t *) destination->value,
    719                             destination->length);
     720                            CONVERT_SIZE(char, uint8_t, destination->length));
    720721                        if (rc != EOK) {
    721722                                free(last_header);
     
    10051006                destination.value = route->gateway.s_addr ?
    10061007                    (char *) &route->gateway.s_addr : (char *) &dest.s_addr;
    1007                 destination.length = sizeof(dest.s_addr);
     1008                destination.length = CONVERT_SIZE(dest.s_addr, char, 1);
    10081009
    10091010                rc = arp_translate_req(netif->arp->phone, netif->device_id,
     
    17571758                        // clear the ARP mapping if any
    17581759                        address.value = (char *) &header->destination_address;
    1759                         address.length = sizeof(header->destination_address);
     1760                        address.length = CONVERT_SIZE(uint8_t, char,
     1761                            sizeof(header->destination_address));
    17601762                        arp_clear_address_req(netif->arp->phone,
    17611763                            netif->device_id, SERVICE_IP, &address);
     
    19491951
    19501952        case NET_IP_GET_ROUTE:
    1951                 rc = async_data_write_accept((void **) &addr, false, 0, 0, 0,
    1952                     &addrlen);
     1953                rc = data_receive((void **) &addr, &addrlen);
    19531954                if (rc != EOK)
    19541955                        return rc;
  • uspace/srv/net/il/ip/ip_module.c

    r557c7d0 r11658b64  
    8080                goto out;
    8181       
    82         rc = ipc_connect_to_me(PHONE_NS, SERVICE_IP, 0, 0, &phonehash);
     82        rc = REGISTER_ME(SERVICE_IP, &phonehash);
    8383        if (rc != EOK)
    8484                goto out;
  • uspace/srv/net/net/net.c

    r557c7d0 r11658b64  
    335335                goto out;
    336336       
    337         rc = ipc_connect_to_me(PHONE_NS, SERVICE_NETWORKING, 0, 0, &phonehash);
     337        rc = REGISTER_ME(SERVICE_NETWORKING, &phonehash);
    338338        if (rc != EOK)
    339339                goto out;
  • uspace/srv/net/netif/lo/lo.c

    r557c7d0 r11658b64  
    166166        sysarg_t phonehash;
    167167
    168         return ipc_connect_to_me(PHONE_NS, SERVICE_LO, 0, 0, &phonehash);
     168        return REGISTER_ME(SERVICE_LO, &phonehash);
    169169}
    170170
  • uspace/srv/net/nil/eth/eth.c

    r557c7d0 r11658b64  
    201201
    202202        eth_globals.broadcast_addr =
    203             measured_string_create_bulk("\xFF\xFF\xFF\xFF\xFF\xFF", ETH_ADDR);
     203            measured_string_create_bulk("\xFF\xFF\xFF\xFF\xFF\xFF",
     204            CONVERT_SIZE(uint8_t, char, ETH_ADDR));
    204205        if (!eth_globals.broadcast_addr) {
    205206                rc = ENOMEM;
  • uspace/srv/net/nil/eth/eth_module.c

    r557c7d0 r11658b64  
    6666                goto out;
    6767
    68         rc = ipc_connect_to_me(PHONE_NS, SERVICE_ETHERNET, 0, 0, &phonehash);
     68        rc = REGISTER_ME(SERVICE_ETHERNET, &phonehash);
    6969        if (rc != EOK)
    7070                goto out;
  • uspace/srv/net/nil/nildummy/nildummy_module.c

    r557c7d0 r11658b64  
    6767                goto out;
    6868       
    69         rc = ipc_connect_to_me(PHONE_NS, SERVICE_NILDUMMY, 0, 0, &phonehash);
     69        rc = REGISTER_ME(SERVICE_NILDUMMY, &phonehash);
    7070        if (rc != EOK)
    7171                goto out;
  • uspace/srv/net/tl/icmp/icmp_module.c

    r557c7d0 r11658b64  
    7474                goto out;
    7575
    76         rc = ipc_connect_to_me(PHONE_NS, SERVICE_ICMP, 0, 0, &phonehash);
     76        rc = REGISTER_ME(SERVICE_ICMP, &phonehash);
    7777        if (rc != EOK)
    7878                goto out;
  • uspace/srv/net/tl/tcp/tcp.c

    r557c7d0 r11658b64  
    13651365
    13661366                case NET_SOCKET_BIND:
    1367                         res = async_data_write_accept((void **) &addr, false,
    1368                             0, 0, 0, &addrlen);
     1367                        res = data_receive((void **) &addr, &addrlen);
    13691368                        if (res != EOK)
    13701369                                break;
     
    14031402
    14041403                case NET_SOCKET_CONNECT:
    1405                         res = async_data_write_accept((void **) &addr, false,
    1406                             0, 0, 0, &addrlen);
     1404                        res = data_receive((void **) &addr, &addrlen);
    14071405                        if (res != EOK)
    14081406                                break;
     
    14551453
    14561454                case NET_SOCKET_SENDTO:
    1457                         res = async_data_write_accept((void **) &addr, false,
    1458                             0, 0, 0, &addrlen);
     1455                        res = data_receive((void **) &addr, &addrlen);
    14591456                        if (res != EOK)
    14601457                                break;
  • uspace/srv/net/tl/tcp/tcp_module.c

    r557c7d0 r11658b64  
    7575                goto out;
    7676
    77         rc = ipc_connect_to_me(PHONE_NS, SERVICE_TCP, 0, 0, &phonehash);
     77        rc = REGISTER_ME(SERVICE_TCP, &phonehash);
    7878        if (rc != EOK)
    7979                goto out;
  • uspace/srv/net/tl/udp/udp.c

    r557c7d0 r11658b64  
    771771
    772772                case NET_SOCKET_BIND:
    773                         res = async_data_write_accept((void **) &addr, false,
    774                             0, 0, 0, &addrlen);
     773                        res = data_receive((void **) &addr, &addrlen);
    775774                        if (res != EOK)
    776775                                break;
     
    785784
    786785                case NET_SOCKET_SENDTO:
    787                         res = async_data_write_accept((void **) &addr, false,
    788                             0, 0, 0, &addrlen);
     786                        res = data_receive((void **) &addr, &addrlen);
    789787                        if (res != EOK)
    790788                                break;
  • uspace/srv/net/tl/udp/udp_module.c

    r557c7d0 r11658b64  
    7575                goto out;
    7676       
    77         rc = ipc_connect_to_me(PHONE_NS, SERVICE_UDP, 0, 0, &phonehash);
     77        rc = REGISTER_ME(SERVICE_UDP, &phonehash);
    7878        if (rc != EOK)
    7979                goto out;
Note: See TracChangeset for help on using the changeset viewer.