From: Kevin Wasserman Date: Sat, 29 Nov 2014 13:54:38 +0000 (-0500) Subject: Fixup new firefox entrypoints for windows X-Git-Url: http://www.project-moonshot.org/gitweb/?p=gssweb.git;a=commitdiff_plain;h=50fbf6e4aaca1c7fd2307b5ad259b9b85ea72b71 Fixup new firefox entrypoints for windows --- diff --git a/json_gssapi/src/GSSRequest.cpp b/json_gssapi/src/GSSRequest.cpp index 0517015..9cd815c 100644 --- a/json_gssapi/src/GSSRequest.cpp +++ b/json_gssapi/src/GSSRequest.cpp @@ -146,8 +146,6 @@ string GSSRequest::getResponse() char *gss_request(char *json_string) { /* Variables */ - char *retVal; - string output; GSSRequest *req = new GSSRequest(string(json_string)); /* Error checking */ @@ -157,12 +155,7 @@ char *gss_request(char *json_string) /* Setup */ /* Main processing */ req->execute(); - output = req->getResponse(); - retVal = new char[ output.length() + 1 ]; - output.copy(retVal, output.length(), 0); - retVal[output.length()] = 0; - - return(retVal); + return strdup(req->getResponse().c_str()); } void deallocate_reply(char *reply) diff --git a/json_gssapi/src/GSSRequest.h b/json_gssapi/src/GSSRequest.h index e0094f9..33cf6bc 100644 --- a/json_gssapi/src/GSSRequest.h +++ b/json_gssapi/src/GSSRequest.h @@ -19,18 +19,18 @@ using std::string; * to process a JSON string */ extern "C" { - char *gss_request(char *json_string); - void deallocate_reply(char *reply); + JSONGSSAPI_EXPORT char *gss_request(char *json_string); + JSONGSSAPI_EXPORT void deallocate_reply(char *reply); } class GSSRequest { public: - JSONGSSAPI_EXPORT GSSRequest(string jsonString); - JSONGSSAPI_EXPORT ~GSSRequest(); + GSSRequest(string jsonString); + ~GSSRequest(); - JSONGSSAPI_EXPORT void execute(); - JSONGSSAPI_EXPORT string getResponse(); + void execute(); + string getResponse(); private: string requestString;