diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-17 10:14:02 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-17 10:14:02 +0100 |
commit | 9e28d47aaa506709a9e80e318527ceb4443cbffe (patch) | |
tree | ed5eb270261e9afc4bd97645d74c5c9b9dac59ff | |
parent | f868d6a17ab03761852699e95dbb0e401944af05 (diff) | |
download | rsyslog-9e28d47aaa506709a9e80e318527ceb4443cbffe.tar.gz rsyslog-9e28d47aaa506709a9e80e318527ceb4443cbffe.tar.xz rsyslog-9e28d47aaa506709a9e80e318527ceb4443cbffe.zip |
worked a bit on "unlimited select()" patch
- potential segfault in gss-misc.c
- glbl interface needed different version ID
- some compile time warning cleanup
-rw-r--r-- | gss-misc.c | 2 | ||||
-rw-r--r-- | runtime/glbl.h | 8 | ||||
-rw-r--r-- | runtime/unlimited_select.h | 6 |
3 files changed, 12 insertions, 4 deletions
@@ -277,6 +277,7 @@ BEGINObjClassExit(gssutil, OBJ_IS_LOADABLE_MODULE) /* CHANGE class also in END M CODESTARTObjClassExit(gssutil) /* release objects we no longer need */ objRelease(errmsg, CORE_COMPONENT); + objRelease(glbl, CORE_COMPONENT); ENDObjClassExit(gssutil) @@ -287,6 +288,7 @@ ENDObjClassExit(gssutil) BEGINAbstractObjClassInit(gssutil, 1, OBJ_IS_LOADABLE_MODULE) /* class, version - CHANGE class also in END MACRO! */ /* request objects we use */ CHKiRet(objUse(errmsg, CORE_COMPONENT)); + CHKiRet(objUse(glbl, CORE_COMPONENT)); ENDObjClassInit(gssutil) diff --git a/runtime/glbl.h b/runtime/glbl.h index c55c2536..6a332576 100644 --- a/runtime/glbl.h +++ b/runtime/glbl.h @@ -62,14 +62,18 @@ BEGINinterface(glbl) /* name must also be changed in ENDinterface macro! */ /* added v3, 2009-06-30 */ rsRetVal (*GenerateLocalHostNameProperty)(void); prop_t* (*GetLocalHostNameProp)(void); - /* added v4, 2009-11-16 as part of varmojfekoj's "unlimited select()" patch + /* note: v4, v5 are already used by more recent versions, so we need to skip them! */ + /* added v6, 2009-11-16 as part of varmojfekoj's "unlimited select()" patch * Note that it must be always present, otherwise the interface would have different * versions depending on compile settings, what is not acceptable. + * Use this property with care, it is only truly available if UNLIMITED_SELECT is enabled + * (I did not yet further investigate the details, because that code hopefully can be removed + * at some later stage). */ SIMP_PROP(FdSetSize, int) #undef SIMP_PROP ENDinterface(glbl) -#define glblCURR_IF_VERSION 4 /* increment whenever you change the interface structure! */ +#define glblCURR_IF_VERSION 6 /* increment whenever you change the interface structure! */ /* version 2 had PreserveFQDN added - rgerhards, 2008-12-08 */ /* the remaining prototypes */ diff --git a/runtime/unlimited_select.h b/runtime/unlimited_select.h index 61a2baca..32dadc03 100644 --- a/runtime/unlimited_select.h +++ b/runtime/unlimited_select.h @@ -34,10 +34,12 @@ # define FD_ZERO(set) memset((set), 0, glbl.GetFdSetSize()); #endif -void freeFdSet(fd_set *p) { #ifdef USE_UNLIMITED_SELECT +void freeFdSet(fd_set *p) { free(p); -#endif } +#else +# define freeFdSet(x) +#endif #endif /* #ifndef UNLIMITED_SELECT_H_INCLUDED */ |