From: Alexey Chernobaev Date: Tue, 28 Aug 2018 20:12:03 +0000 (+0300) Subject: commands reply implemented (in socket mode) X-Git-Tag: accepted/tizen/5.0/unified/20181102.031931~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=70ed509689e4b0314c61508ab08dbe186a7ac225;p=sdk%2Ftools%2Fprofctl.git commands reply implemented (in socket mode) --- diff --git a/profctl.c b/profctl.c index 26f2173..881ff1b 100644 --- a/profctl.c +++ b/profctl.c @@ -701,6 +701,10 @@ int main(int argc, char **argv) if (ctrl_file_in == NULL) { log_system_error_and_exit("fdopen(control,r)"); } + ctrl_file_out = fdopen(s, "w"); + if (ctrl_file_out == NULL) { + log_system_error_and_exit("fdopen(control,w)"); + } } if (dataPort > 0) { @@ -763,6 +767,10 @@ int main(int argc, char **argv) SimpleThread(&outstat); } } + if (ctrl_file_out != NULL) { // echo input line + fprintf(ctrl_file_out, "%s\n", line); + fflush(ctrl_file_out); + } } // while return 0;