int query_geocode_within_bounding_box(gchar *maps_key, char *address, coords_s top_left, coords_s bottom_right, int num_results, gpointer user_data)
{
- char url[1024];
- char tmpStr[512];
+ char url[1024] = "";
+ char tmpStr[512] = "";
if (maps_key != NULL)
snprintf(tmpStr, sizeof(tmpStr), GEOCODE_URL, maps_key);
int query_geocode_within_circle(gchar *maps_key, char *address, coords_s center, double radius, int num_results, gpointer user_data)
{
- char url[1024];
- char tmpStr[512];
+ char url[1024] = "";
+ char tmpStr[512] = "";
if (maps_key != NULL)
snprintf(tmpStr, sizeof(tmpStr), GEOCODE_URL, maps_key);
int query_geocode(gchar *maps_key, char *address, int num_results, gpointer user_data)
{
MAP_DEBUG("geocode address : %s", address);
- char url[1024];
- char tmpStr[512];
+ char url[1024] = "";
+ char tmpStr[512] = "";
if (maps_key != NULL)
snprintf(tmpStr, sizeof(tmpStr), GEOCODE_URL, maps_key);
int query_places(gchar *maps_key, gchar *search_str, gchar *categories, mapzen_boundary_s *boundary, int num_res, gpointer user_data, mapzen_req_type type)
{
- char url[1024];
- char tmpStr[512];
+ char url[1024] = "";
+ char tmpStr[512] = "";
if (search_str != NULL || boundary->type == MAPZEN_BOUNDARY_RECT) {
if (maps_key != NULL)
int query_place_details(gchar *maps_key, gchar *ids, gpointer user_data)
{
- char url[1024];
- char tmpStr[512];
+ char url[1024] = "";
+ char tmpStr[512] = "";
if (maps_key != NULL)
snprintf(tmpStr, sizeof(tmpStr), PLACE_DETAILS_URL, maps_key);
- else snprintf(tmpStr, sizeof(tmpStr), PLACE_DETAILS_URL, "null");
- STRCPY(url, tmpStr);
+ else
+ snprintf(tmpStr, sizeof(tmpStr), PLACE_DETAILS_URL, "null");
+ STRCPY(url, tmpStr);
if (ids != NULL) {
char *encoded = curl_escape(ids, 0);
else
requestList = g_list_insert_before(requestList, NULL, (gpointer)req);
pthread_mutex_unlock(&__requestLock);
+ } else {
+ g_free(req);
}
}
else
requestList = g_list_insert_before(requestList, NULL, (gpointer)req);
pthread_mutex_unlock(&__requestLock);
+ } else {
+ g_free(req);
}
}
else
requestList = g_list_insert_before(requestList, NULL, (gpointer)req);
pthread_mutex_unlock(&__requestLock);
+ } else {
+ g_free(req);
}
}
else
requestList = g_list_insert_before(requestList, NULL, (gpointer)req);
pthread_mutex_unlock(&__requestLock);
+ } else {
+ g_free(req);
}
}
else
requestList = g_list_insert_before(requestList, NULL, (gpointer)req);
pthread_mutex_unlock(&__requestLock);
+ } else {
+ g_free(req);
}
}
else
requestList = g_list_insert_before(requestList, NULL, (gpointer)req);
pthread_mutex_unlock(&__requestLock);
+ } else {
+ g_free(req);
}
-
}
return MAPZEN_ERROR_NONE;
return NULL;
}
-static gboolean __timeout_cb(gpointer data)
+static gboolean __timeout_cb(gpointer user_data)
{
MAP_DEBUG("timeout_cb");
__response_timer_running = true;