From 86b1de85536e93c59a25702a5a2d3e384202ffd2 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Tue, 11 Dec 2012 04:03:29 +0000 Subject: More changes to port to C++11, adjust to use the new JSON support, and cleanup rest of the modules. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1419987 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/modules/http/curl-connect.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sca-cpp/trunk/modules/http/curl-connect.cpp') diff --git a/sca-cpp/trunk/modules/http/curl-connect.cpp b/sca-cpp/trunk/modules/http/curl-connect.cpp index 9f5ee17368..6e16da7163 100644 --- a/sca-cpp/trunk/modules/http/curl-connect.cpp +++ b/sca-cpp/trunk/modules/http/curl-connect.cpp @@ -34,14 +34,14 @@ namespace tuscany { namespace http { const bool testConnect(const string& url, const string& ca = "", const string& cert = "", const string& key = "") { - gc_scoped_pool p; + const gc_scoped_pool p; - CURLSession cs(ca, cert, key, "", 0); + const CURLSession cs(ca, cert, key, "", 0); const failable crc = connect(url, cs); assert(hasContent(crc)); apr_pollset_t* pollset; - apr_status_t cprc = apr_pollset_create(&pollset, 2, pool(p), 0); + const apr_status_t cprc = apr_pollset_create(&pollset, 2, pool(p), 0); assert(cprc == APR_SUCCESS); apr_socket_t* csock = sock(0, p); const apr_pollfd_t* cpollfd = pollfd(csock, APR_POLLIN | APR_POLLERR | APR_POLLNVAL | APR_POLLHUP, p); @@ -53,7 +53,7 @@ const bool testConnect(const string& url, const string& ca = "", const string& c const apr_pollfd_t* pollfds; apr_int32_t pollcount; for(;;) { - apr_status_t pollrc = apr_pollset_poll(pollset, -1, &pollcount, &pollfds); + const apr_status_t pollrc = apr_pollset_poll(pollset, -1, &pollcount, &pollfds); assert(pollrc == APR_SUCCESS); for (; pollcount > 0; pollcount--, pollfds++) { @@ -88,7 +88,7 @@ const bool testConnect(const string& url, const string& ca = "", const string& c } } -int main(unused const int argc, const char** argv) { +int main(unused const int argc, const char** const argv) { if (argc > 2) tuscany::http::testConnect(tuscany::string(argv[1]), tuscany::string(argv[2]), tuscany::string(argv[3]), tuscany::string(argv[4])); else -- cgit v1.2.3