diff options
| author | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-05-13 03:51:58 +0000 |
|---|---|---|
| committer | SND\weimingzhi_cp <SND\weimingzhi_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2010-05-13 03:51:58 +0000 |
| commit | e454279539e9674e509fa75d9a2bf3c5c9572fcd (patch) | |
| tree | 145eac722ea62a4317e74ad651b0d6e27133a75f /plugins | |
| parent | 0d1d9bece31f605d4aa68b20f3ecb19cd0db2d3d (diff) | |
| download | pcsxr-e454279539e9674e509fa75d9a2bf3c5c9572fcd.tar.gz | |
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@47938 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'plugins')
| -rw-r--r-- | plugins/dfnet/unix.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/dfnet/unix.c b/plugins/dfnet/unix.c index 82f8c1f8..75e2c1e6 100644 --- a/plugins/dfnet/unix.c +++ b/plugins/dfnet/unix.c @@ -19,19 +19,19 @@ extern int errno; #include "dfnet.h" -int ExecCfg(const char *arg) { +int ExecCfg(const char *arg, int f) { char cfg[512]; - struct stat buf; strcpy(cfg, "cfg/cfgDFNet"); - if (stat(cfg, &buf) != -1) { - strcat(cfg, " "); - strcat(cfg, arg); - return system(cfg); + strcat(cfg, " "); + strcat(cfg, arg); + + if (f) { + if (fork() == 0) system(cfg); + return 0; } - printf("cfgDFNet file not found!\n"); - return -1; + return system(cfg); } void SysMessage(const char *fmt, ...) { @@ -44,7 +44,7 @@ void SysMessage(const char *fmt, ...) { va_end(list); sprintf(cmd, "message %s\n", msg); - ExecCfg(cmd); + ExecCfg(cmd, 1); } long sockInit() { @@ -60,7 +60,7 @@ long sockShutdown() { } long sockOpen() { - if (ExecCfg("open") == 0) return -1; + if (ExecCfg("open", 0) == 0) return -1; LoadConf(); @@ -83,11 +83,11 @@ int sockPing() { } void CALLBACK NETconfigure() { - ExecCfg("configure"); + ExecCfg("configure", 1); } void CALLBACK NETabout() { - ExecCfg("about"); + ExecCfg("about", 1); } pid_t cfgpid = 0; |
