From 7ea4067d35a6973ec6b2a3eff89e982211ed4628 Mon Sep 17 00:00:00 2001
From: Torkel Niklasson <torkel@axis.com>
Date: Thu, 21 Mar 2019 15:55:16 +0100
Subject: [PATCH] Changed curl options to char * instead of string.

Change-Id: I56e1220056b6312c99fcaba3f318b2f39b5d4c44
---
 src/axis_imu.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/axis_imu.cc b/src/axis_imu.cc
index c441513..24b015b 100644
--- a/src/axis_imu.cc
+++ b/src/axis_imu.cc
@@ -289,13 +289,13 @@ int main(int argc, char *argv[]) {
   curl = curl_easy_init();
 
   if (curl) {
-    curl_easy_setopt(curl, CURLOPT_URL, url);
+    curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
     /* example.com is redirected, so we tell libcurl to follow redirection */ 
     curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
     //    curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);
     curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
     curl_easy_setopt(curl, CURLOPT_USERNAME, "root");
-    curl_easy_setopt(curl, CURLOPT_PASSWORD, root_passwd);
+    curl_easy_setopt(curl, CURLOPT_PASSWORD, root_passwd.c_str());
  
     /* Perform the request, res will get the return code */ 
     res = curl_easy_perform(curl);
-- 
GitLab