-
Notifications
You must be signed in to change notification settings - Fork 7
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
added internet access detection before version checking is performed #199
Conversation
pulling latest master
|
Successful ping outputslinux
macOS ventura M1
macOS big sur (intel)
macOS mojave (intel)
macOS monterey (intel)
Windows
|
Failed ping outputsLinux (WiFi OFF)
macOS Ventura (Apple silicon) (WiFi OFF)
macOS mojave (intel) (WiFi OFF)
Windows (WiFi OFF)
Summary
|
This comment was marked as outdated.
This comment was marked as outdated.
Tested with
|
Testing Matrix
|
ofLogError("An exception occured while checking latest version of EmotiBit software"); | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function has been moved to its own file in ofxEmotiBit/src
.
Idea being, we can re-use it in other softwares (parser)
void SoftwareVersionChecker::checkLatestVersion() | ||
{ | ||
bool isNetworkAvailable = false; | ||
// -n specifies number of tries. we are going to try to detect internet connection by sending 1 packet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reviewer:
This section is just ported over from ofApp.
See SoftwareVersionChecker::testPingResponse(std::string pingResponse)
for new code
src/SoftwareVersionChecker.cpp
Outdated
*/ | ||
bool isNetworkAvailable = false; | ||
|
||
if (pingResponse.find("time") != std::string::npos && (pingResponse.find("TTL") != std::string::npos || pingResponse.find("ttl") != std::string::npos)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Core algorithm for detecting internet connection.
Review 02@nitin710 review complete
|
I could not find and dev comments explaining the reasoning. I think it was an attempt at "stricter check", but that is clearly not the case. |
This PR is already merged into dev. |
Description
Requirements
Issues Referenced
Documentation update
None
Notes for Reviewer
Algorithm
TTL
/ttl
in the ping response since only successful responses have those keywordsTesting
Results
#199 (comment)
Unit Tests
Unit tests performed (from
EmotiBit Feature Test Protocols
)The corresponding results are recorded in the
EmotiBit Software Testing Records
sheet.Steps to test
Shared files
Checklist to allow merge
master
ofxEmotiBitVersion.h
Screenshots: