~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/http_functions/http_functions.cc

  • Committer: Olaf van der Spek
  • Date: 2011-07-04 17:28:54 UTC
  • mto: This revision was merged to the branch mainline in revision 2367.
  • Revision ID: olafvdspek@gmail.com-20110704172854-wa03i3v5l78h99ee
Use String::c_str() instead of c_ptr_safe()
Rename String::is_empty() to empty() (standard C++ name)

Show diffs side-by-side

added added

removed removed

Lines of Context:
70
70
    return NULL;
71
71
 
72
72
  curl= curl_easy_init();
73
 
  curl_easy_setopt(curl, CURLOPT_URL, url->c_ptr_safe());
 
73
  curl_easy_setopt(curl, CURLOPT_URL, url->c_str());
74
74
  curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, http_get_result_cb);
75
75
  curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&result);
76
76
  curl_easy_setopt(curl, CURLOPT_USERAGENT, "drizzle-http-functions/1.0");
155
155
    return NULL;
156
156
 
157
157
  curl= curl_easy_init();
158
 
  curl_easy_setopt(curl, CURLOPT_URL, url->c_ptr_safe());
 
158
  curl_easy_setopt(curl, CURLOPT_URL, url->c_str());
159
159
  curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, http_get_result_cb);
160
160
  curl_easy_setopt(curl, CURLOPT_POST, 1L);
161
161
  curl_easy_setopt(curl, CURLOPT_POSTFIELDSIZE, post_data.length());