From 29e2604f57b2a90a7e7f2480e9665a24c08d0c98 Mon Sep 17 00:00:00 2001 From: jacob1 Date: Thu, 21 Mar 2013 21:49:04 -0400 Subject: [PATCH] fix compiling error also bug, I had some weird formatting that broke the json parsing --- src/client/requestbroker/APIRequest.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/requestbroker/APIRequest.cpp b/src/client/requestbroker/APIRequest.cpp index 811096d81..d94171e1f 100644 --- a/src/client/requestbroker/APIRequest.cpp +++ b/src/client/requestbroker/APIRequest.cpp @@ -100,10 +100,11 @@ RequestBroker::ProcessResponse APIRequest::Process(RequestBroker & rb) std::cout << typeid(*this).name() << " Authenticated " << std::endl; User user = Client::Ref().GetAuthUser(); char userName[12]; - char userSession[user.SessionID.length() + 1]; + char *userSession = new char[user.SessionID.length() + 1]; std::strcpy(userName, format::NumberToString(user.ID).c_str()); std::strcpy(userSession, user.SessionID.c_str()); HTTPContext = http_multipart_post_async((char*)URL.c_str(), postNames, postData, postLength, userName, NULL, userSession); + delete userSession; } else {