Changeset 8b655705 in mainline for uspace/srv/net/net/net.c


Ignore:
Timestamp:
2011-04-15T19:38:07Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9dd730d1
Parents:
6b9e85b (diff), b2fb47f (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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    r6b9e85b r8b655705  
    4747#include <str_error.h>
    4848
    49 #include <ipc/ipc.h>
    5049#include <ipc/services.h>
    5150#include <ipc/net.h>
     
    290289        if (rc != EOK)
    291290                return rc;
     291       
    292292        rc = add_module(NULL, &net_globals.modules, (uint8_t *) NE2000_NAME,
    293293            (uint8_t *) NE2000_FILENAME, SERVICE_NE2000, 0, connect_to_service);
    294294        if (rc != EOK)
    295295                return rc;
     296       
    296297        rc = add_module(NULL, &net_globals.modules, (uint8_t *) ETHERNET_NAME,
    297298            (uint8_t *) ETHERNET_FILENAME, SERVICE_ETHERNET, 0, connect_to_service);
    298299        if (rc != EOK)
    299300                return rc;
     301       
    300302        rc = add_module(NULL, &net_globals.modules, (uint8_t *) NILDUMMY_NAME,
    301303            (uint8_t *) NILDUMMY_FILENAME, SERVICE_NILDUMMY, 0, connect_to_service);
     
    326328static int net_module_start(async_client_conn_t client_connection)
    327329{
    328         sysarg_t phonehash;
    329330        int rc;
    330331       
     
    338339                goto out;
    339340       
    340         rc = ipc_connect_to_me(PHONE_NS, SERVICE_NETWORKING, 0, 0, &phonehash);
     341        rc = async_connect_to_me(PHONE_NS, SERVICE_NETWORKING, 0, 0, NULL);
    341342        if (rc != EOK)
    342343                goto out;
     
    554555                rc = read_netif_configuration(conf_files[i], netif);
    555556                if (rc != EOK) {
    556                         measured_strings_destroy(&netif->configuration);
     557                        measured_strings_destroy(&netif->configuration, free);
    557558                        free(netif);
    558559                        return rc;
     
    564565                if (!setting) {
    565566                        fprintf(stderr, "%s: Network interface name is missing\n", NAME);
    566                         measured_strings_destroy(&netif->configuration);
     567                        measured_strings_destroy(&netif->configuration, free);
    567568                        free(netif);
    568569                        return EINVAL;
     
    573574                int index = netifs_add(&net_globals.netifs, netif->id, netif);
    574575                if (index < 0) {
    575                         measured_strings_destroy(&netif->configuration);
     576                        measured_strings_destroy(&netif->configuration, free);
    576577                        free(netif);
    577578                        return index;
     
    585586                    index);
    586587                if (rc != EOK) {
    587                         measured_strings_destroy(&netif->configuration);
    588                         netifs_exclude_index(&net_globals.netifs, index);
     588                        measured_strings_destroy(&netif->configuration, free);
     589                        netifs_exclude_index(&net_globals.netifs, index, free);
    589590                        return rc;
    590591                }
     
    592593                rc = start_device(netif);
    593594                if (rc != EOK) {
    594                         printf("%s: Error starting interface %s (%s)\n", NAME,
     595                        printf("%s: Ignoring failed interface %s (%s)\n", NAME,
    595596                            netif->name, str_error(rc));
    596                         measured_strings_destroy(&netif->configuration);
    597                         netifs_exclude_index(&net_globals.netifs, index);
    598                        
    599                         return rc;
     597                        measured_strings_destroy(&netif->configuration, free);
     598                        netifs_exclude_index(&net_globals.netifs, index, free);
     599                        continue;
    600600                }
    601601               
     
    687687         *  - Answer the first IPC_M_CONNECT_ME_TO call.
    688688         */
    689         ipc_answer_0(iid, EOK);
     689        async_answer_0(iid, EOK);
    690690       
    691691        while (true) {
Note: See TracChangeset for help on using the changeset viewer.