summaryrefslogtreecommitdiffstats
path: root/runtime/net.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-04-17 10:58:30 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-04-17 10:58:30 +0200
commite1791996b81b486e53a36ec753c3bb595f671983 (patch)
tree67f468124cda86d5898a755b9026c8b936925bed /runtime/net.c
parent4824e56aed37b5edffc883cb53c91f0b61c3df62 (diff)
downloadrsyslog-e1791996b81b486e53a36ec753c3bb595f671983.tar.gz
rsyslog-e1791996b81b486e53a36ec753c3bb595f671983.tar.xz
rsyslog-e1791996b81b486e53a36ec753c3bb595f671983.zip
moved host/domain-name related variables to global data pool
Diffstat (limited to 'runtime/net.c')
-rw-r--r--runtime/net.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/runtime/net.c b/runtime/net.c
index bc4404cb..777d3fad 100644
--- a/runtime/net.c
+++ b/runtime/net.c
@@ -55,7 +55,6 @@
#include <fcntl.h>
#include <unistd.h>
-#include "dirty.h"
#include "syslogd-types.h"
#include "module-template.h"
#include "parse.h"
@@ -814,7 +813,7 @@ rsRetVal cvthname(struct sockaddr_storage *f, uchar *pszHost, uchar *pszHostFQDN
*/
strcpy((char*)pszHost, (char*)pszHostFQDN);
if ((p = (uchar*) strchr((char*)pszHost, '.'))) { /* find start of domain name "machine.example.com" */
- if(strcmp((char*) (p + 1), LocalDomain) == 0) {
+ if(strcmp((char*)(p + 1), (char*)glbl.GetLocalDomain()) == 0) {
*p = '\0'; /* simply terminate the string */
} else {
/* now check if we belong to any of the domain names that were specified
@@ -823,10 +822,10 @@ rsRetVal cvthname(struct sockaddr_storage *f, uchar *pszHost, uchar *pszHostFQDN
* For proper modularization, this must be done different, e.g. via a
* "to be stripped" property of *this* object itself.
*/
- if (StripDomains) {
+ if(glbl.GetStripDomains() != NULL) {
count=0;
- while (StripDomains[count]) {
- if (strcmp((char*)(p + 1), StripDomains[count]) == 0) {
+ while(glbl.GetStripDomains()[count]) {
+ if (strcmp((char*)(p + 1), glbl.GetStripDomains()[count]) == 0) {
*p = '\0';
FINALIZE; /* we are done */
}
@@ -842,10 +841,10 @@ rsRetVal cvthname(struct sockaddr_storage *f, uchar *pszHost, uchar *pszHostFQDN
* still occurs at *p, which points at the first dot after the hostname.
* TODO: this must also go away - see comment above -- rgerhards, 2008-04-16
*/
- if (LocalHosts) {
+ if(glbl.GetLocalHosts() != NULL) {
count=0;
- while (LocalHosts[count]) {
- if (!strcmp((char*)pszHost, LocalHosts[count])) {
+ while (glbl.GetLocalHosts()[count]) {
+ if (!strcmp((char*)pszHost, (char*)glbl.GetLocalHosts()[count])) {
*p = '\0';
break; /* we are done */
}