Skip to content

Commit 326518c

Browse files
committed
Fixs from testing streaming example
1 parent 0428c73 commit 326518c

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
PUSH /seria/push_test "this is a test string \ "
1+
PUSH /serial/push_test "this is a test string \ "

src/SerialTransceiver.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#include <string>
2+
// This is needed to compile std::string on esp8266.
3+
template class std::basic_string<char>;
4+
15
#include "modem/SerialTransceiver.h"
26
// Bring them into the base namespace for easier use in arduino ide.
37
using firebase::modem::SerialTransceiver;

src/modem/json_util.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ std::string ReplaceAll(std::string str, const std::string& from, const std::stri
1616

1717
// TODO(edcoyne): We should use a json library to escape.
1818
inline std::string EncodeForJson(std::string input) {
19-
ReplaceAll(input, "\\", "\\\\");
20-
ReplaceAll(input, "\"", "\\\"");
19+
input = ReplaceAll(input, "\\", "\\\\");
20+
input = ReplaceAll(input, "\"", "\\\"");
2121
return "\"" + input + "\"";
2222
}
2323

0 commit comments

Comments
 (0)