=================================================================== RCS file: /home/cvs/OpenXM/src/ox_toolkit/oxf_old.c,v retrieving revision 1.6 retrieving revision 1.9 diff -u -p -r1.6 -r1.9 --- OpenXM/src/ox_toolkit/oxf_old.c 2003/06/02 10:25:57 1.6 +++ OpenXM/src/ox_toolkit/oxf_old.c 2015/08/27 03:03:34 1.9 @@ -1,16 +1,22 @@ /* -*- mode: C; coding: euc-japan -*- */ -/* $OpenXM: OpenXM/src/ox_toolkit/oxf_old.c,v 1.5 2002/04/24 07:45:14 ohara Exp $ */ +/* $OpenXM: OpenXM/src/ox_toolkit/oxf_old.c,v 1.8 2009/03/20 18:41:16 iwane Exp $ */ /* このモジュールは互換性のためのものです。*/ #include #include #include -#include #include +#include + +#if defined(_MSC_VER) || defined(__MINGW32__) +#include +#define MAXHOSTNAMELEN 256 +#else +#include #include #include -#include +#endif #if defined(__sun__) #include @@ -143,7 +149,7 @@ OXFILE *ox_start(char* host, char* ctl_prog, char* dat OXFILE *st, *ct; char *passwd = generate_otp(); int listen[2]; - int ports[2] = {0}; /* short! */ + int ports[2] = {0}; /* host を無視 */ listen[0] = oxf_listen(&ports[0]); @@ -186,16 +192,25 @@ OXFILE *ox_start_insecure(char* host, short portContro /* ssh -f host oxlog xterm -e ox -ox ox_asir ... */ void ssh_ox_server(char *remote_host, char *ctl_prog, char *dat_prog, short portControl, short portStream) { + char buf[2][10]; +/* ctl_prog = concat_openxm_home_bin(ctl_prog); dat_prog = concat_openxm_home_bin(dat_prog); +*/ if (fork() == 0) { + + sprintf(buf[0], "%hd", portStream); + sprintf(buf[1], "%hd", portControl); + execlp("ssh", "ssh", "-f", remote_host, "oxlog", "xterm", "-icon", "-e", ctl_prog, "-insecure", "-ox", dat_prog, - "-data", portStream, "-control", portControl, + "-data", buf[0], "-control", buf[1], "-host", remote_host, NULL); exit(1); } + + sleep(1); /* wait ssh */ } OXFILE *ox_start_remote_with_ssh(char *dat_prog, char* remote_host)