diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-10-04 12:46:39 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-10-04 12:46:39 +0000 |
commit | 4b9a92bc725f7436b7958e673a9665a90b548e86 (patch) | |
tree | 89bcb1220bb8cbdc9f8671a5ed2124470f566822 | |
parent | e40cb595a2da943483124fae8f215a397add9fca (diff) | |
download | rsyslog-4b9a92bc725f7436b7958e673a9665a90b548e86.tar.gz rsyslog-4b9a92bc725f7436b7958e673a9665a90b548e86.tar.xz rsyslog-4b9a92bc725f7436b7958e673a9665a90b548e86.zip |
omhdfs: fixed some issues with previous commit
-rw-r--r-- | plugins/omhdfs/omhdfs.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/plugins/omhdfs/omhdfs.c b/plugins/omhdfs/omhdfs.c index eefea722..b075432d 100644 --- a/plugins/omhdfs/omhdfs.c +++ b/plugins/omhdfs/omhdfs.c @@ -254,7 +254,6 @@ fileWrite(file_t *pFile, uchar *buf) size_t lenWrite; DEFiRet; - assert(pFile->fh != NULL); if(pFile->nUsers > 1) d_pthread_mutex_lock(&pFile->mut); @@ -391,17 +390,18 @@ BEGINdoHUP file_t *pFile; struct hashtable_itr *itr; CODESTARTdoHUP - /* Iterator constructor only returns a valid iterator if - * the hashtable is not empty */ - itr = hashtable_iterator(files); - if(hashtable_count(files) > 0) - { - do { - pFile = (file_t *) hashtable_iterator_value(itr); - fileClose(pFile); - DBGPRINTF("imuxsock: HUP, closing file %s\n", pFile->name); - } while (hashtable_iterator_advance(itr)); - } + DBGPRINTF("omhdfs: HUP received (file count %d)\n", hashtable_count(files)); + /* Iterator constructor only returns a valid iterator if + * the hashtable is not empty */ + itr = hashtable_iterator(files); + if(hashtable_count(files) > 0) + { + do { + pFile = (file_t *) hashtable_iterator_value(itr); + fileClose(pFile); + DBGPRINTF("omhdfs: HUP, closing file %s\n", pFile->name); + } while (hashtable_iterator_advance(itr)); + } ENDdoHUP |