int idle_timeout;
int lazy_init;
int spawning;
+ int trigger; /* do triggering */
fr_connection_t *head, *tail;
pthread_mutex_unlock(&fc->mutex);
+ if (fc->trigger) exec_trigger(NULL, fc->cs, "open");
+
return this;
}
static void fr_connection_close(fr_connection_pool_t *fc,
fr_connection_t *this)
{
+ if (fc->trigger) exec_trigger(NULL, fc->cs, "close");
+
rad_assert(this->used == FALSE);
fr_connection_unlink(fc, this);
fr_connection_close(fc, this);
}
+ if (fc->trigger) exec_trigger(NULL, fc->cs, "stop");
+
rad_assert(fc->head == NULL);
rad_assert(fc->tail == NULL);
rad_assert(fc->num == 0);
goto error;
}
+ if (cf_section_sub_find(cs, "trigger")) fc->trigger = TRUE;
+
/*
* Some simple limits
*/
}
}
+ if (fc->trigger) exec_trigger(NULL, fc->cs, "start");
+
return fc;
}