summaryrefslogtreecommitdiff
path: root/include/asterisk
diff options
context:
space:
mode:
authorTerry Wilson <twilson@digium.com>2012-02-22 21:22:43 +0000
committerTerry Wilson <twilson@digium.com>2012-02-22 21:22:43 +0000
commit0cc38858dd00300f3593856559eea48941c382cb (patch)
tree8f40a20a35c3081351f9d9e2e6eae4fb1d9f5acb /include/asterisk
parent25a9b03cd18e3ad602bcefde85d947035b195018 (diff)
Track module use count for res_calendar
If the res_calendar module was followed immediately by one of the calendar tech modules and "core stop gracefully" was run, Asterisk would crash. This patch adds use count tracking for res_calendar so that it is unloaded after the tech modules when shutting down gracefully. It is now not possible to unload all the of the calendar modules via "module unload res_calednar.so", but it is still possible to unload them all via "module unload -h res_calendar.so". Review: https://reviewboard.asterisk.org/r/1752/ ........ Merged revisions 356291 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 356297 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk')
-rw-r--r--include/asterisk/calendar.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/asterisk/calendar.h b/include/asterisk/calendar.h
index a02570bf3..da4af01ef 100644
--- a/include/asterisk/calendar.h
+++ b/include/asterisk/calendar.h
@@ -25,6 +25,7 @@
#include "asterisk/linkedlists.h"
#include "asterisk/lock.h"
#include "asterisk/dial.h"
+#include "asterisk/module.h"
/*! \file calendar.h
* \brief A general API for managing calendar events with Asterisk
@@ -69,6 +70,7 @@ struct ast_calendar_tech {
const char *type;
const char *description;
const char *module;
+ struct ast_module_user *user;
int (* is_busy)(struct ast_calendar *calendar); /*!< Override default busy determination */
void *(* load_calendar)(void *data); /*!< Create private structure, add calendar events, etc. */
void *(* unref_calendar)(void *obj); /*!< Function to be called to free the private structure */