]> git.street.me.uk Git - andy/viking.git/blobdiff - src/googlesearch.c
Add referer to DownloadOptions
[andy/viking.git] / src / googlesearch.c
index a2c45be35b7db689081e4952b799b5d920acaab0..8037663c633a6d0b5cda980ca155b07b64d4de24 100644 (file)
@@ -34,6 +34,8 @@ static gchar *last_search_str = NULL;
 static VikCoord *last_coord = NULL;
 static gchar *last_successful_search_str = NULL;
 
 static VikCoord *last_coord = NULL;
 static gchar *last_successful_search_str = NULL;
 
+static DownloadOptions googlesearch_options = { 0, "http://maps.google.com/" };
+
 gchar * a_googlesearch_get_search_string_for_this_place(VikWindow *vw)
 {
   if (!last_coord)
 gchar * a_googlesearch_get_search_string_for_this_place(VikWindow *vw)
 {
   if (!last_coord)
@@ -206,7 +208,7 @@ static int google_search_get_coord(VikWindow *vw, VikViewport *vvp, gchar *srch_
   uri = g_strdup_printf(GOOGLE_SEARCH_URL_FMT, escaped_srch_str);
 
   /* TODO: curl may not be available */
   uri = g_strdup_printf(GOOGLE_SEARCH_URL_FMT, escaped_srch_str);
 
   /* TODO: curl may not be available */
-  if (curl_download_uri(uri, tmp_file)) {  /* error */
+  if (curl_download_uri(uri, tmp_file, &googlesearch_options)) {  /* error */
     fprintf(stderr, "DEBUG: %s() download error\n", __PRETTY_FUNCTION__);
     fclose(tmp_file);
     ret = -1;
     fprintf(stderr, "DEBUG: %s() download error\n", __PRETTY_FUNCTION__);
     fclose(tmp_file);
     ret = -1;