diff options
author | Richard Mudgett <rmudgett@digium.com> | 2010-06-14 20:51:09 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2010-06-14 20:51:09 +0000 |
commit | fb5fddd9878cb501685b8d0f7860f2151c6574b3 (patch) | |
tree | f421ca5a3655304153fcbe3feb9d4037a47fa259 /channels/sig_ss7.c | |
parent | a806196f79a3e2da48a06d5239aaa77852755b3e (diff) |
Extract sig_ss7_init_linkset() to sig_ss7.
Also found a place where sig_pri_init_pri() was inlined and called it
instead.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@270298 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels/sig_ss7.c')
-rw-r--r-- | channels/sig_ss7.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/channels/sig_ss7.c b/channels/sig_ss7.c index 540b08e81..e3c0278ef 100644 --- a/channels/sig_ss7.c +++ b/channels/sig_ss7.c @@ -1609,6 +1609,28 @@ struct sig_ss7_chan *sig_ss7_chan_new(void *pvt_data, struct sig_ss7_callback *c return pvt; } +/*! + * \brief Initialize the SS7 linkset control. + * \since 1.8 + * + * \param ss7 sig_ss7 SS7 control structure. + * + * \return Nothing + */ +void sig_ss7_init_linkset(struct sig_ss7_linkset *ss7) +{ + int idx; + + memset(ss7, 0, sizeof(*ss7)); + + ast_mutex_init(&ss7->lock); + + ss7->master = AST_PTHREADT_NULL; + for (idx = 0; idx < ARRAY_LEN(ss7->fds); ++idx) { + ss7->fds[idx] = -1; + } +} + /* ------------------------------------------------------------------- */ #endif /* defined(HAVE_SS7) */ |