Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

Don't leak asio headers from libremote-processor #353

Merged
merged 7 commits into from
Feb 25, 2016

Conversation

dawagner
Copy link
Contributor

Make network dependency optional

  • Add cmake option NETWORKING to stub ASIO
  • If networking is requested (tunning allowed), the PF will fail to start

Internal: Don't leak asio headers from libremote-processor.

@@            master   #353   diff @@
=====================================
Files          210    211     +1
Stmts         7179   7184     +5
Branches         0      0
Methods          0      0
=====================================
+ Hit           5767   5769     +2
Partial          0      0
- Missed        1412   1415     +3

Review entire Coverage Diff as of 148c4da

Powered by Codecov. Updated on successful CI builds.

   

* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <asio.hpp>
#include <utility>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not needed

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

@dawagner
Copy link
Contributor Author

TODO: fix copyright dates.

@codecov-io
Copy link

Current coverage is 80.30%

Merging #353 into master will decrease coverage by -0.03% as of 148c4da

@@            master   #353   diff @@
=====================================
  Files          210    211     +1
  Stmts         7179   7184     +5
  Branches         0      0       
  Methods          0      0       
=====================================
+ Hit           5767   5769     +2
  Partial          0      0       
- Missed        1412   1415     +3

Review entire Coverage Diff as of 148c4da

Powered by Codecov. Updated on successful CI builds.

@dawagner dawagner force-pushed the dont-leak-asio-headers branch 2 times, most recently from c3e2a07 to 40f8d75 Compare February 16, 2016 12:54
@tcahuzax
Copy link
Contributor

👍

@dawagner dawagner force-pushed the dont-leak-asio-headers branch 2 times, most recently from 472927e to 256977a Compare February 16, 2016 14:46
bool read(const dummy_base &, const dummy_base &, const dummy_base &)
{
return true;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

why not in hpp ?

Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Wrap some classes and forward-declare some others in other not to expose
any asio object in the public interfaces. This means that client (such as
libparameter) will now be completely unaware of asio.

Signed-off-by: David Wagner <[email protected]>
@dawagner dawagner changed the title WIP: don't leak asio headers from libremote-processor Don't leak asio headers from libremote-processor Feb 16, 2016
We need CMake 3.x in order to have "interface" libraries (libs with no build
instructions but useful for usage requirement forwarding of header-only
libraries).

Signed-off-by: David Wagner <[email protected]>
@tcahuzax
Copy link
Contributor

:shipit:

Introduce an asio stub.

In such a case, libremote-processor becomes useless but still acts as if it was
working correctly. This is an easy way to have a version of libparameter that
does not embed any networking code, which is required in some case for security
compliance reasons.

This can be achieved by turning the NETWORKING option OFF when configuring the
CMake project.

Signed-off-by: David Wagner <[email protected]>
Compile-out test-platform and remote-process when NETWORKING==OFF. Also, have
the Parameter Framework fail to start if the user requested the remote
interface to be started but compiled networking support out at the same time.

Signed-off-by: David Wagner <[email protected]>
Explain how optional dependencies can be avoided.

Signed-off-by: David Wagner <[email protected]>
@dawagner dawagner force-pushed the dont-leak-asio-headers branch 3 times, most recently from 7e17e6c to 7c0b65b Compare February 23, 2016 14:03
@krocard
Copy link
Contributor

krocard commented Feb 25, 2016

:shipit:

krocard added a commit that referenced this pull request Feb 25, 2016
Make network dependency optional

 - Add cmake option NETWORKING to stub ASIO
 - If networking is requested (tunning allowed), the PF will fail to start
 - Require cmake 3.0.0 for asio stub INTERFACE lib.
 - If networking is off, remove the asio dependency.

Internal: Don't leak asio headers from libremote-processor.
@krocard krocard merged commit ecceecb into intel:master Feb 25, 2016
@dawagner dawagner deleted the dont-leak-asio-headers branch February 26, 2016 10:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants