Commit b466804e authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Oh, yuck. Still have that hardwired max on number of agents, which

Shashi just went by. I bumped the number and added a check for too
many to avoid the core dump. Need a watchdog for this, but I had to
churn another process just for that.
parent a344b58c
...@@ -35,7 +35,7 @@ static int debug; ...@@ -35,7 +35,7 @@ static int debug;
static void cleanup(void); static void cleanup(void);
static void quit(int); static void quit(int);
#define MAXAGENTS 100 #define MAXAGENTS 200
static struct { static struct {
char nodeid[TBDB_FLEN_NODEID]; char nodeid[TBDB_FLEN_NODEID];
char vnode[TBDB_FLEN_VNAME]; char vnode[TBDB_FLEN_VNAME];
...@@ -362,6 +362,9 @@ get_static_events(event_handle_t handle) ...@@ -362,6 +362,9 @@ get_static_events(event_handle_t handle)
if (! mydb_nodeidtoip(row[2], agents[numagents].ipaddr)) if (! mydb_nodeidtoip(row[2], agents[numagents].ipaddr))
continue; continue;
numagents++; numagents++;
if (numagents >= MAXAGENTS) {
fatal("Too many agents!");
}
} }
mysql_free_result(res); mysql_free_result(res);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment