Skip to content
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

Rework of ofp_print_mac() interface #71

Open
semihalf-berestovskyy-andriy opened this issue Jan 24, 2017 · 0 comments
Open

Rework of ofp_print_mac() interface #71

semihalf-berestovskyy-andriy opened this issue Jan 24, 2017 · 0 comments

Comments

@semihalf-berestovskyy-andriy
Copy link
Contributor

semihalf-berestovskyy-andriy commented Jan 24, 2017

Note: the issue was created automatically with bugzilla2github tool

Bugzilla Bug ID: 71

Date: 2015-11-13 12:07:07 +0100
From: Sorin Vultureanu <sorin.vultureanu@enea.com>
To: Sorin Vultureanu <sorin.vultureanu@enea.com>

Last updated: 2015-11-13 12:07:07 +0100

Bugzilla Comment ID: 99

Date: 2015-11-13 12:07:07 +0100
From: Sorin Vultureanu <sorin.vultureanu@enea.com>

Functionality issue:
This function can be called from two threads and provide ok results. If you call it and use it from 3 threads in the same time then it would provide bad results.

ofp_print_mac() interface is kinda unusual:
A normal usage would be:

char print_mac[24];
printf ("mac:%s\n", ofp_print_mac(mac, print_mac));

New interface proposal would be:
char ofp_print_mac(uint8_t mac, char* printed_mac);

If printed_mac is NULL then the functionality is as now.
If printed_mac is valid then use this address to store mac and also return it as return value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant