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

Getting confused with syntax and versions #31

Closed
n0valis opened this issue Nov 17, 2021 · 6 comments
Closed

Getting confused with syntax and versions #31

n0valis opened this issue Nov 17, 2021 · 6 comments
Assignees
Labels

Comments

@n0valis
Copy link

n0valis commented Nov 17, 2021

I have downloaded the 1.0.6 snapshot version here a couple of weeks ago.
But now I don't understand this:
sol.json:

{
  "Listeners" : ["UDP:9", "UDP:7", "HTTP:8009" ],
  "LogLevel" : "INFO",
  "AvoidDualUDPSending" : {
	  "Active": false,
	  "Delay": "100ms"
  }
  "Commands" : [ 
    {
        "Operation" : "hibernate",
        "Command" : "nircmd hibernate",
        "Default" : "true"
    },
    {
        "Operation" : "sleep",
        "Command" : "nircmd sleep",
        "Default" : "false"
    },
    {
        "Operation" : "reboot",
        "Command" : "nircmd exitwin reboot",
        "Default" : "false"
    }]
}

works fine with what presumably is the 1.0.6 Version (11MB filesize, date Oct 17)
If I use it on 1.0.5 only the sleep command would be functional. For the rest I get "not found" errors.

Any explanation for that?
I can't find any syntax issues.

I have to add: If I leave

"AvoidDualUDPSending" : {
	  "Active": false,
	  "Delay": "100ms"
  }

out, it works with 1.0.5
But this section is part of the 1.0.5 sol.json

@SR-G
Copy link
Owner

SR-G commented Nov 18, 2021

Hello,
Have no idea (and was not aware) why exactly the 1.0.6 was not available anymore (indeed when being not logged, i was also not seeing it). I removed the "pre-release" flags and now it should again be visible ... (but older versions also have that flag ...).
https://github.com/SR-G/sleep-on-lan/releases/tag/1.0.6-SNAPSHOT

I have no idea right now why there would be a difference about the "commands" definition inside the configuration (at first glance, it looks fine with your example). I would suggest to use 1.0.6 (available again).

@n0valis
Copy link
Author

n0valis commented Nov 18, 2021

Yes I changed my post after I discovered it. 1.0.6 Was not visible but after I logged in and went to releases I found it.
Nevertheless AvoidDualUDPSending seems to be the issue. It doesn't work with 1.0.5 but is present inside the sol.json shipped with 1.0.5
The commands don't work all I should say if AvoidDualUDPSending is present

@SR-G
Copy link
Owner

SR-G commented Nov 18, 2021

Correct, this is a new field only in 1.0.6 (i thought the problem was with commands).
I'll give a look about behavior in case of configuration errors, just in case i can make that more understandable.

@n0valis
Copy link
Author

n0valis commented Nov 18, 2021

Well it is both then, if AvoidDualUDPSending is used with 1.0.5 (which the sol.json suggests) then the commands don't work properly. In fact only the sleep command is functional.

@SR-G
Copy link
Owner

SR-G commented Nov 18, 2021

Yes, i fully understand now : because of the extra (unknown) configuration field while running 1.0.5, the loading configuration was failing - after that, the program was still pursuing its execution, but with default values (sleep command is configured as a default one). Hence the behavior you spotted.

I'll get it corrected (by stopping the program in case of any configuration errors, it's way safer / nicer this way).

@SR-G
Copy link
Owner

SR-G commented Nov 18, 2021

Closing as this is now corrected through #32 + 1.0.7-SNAPSHOT

@SR-G SR-G closed this as completed Nov 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants