We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 69b163a commit 87ac574Copy full SHA for 87ac574
portsyncd/portsyncd.cpp
@@ -154,12 +154,21 @@ void handlePortConfigFile(ProducerTable &p, string file)
154
}
155
156
istringstream iss(line);
157
- string alias, lanes;
158
- iss >> alias >> lanes;
+ string name, lanes, alias;
+ iss >> name >> lanes >> alias;
159
160
+ /* If port has no alias, then use its' name as alias */
161
+ if (alias == "") {
162
+ alias = name;
163
+ }
164
FieldValueTuple lanes_attr("lanes", lanes);
- vector<FieldValueTuple> attrs = { lanes_attr };
- p.set(alias, attrs);
165
+ FieldValueTuple alias_attr("alias", alias);
166
+
167
+ vector<FieldValueTuple> attrs;
168
+ attrs.push_back(lanes_attr);
169
+ attrs.push_back(alias_attr);
170
171
+ p.set(name, attrs);
172
173
g_portSet.insert(alias);
174
0 commit comments