-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New network_connections() function #2495
Conversation
Can one of the admins verify this patch? |
e77e9df
to
1dcfd34
Compare
Rebased on top of #2245 again. |
c915c71
to
316cd6b
Compare
Rebased on top of #2245 again. Also broke up the old format of |
316cd6b
to
f3c122f
Compare
I remembered that this implements https://dev.cfengine.com/issues/4520 so I've mentioned it in the ticket. |
f3c122f
to
8b851af
Compare
This PR has been rebased after the merge of #2245 and is ready for review. |
} | ||
|
||
BufferDestroy(buf); | ||
JsonObjectRemoveKey(element, raw_key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could raw_key
and new_key
theoretically be the same? If so I assume that JsonObjectAppendElement
would in fact not append the element, but overwrite it, with it being a map and all (I haven't actually verified this though). Then you should not remove the element afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, nice catch!
368a9d1
to
e80f77c
Compare
This is fixed, rebased, and ready. The only question I had is if we should put the network connections info under Leaving them as simple top-level keys (the current situation) makes them easier to use with |
I think it's a good idea what you say about putting |
|
Changelog: Title.
e80f77c
to
299b03f
Compare
@kacf I added |
Documentation is in cfengine/documentation#1443 |
Ok, either is fine with me. |
trigger build |
I'll try to look at this, but after #2319. |
Sorry, I forgot to add the |
Ah ok, rerunning. |
trigger build |
Alright, together with https://github.com/cfengine/enterprise/pull/307, this is green. |
* networking_connections: Add network_connections() function that parses /proc/net
Squashed and merged manually. Thanks! |
Woohoo! Epic! |
Split off from #2245, requires it before this is merged since it incorporates it.
network_connections()
functionunix_iface.c
soevalfunction.c
can use themImplements https://dev.cfengine.com/issues/4520