aboutsummaryrefslogtreecommitdiffstats
path: root/include/asterisk/manager.h
diff options
context:
space:
mode:
authorrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-03 18:53:26 +0000
committerrizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b>2006-11-03 18:53:26 +0000
commit3094fdaa97a857786295f6bca40a6cab3d3feecb (patch)
tree04ed5d0fa33ec0abc3bb77ba77e1c4ceb7b74233 /include/asterisk/manager.h
parent8723b738452bfbf2c84cb13cbbe4a27a24bcfb3a (diff)
add a new cli/manager.conf option "debug" to enable/disable
debugging code in the manager. At the moment the debugging code is very lightweight, if the option is enabled manager messages also carry a sequence number and the info where they have been generated e.g. SequenceNumber: 10 File: chan_sip.c Line: 11927 Func: handle_response_register It is not worthwhile having this as a compile time option right now, because the extra work involved at runtime is just checking one variable. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47132 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include/asterisk/manager.h')
-rw-r--r--include/asterisk/manager.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/asterisk/manager.h b/include/asterisk/manager.h
index 68c2fed2d..6a44ab912 100644
--- a/include/asterisk/manager.h
+++ b/include/asterisk/manager.h
@@ -111,8 +111,14 @@ int ast_manager_unregister( char *action );
\param event Event name
\param contents Contents of event
*/
-int manager_event(int category, const char *event, const char *contents, ...)
- __attribute__ ((format (printf, 3,4)));
+/* XXX the parser in gcc 2.95 gets confused if you don't put a space
+ * between the last arg before VA_ARGS and the comma */
+#define manager_event(category, event, contents , ...) \
+ __manager_event(category, event, __FILE__, __LINE__, __PRETTY_FUNCTION__, contents , ## __VA_ARGS__)
+
+int __manager_event(int category, const char *event,
+ const char *file, int line, const char *func, const char *contents, ...)
+ __attribute__ ((format (printf, 6,7)));
/*! Get header from mananger transaction */
char *astman_get_header(struct message *m, char *var);