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

fix connmand version detection #218

Merged
merged 1 commit into from
Dec 2, 2020

Conversation

gch1p
Copy link
Contributor

@gch1p gch1p commented Dec 1, 2020

I'm running connmand 1.38 on Void Linux and I noticed that cmst doesn't have wireguard VPN edit options. Looking at the code I found out that wireguard options are only visible when f_connmanversion is higher that 1.37. So I added some printfs to the code, rebuilt the program and it turned out that f_connmanversion is -1.

This seems incorrect and results in f_connmanversion = -1.0:

qps.start("connmand -v", QStringList());

This works:

qps.start("connmand", {"-v"});

@andrew-bibb
Copy link
Owner

andrew-bibb commented Dec 1, 2020

Thank you for the PR. I want to look at this a bit further before I pull it. One thing I see right off the bat is that calling QProcess.start() without a QStringList argument is supposed to be depreciated. It still works (as far as I know) but won't forever. I am also pretty sure I was getting the connman version returned correctly when I added that section of code. I also want to make sure I indeed was am not misremembering that. All that being said this whole section is kind of a hack because ConnMan doesn't seem to have a dbus call to return a version number, so I had to use the QProcess to grab the version number.
.
Never mind, I see your code does have the argument as a stringlist. Probably why it works - duhh!

@andrew-bibb
Copy link
Owner

Thanks again. Really need to not answer issues and PR's immediately after a full day of work. Thinking a little first works so much better, or at least shifting gears out of work mode.

A-

@andrew-bibb andrew-bibb closed this Dec 1, 2020
@andrew-bibb andrew-bibb reopened this Dec 2, 2020
@andrew-bibb andrew-bibb merged commit 73ed5be into andrew-bibb:master Dec 2, 2020
@gch1p
Copy link
Contributor Author

gch1p commented Dec 2, 2020

Thank you :)

@gch1p gch1p deleted the fix-version-detection branch December 2, 2020 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants