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

dnsdist: add inClientStartup() function #6072

Merged
merged 2 commits into from Dec 11, 2017

Conversation

Projects
None yet
3 participants
@Habbie
Member

Habbie commented Dec 8, 2017

Short description

This allows the user to, for example, print certain things during daemon startup but not while connecting a client.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled and tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

@Habbie Habbie added this to the dnsdist-1.3.0 milestone Dec 8, 2017

@@ -118,6 +118,10 @@ Control Socket, Console and Webserver
:param str address: An IP address with optional port. By default, the port is 5199.
.. function:: inClientStartup()
Returns true while the console client is parsing the configuration.

This comment has been minimized.

@rgacogne

rgacogne Dec 8, 2017

Member

Doesn't it return true also after the client is done parsing the configuration? I think we have something like g_configurationDone to indicate whether we are done parsing the configuration.

This comment has been minimized.

@Habbie

Habbie Dec 8, 2017

Member

It returns false in the client console. I couldn't imagine a situation in which somebody could call this in the client state after the > prompt was shown so I did not think about it.

This comment has been minimized.

@rgacogne

rgacogne Dec 8, 2017

Member

You're right, after the client is done parsing the configuration all commands are passed to the server over the console, so my comment made no sense!

This comment has been minimized.

@Habbie

Habbie Dec 8, 2017

Member

pushed something for this

@Habbie

This comment has been minimized.

Member

Habbie commented Dec 11, 2017

@zeha did you want any change in the logic here?

@zeha

This comment has been minimized.

Collaborator

zeha commented Dec 11, 2017

@Habbie I couldn't find a variant that was strictly better, so no.

@Habbie Habbie merged commit 4a5fe47 into PowerDNS:master Dec 11, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@Habbie Habbie deleted the Habbie:dnsdist-inclientstartup branch Dec 11, 2017

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