Skip to content

Commit 7510efa

Browse files
rename files
1 parent cecc309 commit 7510efa

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ using keychain_invoke_f = std::function<void(const fc::variant&)>;
3030
class pipeline_parser
3131
{
3232
public:
33-
pipeline_parser(keychain_invoke_f&& keychain_func);
33+
pipeline_parser(keychain_invoke_f&& keychain_func, FILE* pd);
3434
int run();
3535
private:
3636
keychain_invoke_f m_keychain_func;
37+
FILE* m_pd;
3738
using buf_type = std::vector<char>;
3839
using buf_iterator = buf_type::iterator;
3940
using iter_range = std::pair<buf_iterator, buf_iterator>;

src/cmd_parser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ int cmd_parser::run(int argc, const char* const argv [])
2424
const secure_dlg_mod_base* sec_mod = secure_module<sec_mod_dummy>::instance();
2525

2626
keychain_invoke_f f = std::bind(&keychain_wrapper, sec_mod, std::placeholders::_1);
27-
pipeline_parser pipe_line_parser_(std::move(f));
27+
pipeline_parser pipe_line_parser_(std::move(f), stdin);
2828
return pipe_line_parser_.run();
2929
}
3030

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ using keychain_t = keychain_app::keychain;
1414

1515
using namespace keychain_app;
1616

17-
pipeline_parser::pipeline_parser(keychain_invoke_f&& keychain_f)
17+
pipeline_parser::pipeline_parser(keychain_invoke_f&& keychain_f, FILE* pd)
1818
: m_keychain_func(keychain_f)
19+
, m_pd(pd)
1920
{
2021
}
2122

@@ -26,7 +27,7 @@ int pipeline_parser::run()
2627
buf_iterator it_read_end = read_buf.begin();
2728
size_t bytes_remaining = read_buf.size();
2829
while (!feof(stdin)){
29-
size_t bytes_read = fread(p_read_begin, sizeof(buf_type::value_type), 1, stdin);
30+
size_t bytes_read = fread(p_read_begin, sizeof(buf_type::value_type), 1, m_pd);
3031
if(ferror(stdin))
3132
{
3233
std::cerr << "Error: " << strerror(errno) << std::endl;

0 commit comments

Comments
 (0)