From d83412e9d4ff5a11eb128de5079c465a63709541 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 4 Feb 2010 21:32:45 +0000 Subject: some cleanup --- src/posix/sysExec.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/posix') diff --git a/src/posix/sysExec.hpp b/src/posix/sysExec.hpp index 359c1e4..48cd8f2 100644 --- a/src/posix/sysExec.hpp +++ b/src/posix/sysExec.hpp @@ -63,17 +63,17 @@ char** dupEnv(StringList const& env) return evp; } -void SysExec::doExec(std::string const& script, StringVector const& args, StringList const& env) +void SysExec::doExec(StringVector const& args, StringList const& env) { int pipefd[2]; if(pipe(pipefd) == -1) { - cLog.msg(Log::PRIO_ERROR) << "executing script '" << script << "' pipe() error: " << AnytunErrno(errno); + cLog.msg(Log::PRIO_ERROR) << "executing script '" << script_ << "' pipe() error: " << AnytunErrno(errno); return; } pid_ = fork(); if(pid_ == -1) { - cLog.msg(Log::PRIO_ERROR) << "executing script '" << script << "' fork() error: " << AnytunErrno(errno); + cLog.msg(Log::PRIO_ERROR) << "executing script '" << script_ << "' fork() error: " << AnytunErrno(errno); return; } @@ -99,8 +99,8 @@ void SysExec::doExec(std::string const& script, StringVector const& args, String } char** argv = new char*[args.size() + 2]; - argv[0] = new char[script.size() + 1]; - std::strcpy(argv[0], script.c_str()); + argv[0] = new char[script_.size() + 1]; + std::strcpy(argv[0], script_.c_str()); for(unsigned int i=0; i= static_cast(sizeof(err))) { - cLog.msg(Log::PRIO_NOTICE) << "script '" << script_ << "' exec() error: " << AnytunErrno(err); + cLog.msg(Log::PRIO_ERROR) << "script '" << script_ << "' exec() error: " << AnytunErrno(err); close(pipefd_); return_code_ = -1; return return_code_; -- cgit v1.2.3