After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 763384 - [review] rebase NetworkManager's systemd code, update for lldp API changes, integrate sd-event [th/systemd-lldp-bgo763384]
[review] rebase NetworkManager's systemd code, update for lldp API changes, i...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks: 760998
 
 
Reported: 2016-03-09 17:21 UTC by Thomas Haller
Modified: 2016-03-11 08:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2016-03-09 17:21:15 UTC
Re-import newest systemd code.

As the LLDP API changed, adjust for that.

As the code also uses more sd-event functions (sd_event_source_set_enabled), it shows that the approach to reimplementing sd-event based on glib is wrong. Instead integrate sd-event into glib.
Comment 1 Dan Williams 2016-03-09 23:17:58 UTC
Looks OK to me.
Comment 2 Beniamino Galvani 2016-03-10 08:33:37 UTC
+                                       switch (subtype) {
+                                       case LLDP_OUI_802_1_SUBTYPE_PORT_VLAN_ID:
+#if 0
+                                               if (sd_lldp_packet_read_port_vlan_id (packets[i], &data16) == 0) {
+                                                       value = gvalue_new_uint (data16);
+                                                       g_hash_table_insert (neigh->tlvs, NM_LLDP_ATTR_IEEE_802_1_PVID, value);
+                                               }
+#endif

Isn't it possible to parse these fields with the new API?

Pushed 2 fixups.

The rest LGTM.
Comment 3 Thomas Haller 2016-03-10 10:06:43 UTC
(In reply to Beniamino Galvani from comment #2)
> +                                       switch (subtype) {
> +                                       case
> LLDP_OUI_802_1_SUBTYPE_PORT_VLAN_ID:
> +#if 0
> +                                               if
> (sd_lldp_packet_read_port_vlan_id (packets[i], &data16) == 0) {
> +                                                       value =
> gvalue_new_uint (data16);
> +                                                       g_hash_table_insert
> (neigh->tlvs, NM_LLDP_ATTR_IEEE_802_1_PVID, value);
> +                                               }
> +#endif
> 
> Isn't it possible to parse these fields with the new API?

Oh, completely forgot about those.

Yes, it's be possible... WIP