diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-06-09 12:40:54 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-06-09 12:40:54 +0200 |
commit | 55e01da2ec3de1b5c6b15e4154235f0eedbb68da (patch) | |
tree | fe7b9b9b114c982d1453a363499bad9fa323fd1a /runtime/nsd_gtls.c | |
parent | cf51333f7617e586ca1d4cf5202e3d42f14c96ea (diff) | |
download | rsyslog-55e01da2ec3de1b5c6b15e4154235f0eedbb68da.tar.gz rsyslog-55e01da2ec3de1b5c6b15e4154235f0eedbb68da.tar.bz2 rsyslog-55e01da2ec3de1b5c6b15e4154235f0eedbb68da.zip |
somewhat improved plain tcp syslog reliability
...by doing a connection check before sending. Credits to Martin
Schuette for providing the idea. Details are available at
http://blog.gerhards.net/2008/06/reliable-plain-tcp-syslog-once-again.html
Diffstat (limited to 'runtime/nsd_gtls.c')
-rw-r--r-- | runtime/nsd_gtls.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/nsd_gtls.c b/runtime/nsd_gtls.c index 0440f149..567701dc 100644 --- a/runtime/nsd_gtls.c +++ b/runtime/nsd_gtls.c @@ -1243,6 +1243,17 @@ finalize_it: } +/* This function checks if the connection is still alive - well, kind of... + * This is a dummy here. For details, check function common in ptcp driver. + * rgerhards, 2008-06-09 + */ +static void +CheckConnection(nsd_t __attribute__((unused)) *pNsd) +{ + /* dummy, do nothing */ +} + + /* get the remote hostname. The returned hostname must be freed by the caller. * rgerhards, 2008-04-25 */ @@ -1507,6 +1518,7 @@ CODESTARTobjQueryInterface(nsd_gtls) pIf->SetMode = SetMode; pIf->SetAuthMode = SetAuthMode; pIf->SetPermPeers =SetPermPeers; + pIf->CheckConnection = CheckConnection; pIf->GetRemoteHName = GetRemoteHName; pIf->GetRemoteIP = GetRemoteIP; finalize_it: |