Skip to content

list interfaces/adding just "binary" state status. #3766

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

Closed
wants to merge 1 commit into from

Conversation

devnexen
Copy link
Member

No description provided.

@petk petk added the Quickfix label Jan 30, 2019
@nikic
Copy link
Member

nikic commented Feb 12, 2019

@sgolemon As you added this function, any comments?

status = zend_hash_str_find(Z_ARR_P(iface), "up", sizeof("up") - 1);
if (!status) {
add_assoc_bool_ex(iface, "up", sizeof("up") - 1, ((p->ifa_flags & IFF_UP) != 0));
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just doing the add_assoc_bool_ex without the lookup beforehand should be fine here. Can also use add_assoc_bool and save the sizeof("up") - 1 argument.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was not sure about the "importance" of this new entry so I put in the end :-)

@devnexen devnexen force-pushed the network_interface_status branch from e0f0c60 to 808a6e5 Compare February 12, 2019 20:39
@devnexen
Copy link
Member Author

devnexen commented May 8, 2019

Probably won t have any feedback as it is a tiny addition :-)

@petk
Copy link
Member

petk commented May 11, 2019

Applied via 1f3f54f to PHP-7.4+. Thank you @devnexen

@petk petk closed this May 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants