Junichi Katsu / Milkcocoa-os

Dependents:   mbed-os-example-wifi-milkcocoa MilkcocoaOsSample_Eth MilkcocoaOsSample_ESP8266 MilkcocoaOsSample_Eth_DigitalIn

Revision:
4:9cfd43d8de16
Parent:
3:cddf81a87de3
Child:
5:dd68fa651637
diff -r cddf81a87de3 -r 9cfd43d8de16 Milkcocoa.cpp
--- a/Milkcocoa.cpp	Thu May 18 14:47:30 2017 +0000
+++ b/Milkcocoa.cpp	Fri May 19 01:25:04 2017 +0000
@@ -92,7 +92,7 @@
 	client = new MClient(ipstack);
 	strcpy(servername,host);
 	portnum = port;
-	app_id = _app_id;
+	strcpy(app_id,app_id);
 	strcpy(_clientid,client_id);
 	strcpy(username,"sdammy");
 	strcpy(password,app_id);
@@ -107,7 +107,7 @@
 	client = new MClient(ipstack);
 	strcpy(servername,host);
 	portnum = port;
-	app_id = _app_id;
+	strcpy(app_id,app_id);
 	strcpy(_clientid,client_id);
 	strcpy(username,_session);
 	strcpy(password,app_id);
@@ -173,7 +173,7 @@
 
 	sprintf(message->topic, "%s/%s/push", app_id, path);
 	
-	strcpy(message->message , "{\"params\":{");
+	strcpy(message->message , "{\"params\":");
 	strcat(message->message , data);
 	strcat(message->message , "}");
 	
@@ -209,7 +209,7 @@
 
 	sprintf(message->topic, "%s/%s/send", app_id, path);
 	
-	strcpy(message->message , "{\"params\":{");
+	strcpy(message->message , "{\"params\":");
 	strcat(message->message , data);
 	strcat(message->message , "}");