summaryrefslogtreecommitdiffstats
path: root/include/osmocom/vty
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-10 20:21:33 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-10-10 20:21:33 +0200
commit2c9168cf34d370b4ea2b21177402d01a7cfffea8 (patch)
tree16f3935dc484a58ca2a2477a7acc129c5437ca22 /include/osmocom/vty
parent4cb8b94db8180e84a55c3ef88044507111077783 (diff)
vty: Make vty_event dispatch signals and use it in the testcase
The testcase didn't work on Ubuntu 12.04 because vty_create will directly call vty_event (e.g. not through the plt). This means that the approach to override vty_event in the testcase failed. Use the signal interface of libosmocore and make the testcase use it. The signals can be generally useful as well.
Diffstat (limited to 'include/osmocom/vty')
-rw-r--r--include/osmocom/vty/vty.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/osmocom/vty/vty.h b/include/osmocom/vty/vty.h
index e656abf6..ea987bf3 100644
--- a/include/osmocom/vty/vty.h
+++ b/include/osmocom/vty/vty.h
@@ -190,6 +190,20 @@ extern void *tall_vty_ctx;
extern struct cmd_element cfg_description_cmd;
extern struct cmd_element cfg_no_description_cmd;
+
+/**
+ * signal handling
+ */
+enum signal_vty {
+ S_VTY_EVENT,
+};
+
+struct vty_signal_data {
+ enum event event;
+ int sock;
+ struct vty *vty;
+};
+
/*! @} */
#endif