summaryrefslogtreecommitdiffstats
path: root/tests/nettester.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2010-04-09 12:27:59 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2010-04-09 12:27:59 +0200
commit87a957b0f5686ec3a50c98f3d1cf3019b636e700 (patch)
tree00af9694aa29b1e97f6d9b1efff5e78323316412 /tests/nettester.c
parentf139dc28feb74f9c8b66736905ae7d3cacd035b6 (diff)
parent5ef852f4a3f030f61254a963b0d2dca290933e3c (diff)
downloadrsyslog-87a957b0f5686ec3a50c98f3d1cf3019b636e700.tar.gz
rsyslog-87a957b0f5686ec3a50c98f3d1cf3019b636e700.tar.xz
rsyslog-87a957b0f5686ec3a50c98f3d1cf3019b636e700.zip
Merge branch 'v4-stable-solaris' into beta
Conflicts: runtime/Makefile.am runtime/rsyslog.c tests/nettester.c tools/syslogd.c
Diffstat (limited to 'tests/nettester.c')
-rw-r--r--tests/nettester.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/tests/nettester.c b/tests/nettester.c
index 6932381e..e12758a8 100644
--- a/tests/nettester.c
+++ b/tests/nettester.c
@@ -64,7 +64,7 @@ static int iPort = 12514; /* port which shall be used for sending data */
static char* pszCustomConf = NULL; /* custom config file, use -c conf to specify */
static int verbose = 0; /* verbose output? -v option */
static int IPv4Only = 0; /* use only IPv4 in rsyslogd call? */
-static int useDebugEnv = 0; /* activate debugging environment (for rsyslog debug log)? */
+static char **ourEnvp;
/* these two are quick hacks... */
int iFailed = 0;
@@ -226,9 +226,6 @@ int openPipe(char *configFile, pid_t *pid, int *pfd)
char *newargv[] = {"../tools/rsyslogd", "dummy", "-c4", "-u2", "-n", "-irsyslog.pid",
"-M../runtime/.libs:../.libs", NULL, NULL};
char confFile[1024];
- char *newenviron[] = { NULL };
- char *newenvironDeb[] = { "RSYSLOG_DEBUG=debug nostdout",
- "RSYSLOG_DEBUGLOG=log", NULL };
sprintf(confFile, "-f%s/testsuites/%s.conf", srcdir,
(pszCustomConf == NULL) ? configFile : pszCustomConf);
@@ -254,7 +251,7 @@ int openPipe(char *configFile, pid_t *pid, int *pfd)
close(pipefd[1]);
close(pipefd[0]);
fclose(stdin);
- execve("../tools/rsyslogd", newargv, (useDebugEnv) ? newenvironDeb : newenviron);
+ execve("../tools/rsyslogd", newargv, ourEnvp);
} else {
close(pipefd[1]);
*pid = cpid;
@@ -478,7 +475,7 @@ void doAtExit(void)
* of this file.
* rgerhards, 2009-04-03
*/
-int main(int argc, char *argv[])
+int main(int argc, char *argv[], char *envp[])
{
int fd;
int opt;
@@ -487,7 +484,8 @@ int main(int argc, char *argv[])
char buf[4096];
char testcases[4096];
- while((opt = getopt(argc, argv, "4dc:i:p:t:v")) != EOF) {
+ ourEnvp = envp;
+ while((opt = getopt(argc, argv, "4c:i:p:t:v")) != EOF) {
switch((char)opt) {
case '4':
IPv4Only = 1;
@@ -495,9 +493,6 @@ int main(int argc, char *argv[])
case 'c':
pszCustomConf = optarg;
break;
- case 'd':
- useDebugEnv = 1;
- break;
case 'i':
if(!strcmp(optarg, "udp"))
inputMode = inputUDP;