diff options
author | kj7.sung <kj7.sung@samsung.com> | 2017-03-29 19:52:52 +0900 |
---|---|---|
committer | kj7.sung <kj7.sung@samsung.com> | 2017-03-29 19:52:52 +0900 |
commit | 9d4be39c27481dff788dd6f2bb21ba541ddc8ad2 (patch) | |
tree | ce5acd1c611a100819df393cc7548720fe2673a4 | |
parent | 0580b0b1f65580aa608fbb205cb257049f28d99e (diff) | |
download | location-manager-9d4be39c27481dff788dd6f2bb21ba541ddc8ad2.tar.gz location-manager-9d4be39c27481dff788dd6f2bb21ba541ddc8ad2.tar.bz2 location-manager-9d4be39c27481dff788dd6f2bb21ba541ddc8ad2.zip |
svace : single_requestsubmit/tizen/20170330.051533accepted/tizen/wearable/20170330.223929accepted/tizen/unified/20170330.224201accepted/tizen/tv/20170330.223916accepted/tizen/mobile/20170330.223852accepted/tizen/ivi/20170330.224119accepted/tizen/common/20170330.151812accepted/tizen_wearableaccepted/tizen_tvaccepted/tizen_mobileaccepted/tizen_iviaccepted/tizen_common
Change-Id: I5af870d1a324f153bcaa2476cafa95abd60fd8da
Signed-off-by: kj7.sung <kj7.sung@samsung.com>
-rwxr-xr-x | src/locations.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/locations.c b/src/locations.c index ee7c7fc..a5437ab 100755 --- a/src/locations.c +++ b/src/locations.c @@ -112,16 +112,20 @@ static void __cb_service_updated(GObject *self, guint type, gpointer data, gpoin static void __cb_location_updated(GObject *self, int error, gpointer position, gpointer velocity, gpointer accuracy, gpointer userdata) { - LOCATIONS_LOGD("Callback function has been invoked. "); int converted_err = __convert_error_code(error); location_manager_s *handle = (location_manager_s *) userdata; LocationPosition *pos = (LocationPosition *) position; LocationVelocity *vel = (LocationVelocity *) velocity; - LOCATIONS_LOGD("Current position: timestamp : %d", pos->timestamp); + LOCATIONS_LOGD("Callback function[TYPE_LOCATION: single] timestamp : %d, error : %d", pos->timestamp, error); if (handle->user_cb[_LOCATIONS_EVENT_TYPE_LOCATION]) { ((location_updated_cb) handle->user_cb[_LOCATIONS_EVENT_TYPE_LOCATION])(converted_err, pos->latitude, pos->longitude, pos->altitude, - pos->timestamp, vel->speed, vel->climb, vel->direction, handle->user_data[_LOCATIONS_EVENT_TYPE_LOCATION]); + pos->timestamp, vel->speed, vel->direction, vel->climb, handle->user_data[_LOCATIONS_EVENT_TYPE_LOCATION]); + } + + if (error != LOCATION_ERROR_NONE) { + location_position_free(pos); + location_velocity_free(vel); } } |