#include "cbdata.h"
#include "comm/forward.h"
#include "dlink.h"
-#include "ip/Address.h"
#include "HelperChildConfig.h"
#include "HelperReply.h"
+#include "ip/Address.h"
class helper_request;
class helper
{
public:
- inline helper(const char *name) : cmdline(NULL), id_name(name), eom('\n'), url_quoting(false) {}
+ inline helper(const char *name) :
+ cmdline(NULL),
+ id_name(name),
+ ipc_type(0),
+ last_queue_warn(0),
+ last_restart(0),
+ eom('\n') {
+ memset(&stats, 0, sizeof(stats));
+ }
~helper();
public:
time_t last_queue_warn;
time_t last_restart;
char eom; ///< The char which marks the end of (response) message, normally '\n'
- bool url_quoting;
struct _stats {
int requests;
class statefulhelper : public helper
{
public:
- inline statefulhelper(const char *name) : helper(name) {};
+ inline statefulhelper(const char *name) : helper(name), datapool(NULL), IsAvailable(NULL), OnEmptyQueue(NULL) {};
inline ~statefulhelper() {};
public:
dlink_node link;
struct _helper_flags {
- unsigned int busy:1;
- unsigned int writing:1;
- unsigned int closing:1;
- unsigned int shutdown:1;
- unsigned int reserved:1;
+ bool busy;
+ bool writing;
+ bool closing;
+ bool shutdown;
+ bool reserved;
} flags;
struct {