|
@@ -562,16 +562,20 @@ int main(int argc, char *argv[]) {
|
|
|
zend = buffer.find("\x1b[1;1H");
|
|
|
if (zend != string::npos)
|
|
|
zmodem = 0;
|
|
|
+ if (!zmodem)
|
|
|
+ ZF_LOGD("Zmodem end");
|
|
|
} else {
|
|
|
// Should we be in zmodem mode?
|
|
|
size_t zstart = buffer.find("**\x18"
|
|
|
"B0");
|
|
|
- if (zstart != string::npos)
|
|
|
+ if (zstart != string::npos) {
|
|
|
zmodem = 1;
|
|
|
+ ZF_LOGD("Zmodem start");
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if (zmodem) {
|
|
|
- ZF_LOGI("Buffer %lu bytes, zmodem...", buffer.size());
|
|
|
+ // ZF_LOGI("Buffer %lu bytes, zmodem...", buffer.size());
|
|
|
|
|
|
write(STDOUT_FILENO, buffer.data(), buffer.size());
|
|
|
// console_receive(&console, buffer);
|
|
@@ -631,11 +635,13 @@ int main(int argc, char *argv[]) {
|
|
|
int r = read(STDIN_FILENO, &input, BSIZE);
|
|
|
input[r] = 0;
|
|
|
// e escreva no bc
|
|
|
- if (r > 50) {
|
|
|
- ZF_LOGI("<< %d bytes", r);
|
|
|
- } else {
|
|
|
- ZF_LOGI("<< %s", repr(input));
|
|
|
- };
|
|
|
+ if (!zmodem) {
|
|
|
+ if (r > 50) {
|
|
|
+ ZF_LOGI("<< %d bytes", r);
|
|
|
+ } else {
|
|
|
+ ZF_LOGI("<< %s", repr(input));
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
write(master, &input, r);
|
|
|
|