y ishida / Mbed 2 deprecated RESTServer_team4

Dependencies:   NySNICInterface mbed-rtos mbed

Fork of RESTServerSample by KDDI Fx0 hackathon

Files at this revision

API Documentation at this revision

Comitter:
yi
Date:
Sun Feb 15 05:12:27 2015 +0000
Parent:
6:d148c8a213ef
Child:
8:babc71c8c498
Commit message:
fixed

Changed in this revision

control_motors.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/control_motors.cpp	Sun Feb 15 03:38:49 2015 +0000
+++ b/control_motors.cpp	Sun Feb 15 05:12:27 2015 +0000
@@ -4,7 +4,10 @@
     
     bool okFlag = false;
     
-    char* str = strtok(request+1,"/");
+    char req[1024];
+    strcpy(req, request + 1);
+
+    char* str = strtok(req, "/");
     
     if(strcmp(str, "api") == 0){
         str = strtok(NULL,"/");