Changeset b910455 in mainline for uspace/srv/net/net/net.c


Ignore:
Timestamp:
2011-04-07T09:46:11Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6639ae1
Parents:
f6bffee (diff), 8e80d3f (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

    rf6bffee rb910455  
    289289        if (rc != EOK)
    290290                return rc;
     291       
    291292        rc = add_module(NULL, &net_globals.modules, (uint8_t *) NE2000_NAME,
    292293            (uint8_t *) NE2000_FILENAME, SERVICE_NE2000, 0, connect_to_service);
    293294        if (rc != EOK)
    294295                return rc;
     296       
    295297        rc = add_module(NULL, &net_globals.modules, (uint8_t *) ETHERNET_NAME,
    296298            (uint8_t *) ETHERNET_FILENAME, SERVICE_ETHERNET, 0, connect_to_service);
    297299        if (rc != EOK)
    298300                return rc;
     301       
    299302        rc = add_module(NULL, &net_globals.modules, (uint8_t *) NILDUMMY_NAME,
    300303            (uint8_t *) NILDUMMY_FILENAME, SERVICE_NILDUMMY, 0, connect_to_service);
     
    552555                rc = read_netif_configuration(conf_files[i], netif);
    553556                if (rc != EOK) {
    554                         measured_strings_destroy(&netif->configuration);
     557                        measured_strings_destroy(&netif->configuration, free);
    555558                        free(netif);
    556559                        return rc;
     
    562565                if (!setting) {
    563566                        fprintf(stderr, "%s: Network interface name is missing\n", NAME);
    564                         measured_strings_destroy(&netif->configuration);
     567                        measured_strings_destroy(&netif->configuration, free);
    565568                        free(netif);
    566569                        return EINVAL;
     
    571574                int index = netifs_add(&net_globals.netifs, netif->id, netif);
    572575                if (index < 0) {
    573                         measured_strings_destroy(&netif->configuration);
     576                        measured_strings_destroy(&netif->configuration, free);
    574577                        free(netif);
    575578                        return index;
     
    583586                    index);
    584587                if (rc != EOK) {
    585                         measured_strings_destroy(&netif->configuration);
    586                         netifs_exclude_index(&net_globals.netifs, index);
     588                        measured_strings_destroy(&netif->configuration, free);
     589                        netifs_exclude_index(&net_globals.netifs, index, free);
    587590                        return rc;
    588591                }
     
    590593                rc = start_device(netif);
    591594                if (rc != EOK) {
    592                         printf("%s: Error starting interface %s (%s)\n", NAME,
     595                        printf("%s: Ignoring failed interface %s (%s)\n", NAME,
    593596                            netif->name, str_error(rc));
    594                         measured_strings_destroy(&netif->configuration);
    595                         netifs_exclude_index(&net_globals.netifs, index);
    596                        
    597                         return rc;
     597                        measured_strings_destroy(&netif->configuration, free);
     598                        netifs_exclude_index(&net_globals.netifs, index, free);
     599                        continue;
    598600                }
    599601               
Note: See TracChangeset for help on using the changeset viewer.