[misc] fix various bugs

pull/254/head
Timothy Stack 9 years ago
parent 6ce2d9e6a1
commit 25a375f08d

@ -167,6 +167,7 @@ public:
log_debug("waiting for curl_looper thread");
pthread_join(this->cl_thread, &result);
log_debug("curl_looper thread joined");
this->cl_started = false;
}
};

@ -94,6 +94,10 @@ public:
*/
ssize_t get_file_size() const { return this->lb_file_size; };
bool is_pipe() const {
return !this->lb_seekable;
};
bool is_pipe_closed() const {
return !this->lb_seekable && (this->lb_file_size != -1);
};

@ -171,7 +171,7 @@ piper_proc::piper_proc(int pipefd, bool timestamp, const char *filename)
}
last_off = off;
}
} while (!lb.is_pipe_closed());
} while (lb.is_pipe() && !lb.is_pipe_closed());
if (timestamp) {
ssize_t wrc;

@ -169,6 +169,7 @@ scripty_LDADD = ../src/libdiag.a
dist_noinst_SCRIPTS = \
parser_debugger.py \
test_cli.sh \
test_cmds.sh \
test_curl.sh \
test_data_parser.sh \
@ -275,6 +276,7 @@ TESTS = \
test_date_time_scanner \
test_format_installer.sh \
test_format_loader.sh \
test_cli.sh \
test_cmds.sh \
test_concise \
test_line_buffer2 \

@ -0,0 +1,12 @@
#! /bin/bash
run_test ${lnav_test} -t -n <<EOF
Hello, World!
Goodbye, World!
EOF
check_output "file URL is not working" <<EOF
2013-06-06T12:13:20.123 Hello, World!
2013-06-06T12:13:20.123 Goodbye, World!
2013-06-06T12:13:20.123 ---- END-OF-STDIN ----
EOF
Loading…
Cancel
Save