~ubuntu-branches/debian/sid/network-manager/sid

« back to all changes in this revision

Viewing changes to system-settings/plugins/ifupdown/interface_parser.c

  • Committer: Bazaar Package Importer
  • Author(s): Michael Biebl
  • Date: 2011-03-06 20:59:46 UTC
  • Revision ID: james.westby@ubuntu.com-20110306205946-fpdcb3ordico3ylg
Tags: 0.8.2-6
* debian/patches/83-dnsmasq-send-no-config-file-instead-of-a-bogus-one.patch
  - Newer versions of dnsmasq validate the option parameters more strictly.
    Instead of passing a bogus file name simply use --conf-file without
    additional parameters. (Closes: #615082)
* debian/control
  - Remove old Conflicts/Replaces which were required for upgrades to
    squeeze.
  - Bump Breaks against network-manager-gnome to (<< 0.8.2) to avoid
    partial upgrades which can lead to problems with user settings for
    ethernet connections. (Closes: #612291)
* debian/ifblacklist_migrate.sh
  - Only comment out iface lines if we have an exact match for the network
    interface. (Closes: #612247)
* debian/patches/51-normalized-keys.patch
  - Normalize keys in ifupdown parser, so we accept options with either
    hyphens or underscores, like e.g. bridge_ports and bridge-ports.
    (Closes: #609831)

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
void add_data(const char *key,const char *data)
52
52
{
53
53
        if_data *ret;
 
54
        char *idx;
54
55
 
55
56
        // Check if there is a block where we can attach our data
56
57
        if (first == NULL)
58
59
 
59
60
        ret = (if_data*) calloc(1,sizeof(struct _if_data));
60
61
        ret->key = g_strdup(key);
 
62
        // Normalize keys. Convert '_' to '-', as ifupdown accepts both variants.
 
63
        // When querying keys via ifparser_getkey(), use '-'.
 
64
        while ((idx = strrchr(ret->key, '_'))) {
 
65
                *idx = '-';
 
66
        }
61
67
        ret->data = g_strdup(data);
62
68
 
63
69
        if (last->info == NULL)