static int isPipeOwner = 0;
static int controlPort = -1;
+static int dataPort = -1;
static int statPort = -1;
static FILE *ctrl_file_in = NULL;
+static FILE *ctrl_file_out = NULL;
static FILE *data_file_out = NULL;
static FILE *stat_file_out = NULL;
{"list", no_argument, 0, 'l'},
{"info", no_argument, 0, 'i'},
{"pipe-owner", no_argument, 0, 'w'},
- {"server", required_argument, 0, 's'},
- {"stat", required_argument, 0, 'S'},
- {0, 0, 0, 0}
+ {"control", required_argument, 0, 'c'},
+ {"data", required_argument, 0, 'd'},
+ {"stat", required_argument, 0, 's'},
+ {0, 0, 0, 0}
};
static void log_current_time()
{
int option_index;
- switch(getopt_long(argc, argv, "-a:p:vle:o:it:ws:S:",
+ switch(getopt_long(argc, argv, "-a:p:vle:o:it:wc:d:s:",
long_options, &option_index)) {
case 1:
if (appid == NULL) {
case 'i': doinfo = 1; break;
case 't': timeoutMicrosec = atoi(optarg) * 1000; break;
case 'w': isPipeOwner = 1; break;
- case 's': controlPort = atoi(optarg); break;
- case 'S': statPort = atoi(optarg); break;
+ case 'c': controlPort = atoi(optarg); break;
+ case 'd': dataPort = atoi(optarg); break;
+ case 's': statPort = atoi(optarg); break;
default:
return -1;
}
}
#if TIZEN
- if (controlPort < 0 && statPort < 0) {
+ if (controlPort < 0 && dataPort < 0 && statPort < 0) {
/* stty */
tcgetattr(0, &term);
sterm = term;
}
}
+ if (dataPort > 0) {
+ int s = openPort(dataPort);
+ data_file_out = fdopen(s, "w");
+ if (data_file_out == NULL) {
+ log_system_error_and_exit("fdopen(data,w)");
+ }
+ }
+
if (doinfo && (statPort > 0)) {
int s = openPort(statPort);
stat_file_out = fdopen(s, "w");