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

Router split #372

Merged
12 commits merged into from Sep 26, 2018
Merged

Router split #372

12 commits merged into from Sep 26, 2018

Conversation

nmathewson
Copy link
Contributor

No description provided.

This is also used by onion services, so it needs to go in another
module.
This is preparation for having a routermode.h as well
Note that I haven't separated the headers yet (there's still an
(It turns out that some of the functions in router.h didn't even
exist any more, so I just got to delete their declarations completely.)
Since this is completely core functionality, I'm putting it in
core/mainloop, even though it depends on feature/hibernate. We'll
have to sort that out in the future.
Make them only include the headers that they needed, and sort their
headers while we're at it.
@coveralls
Copy link

Coverage Status

Coverage increased (+0.008%) to 61.937% when pulling 3a64307 on nmathewson:router_split into c82163d on torproject:master.

#include "app/config/config.h"
#include "feature/hibernate/hibernate.h"

/** Return true iff our network is in some sense disabled or shutting down:
Copy link
Contributor

Choose a reason for hiding this comment

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

if

Copy link
Contributor Author

Choose a reason for hiding this comment

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

"iff" is intentional: It's an abbreviation for "if and only if". See https://en.wikipedia.org/wiki/If_and_only_if

return get_options()->DisableNetwork || we_are_hibernating();
}

/** Return true iff our network is in some sense "completely disabled" either
Copy link
Contributor

Choose a reason for hiding this comment

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

if

#include "core/or/or.h"
#include "core/mainloop/netstatus.h"
#include "app/config/config.h"
#include "feature/hibernate/hibernate.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should either make a ticket or a big XXX: in the code at least so we kind of remember that relationship and that we should fix that.

Great part with a ticket, anyone could pick it up :D

@ghost ghost merged commit 3a64307 into torproject:master Sep 26, 2018
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants