diff options
author | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-01-02 17:55:09 +0000 |
---|---|---|
committer | kpfleming <kpfleming@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-01-02 17:55:09 +0000 |
commit | b5bf71ba2cf12f107a3c4568cd58a3232a3d110d (patch) | |
tree | 977ea3816bcd03f0e4232b0b711dd297c601768a /hpec/hpec_zaptel.h | |
parent | ac6076ce76398b1099503714ff1afd7e0a332d4c (diff) |
bring back the echocan-params code that was removed in r3545, this time with a small change made to ensure backwards compatibility with existing applications at both the binary and source code level
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@3589 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'hpec/hpec_zaptel.h')
-rw-r--r-- | hpec/hpec_zaptel.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/hpec/hpec_zaptel.h b/hpec/hpec_zaptel.h index 80004da..2fb5a14 100644 --- a/hpec/hpec_zaptel.h +++ b/hpec/hpec_zaptel.h @@ -87,18 +87,22 @@ static inline void echo_can_array_update(struct echo_can_state *ec, short *iref, DECLARE_MUTEX(alloc_lock); -static inline struct echo_can_state *echo_can_create(int len, int adaption_mode) +static int echo_can_create(struct zt_echocanparams *ecp, struct zt_echocanparam *p, + struct echo_can_state **ec) { - struct echo_can_state *result = NULL; + if (ecp->param_count > 0) { + printk(KERN_WARNING "HPEC does not support parameters; failing request\n"); + return -EINVAL; + } if (down_interruptible(&alloc_lock)) - return NULL; + return -ENOTTY; - result = hpec_channel_alloc(len); + *ec = hpec_channel_alloc(ecp->tap_length); up(&alloc_lock); - return result; + return *ec ? 0 : -ENOTTY; } static inline int echo_can_traintap(struct echo_can_state *ec, int pos, short val) |