summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorp.karthik <p.karthik@samsung.com>2013-04-19 16:29:16 +0530
committerp.karthik <p.karthik@samsung.com>2013-04-19 17:58:01 +0530
commite6db0501f88df563fefb8407726cf0204d349899 (patch)
tree2113005200ea4490b203e0db4eecca5b59e408d7
parent83e2422455f4907611399ce37271a4a26c277410 (diff)
downloadlocations-e6db0501f88df563fefb8407726cf0204d349899.tar.gz
locations-e6db0501f88df563fefb8407726cf0204d349899.tar.bz2
locations-e6db0501f88df563fefb8407726cf0204d349899.zip
osp-locations changed to replace log macros with secure log macros to avoid privacy information in the log
Change-Id: I7ddb62937348b7d4129f2f7229fb2ea83de0a9e6 Signed-off-by: p.karthik <p.karthik@samsung.com>
-rw-r--r--src/FLocCoordinates.cpp9
-rw-r--r--src/FLoc_LocationImpl.cpp2
-rw-r--r--src/FLoc_LocationManager.cpp4
-rw-r--r--src/FLoc_LocationProviderImpl.cpp6
-rw-r--r--src/FLoc_MathUtils.cpp2
5 files changed, 12 insertions, 11 deletions
diff --git a/src/FLocCoordinates.cpp b/src/FLocCoordinates.cpp
index 226725a..5ec1284 100644
--- a/src/FLocCoordinates.cpp
+++ b/src/FLocCoordinates.cpp
@@ -128,9 +128,10 @@ Coordinates::GetHashCode(void) const
result
Coordinates::Set(double latitude, double longitude, double altitude)
{
- SysTryReturn(NID_LOC, (MIN_LATITUDE <= latitude) && (latitude <= MAX_LATITUDE),
+ SysSecureTryReturn(NID_LOC, (MIN_LATITUDE <= latitude) && (latitude <= MAX_LATITUDE),
E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The latitude(%lf) must be in the range [-90.0, 90.0].", latitude);
- SysTryReturn(NID_LOC, (MIN_LONGITUDE <= longitude) && (longitude <= MAX_LONGITUDE),
+
+ SysSecureTryReturn(NID_LOC, (MIN_LONGITUDE <= longitude) && (longitude <= MAX_LONGITUDE),
E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The longitude(%lf) must be in the range [-180.0, 180.0].", longitude);
__latitude = latitude;
@@ -142,7 +143,7 @@ Coordinates::Set(double latitude, double longitude, double altitude)
result
Coordinates::SetLatitude(double latitude)
{
- SysTryReturn(NID_LOC, (MIN_LATITUDE <= latitude) && (latitude <= MAX_LATITUDE),
+ SysSecureTryReturn(NID_LOC, (MIN_LATITUDE <= latitude) && (latitude <= MAX_LATITUDE),
E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The latitude(%lf) must be in the range [-90.0, 90.0].", latitude);
__latitude = latitude;
return E_SUCCESS;
@@ -151,7 +152,7 @@ Coordinates::SetLatitude(double latitude)
result
Coordinates::SetLongitude(double longitude)
{
- SysTryReturn(NID_LOC, (MIN_LONGITUDE <= longitude) && (longitude <= MAX_LONGITUDE),
+ SysSecureTryReturn(NID_LOC, (MIN_LONGITUDE <= longitude) && (longitude <= MAX_LONGITUDE),
E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The longitude(%lf) must be in the range [-180.0, 180.0].", longitude);
__longitude = longitude;
return E_SUCCESS;
diff --git a/src/FLoc_LocationImpl.cpp b/src/FLoc_LocationImpl.cpp
index c26cede..4fd8014 100644
--- a/src/FLoc_LocationImpl.cpp
+++ b/src/FLoc_LocationImpl.cpp
@@ -99,7 +99,7 @@ _LocationImpl::GetTimestamp(void) const
dateTime.SetValue(1970, 1, 1);
dateTime.Add(timespan);
- SysLog(NID_LOC, "The location timeStamp is (%ls)", dateTime.ToString().GetPointer());
+ SysSecureLog(NID_LOC, "The location timeStamp is (%ls)", dateTime.ToString().GetPointer());
return dateTime;
}
diff --git a/src/FLoc_LocationManager.cpp b/src/FLoc_LocationManager.cpp
index e6dd98b..686aa4d 100644
--- a/src/FLoc_LocationManager.cpp
+++ b/src/FLoc_LocationManager.cpp
@@ -580,7 +580,7 @@ NOTIFY:
result
_LocationManager::SetLocationInformation(double latitude, double longitude, double altitude, time_t timestamp, location_method_e locMethod, Location* pLocation)
{
- SysLog(NID_LOC, "Location Information is: Latitude (%lf), Longitude (%lf), Altitude (%lf), TimeStamp (%ld), Location method (%d)", latitude, longitude, altitude, timestamp, locMethod);
+ SysSecureLog(NID_LOC, "Location Information is: Latitude (%lf), Longitude (%lf), Altitude (%lf), TimeStamp (%ld), Location method (%d)", latitude, longitude, altitude, timestamp, locMethod);
int res = -1;
LocationAccuracy requiredAcc;
@@ -769,7 +769,7 @@ _LocationManager::GetLastKnownLocation(location_method_e nativeLocMethod)
int res = location_manager_get_last_position(nativeHandle, &altitude, &latitude, &longitude, &timestampPosition);
SysTryCatch(NID_LOC, res == 0, , E_SYSTEM, "[E_SYSTEM] Failed to fetch last position from nativeHandle(%x).", nativeHandle);
- SysLog(NID_LOC, "Last position(latitude: %lf, longitude: %lf, altitude: %lf, timestamp: %ld",
+ SysSecureLog(NID_LOC, "Last position(latitude: %lf, longitude: %lf, altitude: %lf, timestamp: %ld",
latitude, longitude, altitude, timestampPosition);
Coordinates coord;
diff --git a/src/FLoc_LocationProviderImpl.cpp b/src/FLoc_LocationProviderImpl.cpp
index c365863..2bf3725 100644
--- a/src/FLoc_LocationProviderImpl.cpp
+++ b/src/FLoc_LocationProviderImpl.cpp
@@ -225,7 +225,7 @@ _LocationProviderImpl::AddMonitoringRegion(const Coordinates& regionCenter, doub
SysTryReturn(NID_LOC, radius >= 50.0 && radius <= 100000.00, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The radius is not within the specified limits.");
SysTryReturn(NID_LOC, (!Double::IsNaN(radius) && !Double::IsNaN(regionCenter.GetLatitude()) && !Double::IsNaN(regionCenter.GetLongitude())),
E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] One of the value is NaN.");
- SysLog(NID_LOC, "Requested to add the monitoring region with center (Latitude: %lf, Longitude %lf) and radius (%lf).", regionCenter.GetLatitude(), regionCenter.GetLongitude(), radius);
+ SysSecureLog(NID_LOC, "Requested to add the monitoring region with center (Latitude: %lf, Longitude %lf) and radius (%lf).", regionCenter.GetLatitude(), regionCenter.GetLongitude(), radius);
static int nextRegionId = 0;
@@ -810,9 +810,9 @@ _LocationProviderImpl::GetRegionCurrentState(const _RegionInfo& region, const Lo
{
TryReturn(location.GetHorizontalAccuracy() >= 0.0, REGION_STATE_UNKNOWN, "Location received with invalid accuracy");
- SysLog(NID_LOC, "[RegionID %d] Region Information is (Center latitude: %lf, Center longitude: %lf, Region radius:%lf", region.GetRegionId(), region.GetCoordinate().GetLatitude(),
+ SysSecureLog(NID_LOC, "[RegionID %d] Region Information is (Center latitude: %lf, Center longitude: %lf, Region radius:%lf", region.GetRegionId(), region.GetCoordinate().GetLatitude(),
region.GetCoordinate().GetLongitude(), region.GetRadius());
- SysLog(NID_LOC, "[RegionID %d] Location Information is (Latitude: %lf, Longitude: %lf, Horizontal accuracy:%lf", region.GetRegionId(), location.GetCoordinates().GetLatitude(),
+ SysSecureLog(NID_LOC, "[RegionID %d] Location Information is (Latitude: %lf, Longitude: %lf, Horizontal accuracy:%lf", region.GetRegionId(), location.GetCoordinates().GetLatitude(),
location.GetCoordinates().GetLongitude(), location.GetHorizontalAccuracy());
_RegionState regionState = REGION_STATE_UNKNOWN;
diff --git a/src/FLoc_MathUtils.cpp b/src/FLoc_MathUtils.cpp
index edee539..f7f1c54 100644
--- a/src/FLoc_MathUtils.cpp
+++ b/src/FLoc_MathUtils.cpp
@@ -90,7 +90,7 @@ _MathUtils::GetShortestDistance(const Location& location, const Tizen::Base::Col
}
}
- SysLog(NID_LOC, "Shortest distance from location (lat: %lf and lon: %lf) to the nearest region boundary is (%lf) meters", location.GetCoordinates().GetLatitude(), location.GetCoordinates().GetLongitude(), minDistance);
+ SysSecureLog(NID_LOC, "Shortest distance from location (lat: %lf and lon: %lf) to the nearest region boundary is (%lf) meters", location.GetCoordinates().GetLatitude(), location.GetCoordinates().GetLongitude(), minDistance);
return minDistance;
}
} } // Tizen::Locations