From: kj7.sung Date: Thu, 16 Feb 2017 03:13:33 +0000 (+0900) Subject: Fix svace issue X-Git-Tag: submit/tizen_3.0/20170216.032059~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=735d68b08606f22e82ad0f07f5f1ee41c4a8018c;p=platform%2Fcore%2Fapi%2Flocation-manager.git Fix svace issue Change-Id: Ie888143e9b77aaa184a04d4b27b145a70265ff7b Signed-off-by: kj7.sung --- diff --git a/src/locations.c b/src/locations.c index f0eb682..b8e1a8a 100755 --- a/src/locations.c +++ b/src/locations.c @@ -69,12 +69,11 @@ static LocationMethod __convert_LocationMethod(location_method_e method) static void __cb_service_updated(GObject *self, guint type, gpointer data, gpointer velocity, gpointer accuracy, gpointer userdata) { - LOCATIONS_LOGD("Callback function has been invoked. "); location_manager_s *handle = (location_manager_s *) userdata; if (type == SATELLITE_UPDATED && handle->user_cb[_LOCATIONS_EVENT_TYPE_SATELLITE]) { LocationSatellite *sat = (LocationSatellite *)data; - LOCATIONS_LOGD("Current satellite information: timestamp : %d, number of active : %d, number of inview : %d", + LOCATIONS_LOGD("callback invoked[TYPE_SATELLITE] timestamp : %d, number of active : %d, number of inview : %d", sat->timestamp, sat->num_of_sat_used, sat->num_of_sat_inview); ((gps_status_satellite_updated_cb) handle->user_cb[_LOCATIONS_EVENT_TYPE_SATELLITE])(sat->num_of_sat_used, sat->num_of_sat_inview, sat->timestamp, handle->user_data[_LOCATIONS_EVENT_TYPE_SATELLITE]); @@ -84,12 +83,14 @@ static void __cb_service_updated(GObject *self, guint type, gpointer data, gpoin LocationAccuracy *acc = (LocationAccuracy *) accuracy; ((location_changed_cb) handle->user_cb[_LOCATIONS_EVENT_TYPE_DISTANCE])(pos->latitude, pos->longitude, pos->altitude, vel->speed, vel->direction, acc->horizontal_accuracy, pos->timestamp, handle->user_data[_LOCATIONS_EVENT_TYPE_DISTANCE]); + LOCATIONS_LOGD("callback invoked[TYPE_DISTANCE] timestamp : %d", pos->timestamp); } else { if (handle->user_cb[_LOCATIONS_EVENT_TYPE_POSITION] && (type & POSITION_UPDATED) != 0) { LocationPosition *pos = (LocationPosition *) data; ((location_position_updated_cb) handle->user_cb[_LOCATIONS_EVENT_TYPE_POSITION])(pos->latitude, pos->longitude, pos->altitude, pos->timestamp, handle->user_data[_LOCATIONS_EVENT_TYPE_POSITION]); + LOCATIONS_LOGD("callback invoked[TYPE_POSITION] timestamp : %d", pos->timestamp); } if (handle->user_cb[_LOCATIONS_EVENT_TYPE_VELOCITY] && (type & VELOCITY_UPDATED) != 0) { @@ -104,6 +105,7 @@ static void __cb_service_updated(GObject *self, guint type, gpointer data, gpoin LocationAccuracy *acc = (LocationAccuracy *) accuracy; ((location_changed_cb) handle->user_cb[_LOCATIONS_EVENT_TYPE_POS_VEL])(pos->latitude, pos->longitude, pos->altitude, vel->speed, vel->direction, acc->horizontal_accuracy, pos->timestamp, handle->user_data[_LOCATIONS_EVENT_TYPE_POS_VEL]); + LOCATIONS_LOGD("callback invoked[TYPE_POS_VEL] timestamp : %d", pos->timestamp); } } } @@ -134,7 +136,7 @@ static void __cb_batch_updated(GObject *self, guint num_of_location, gpointer us static void __cb_service_enabled(GObject *self, guint status, gpointer userdata) { - LOCATIONS_LOGD("Invoked. status = %d", status); + LOCATIONS_LOGD("Invoked[service_enabled]. status = %d", status); location_manager_s *handle = (location_manager_s *) userdata; if (handle->user_cb[_LOCATIONS_EVENT_TYPE_SERVICE_STATE]) { ((location_service_state_changed_cb) @@ -144,7 +146,7 @@ static void __cb_service_enabled(GObject *self, guint status, gpointer userdata) static void __cb_service_disabled(GObject *self, guint status, gpointer userdata) { - LOCATIONS_LOGD("Invoked. status = %d", status); + LOCATIONS_LOGD("Invoked[service_disabled]. status = %d", status); location_manager_s *handle = (location_manager_s *) userdata; if (handle->user_cb[_LOCATIONS_EVENT_TYPE_SERVICE_STATE]) { ((location_service_state_changed_cb) diff --git a/test/location_test.c b/test/location_test.c index 75d69c7..8bc6ad7 100755 --- a/test/location_test.c +++ b/test/location_test.c @@ -520,6 +520,9 @@ static int location_test() fprintf(stderr, "\n Input position interval ==> "); ret = scanf("%d", &interval); + if (interval > 1000 && interval < -1000) + interval = 1; + int method = menu - 11; ret = location_manager_create(method, &manager); fprintf(stderr, "location_manager_create (method: %d): %d\n", method, ret);