From 3f0324261d9b377bbfce6593b6c734360e8ba292 Mon Sep 17 00:00:00 2001 From: wouterlucas Date: Mon, 20 Jun 2016 13:48:05 -0700 Subject: [PATCH 1/3] Make client build in 64 using multilib --- client/makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/makefile b/client/makefile index 68cf150..2ee8144 100644 --- a/client/makefile +++ b/client/makefile @@ -8,7 +8,7 @@ OBJS := main.cpp DialServer.cpp DialDiscovery.cpp DialConformance.cpp DialClient # You may not need all these libraries. This example uses a build of curl that needs crypto, ssl, cares, and zlib dialclient: $(OBJS) ${includes} - $(CC) -Wall -Werror -g $(OBJS) $(INCLUDES) $(LDFLAGS) -ldl -lpthread -lcurl -lz -lcrypto -lssl -lcares -m32 -o dialclient + $(CC) -Wall -g $(OBJS) $(INCLUDES) $(LDFLAGS) -ldl -lpthread -lcurl -lz -lcrypto -lssl -lcares -o dialclient clean: rm -f *.o dialclient From f8fb7dd8935bcc0510d36aba4d25e0e65a4fb7c7 Mon Sep 17 00:00:00 2001 From: wouterlucas Date: Mon, 20 Jun 2016 13:48:34 -0700 Subject: [PATCH 2/3] Send name param to stopApplication instead of url --- client/DialConformance.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/DialConformance.h b/client/DialConformance.h index b6c4298..69218ca 100644 --- a/client/DialConformance.h +++ b/client/DialConformance.h @@ -168,7 +168,7 @@ private: { if( !stopurl.empty() ) { - _pServer->stopApplication( stopurl, responseHeaders ); + _pServer->stopApplication( _name, responseHeaders ); } #ifdef DEBUG else ATRACE("%s: Not sending stop, stop URL is empty\n", __FUNCTION__); From d0c99012330ccd406ce0e8fca18750547d248310 Mon Sep 17 00:00:00 2001 From: wouterlucas Date: Mon, 20 Jun 2016 13:49:00 -0700 Subject: [PATCH 3/3] URL append fixes on sendCommand --- client/DialServer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/client/DialServer.cpp b/client/DialServer.cpp index d1def42..fe35a58 100644 --- a/client/DialServer.cpp +++ b/client/DialServer.cpp @@ -203,7 +203,7 @@ int DialServer::launchApplication( { ATRACE("%s: Launch %s\n", __FUNCTION__, application.c_str()); string appUrl = m_appsUrl; - int status = sendCommand( appUrl.append(application), COMMAND_LAUNCH, payload, responseHeaders, responseBody); + int status = sendCommand( appUrl.append("/" + application), COMMAND_LAUNCH, payload, responseHeaders, responseBody); return status; } @@ -215,10 +215,10 @@ int DialServer::getStatus( ATRACE("%s: GetStatus %s\n", __FUNCTION__, application.c_str()); string emptyPayload; string appUrl = m_appsUrl; - int status = sendCommand( appUrl.append(application), COMMAND_STATUS, emptyPayload, responseHeaders, responseBody ); + int status = sendCommand( appUrl.append("/" + application), COMMAND_STATUS, emptyPayload, responseHeaders, responseBody ); if (!status) return 0; - ATRACE("Body: %s\n", responseBody.c_str()); + //ATRACE("Body: %s\n", responseBody.c_str()); unsigned found = responseBody.find("href="); if( found != string::npos ) { @@ -246,8 +246,8 @@ int DialServer::stopApplication( getStatus( application, responseHeaders, responseBody ); int status = sendCommand( - (appUrl.append(application)).append("/"+m_stopEndPoint), - COMMAND_KILL, emptyPayload, responseHeaders, responseBody ); + (appUrl.append("/" + application)).append("/"+m_stopEndPoint), + COMMAND_KILL, emptyPayload, responseHeaders, responseBody ); return status; }