Fixed issue where web server would send data to the analysis routines even if data source is not set to Garmin, causing conflicts with the selected data source.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="uk.org.openseizuredetector"
|
||||
android:versionCode="92"
|
||||
android:versionName="4.0.0i">
|
||||
android:versionName="4.0.0j">
|
||||
<!-- android:allowBackup="false" -->
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
|
||||
|
||||
@@ -104,13 +104,18 @@ public class SdWebServer extends NanoHTTPD {
|
||||
Log.v(TAG, " files=" + files.toString());
|
||||
String postData = files.get("postData");
|
||||
Log.v(TAG, " postData=" + postData);
|
||||
// Send the data to the SdDataSource so the app can pick it up.
|
||||
if (parameters.get("dataObj") != null) {
|
||||
Log.v(TAG,"passing parameters to data source");
|
||||
answer = mSdServer.mSdDataSource.updateFromJSON(parameters.get("dataObj").toString());
|
||||
if (mSdServer.mSdDataSourceName.equals("Garmin")) {
|
||||
// Send the data to the SdDataSource so the app can pick it up.
|
||||
if (parameters.get("dataObj") != null) {
|
||||
Log.v(TAG, "passing parameters to data source");
|
||||
answer = mSdServer.mSdDataSource.updateFromJSON(parameters.get("dataObj").toString());
|
||||
} else {
|
||||
Log.v(TAG, "Passing postData to data source");
|
||||
answer = mSdServer.mSdDataSource.updateFromJSON(files.get("postData"));
|
||||
}
|
||||
} else {
|
||||
Log.v(TAG,"Passing postData to data source");
|
||||
answer = mSdServer.mSdDataSource.updateFromJSON(files.get("postData"));
|
||||
Log.i(TAG,"Web server received data, but datasource is not set to 'Garmin' - Ignoring");
|
||||
mUtil.showToast("Web server received data, but datasource is not set to 'Garmin' - Ignoring");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user