mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-02-05 18:44:54 +00:00
[ozmod_libpri] Fix array out of bounds error and clean up some enums in lpwrap_pri.h
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@737 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
385fa17732
commit
5954416c96
@ -59,7 +59,10 @@ typedef enum {
|
|||||||
LPWRAP_PRI_EVENT_NOTIFY = PRI_EVENT_NOTIFY,
|
LPWRAP_PRI_EVENT_NOTIFY = PRI_EVENT_NOTIFY,
|
||||||
LPWRAP_PRI_EVENT_PROGRESS = PRI_EVENT_PROGRESS,
|
LPWRAP_PRI_EVENT_PROGRESS = PRI_EVENT_PROGRESS,
|
||||||
LPWRAP_PRI_EVENT_KEYPAD_DIGIT = PRI_EVENT_KEYPAD_DIGIT,
|
LPWRAP_PRI_EVENT_KEYPAD_DIGIT = PRI_EVENT_KEYPAD_DIGIT,
|
||||||
LPWRAP_PRI_EVENT_IO_FAIL = 19
|
LPWRAP_PRI_EVENT_IO_FAIL = 19,
|
||||||
|
|
||||||
|
/* don't touch */
|
||||||
|
LPWRAP_PRI_EVENT_MAX
|
||||||
} lpwrap_pri_event_t;
|
} lpwrap_pri_event_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -78,7 +81,10 @@ typedef enum {
|
|||||||
LPWRAP_PRI_SWITCH_NI1 = PRI_SWITCH_NI1,
|
LPWRAP_PRI_SWITCH_NI1 = PRI_SWITCH_NI1,
|
||||||
LPWRAP_PRI_SWITCH_GR303_EOC = PRI_SWITCH_GR303_EOC,
|
LPWRAP_PRI_SWITCH_GR303_EOC = PRI_SWITCH_GR303_EOC,
|
||||||
LPWRAP_PRI_SWITCH_GR303_TMC = PRI_SWITCH_GR303_TMC,
|
LPWRAP_PRI_SWITCH_GR303_TMC = PRI_SWITCH_GR303_TMC,
|
||||||
LPWRAP_PRI_SWITCH_QSIG = PRI_SWITCH_QSIG
|
LPWRAP_PRI_SWITCH_QSIG = PRI_SWITCH_QSIG,
|
||||||
|
|
||||||
|
/* don't touch */
|
||||||
|
LPWRAP_PRI_SWITCH_MAX
|
||||||
} lpwrap_pri_switch_t;
|
} lpwrap_pri_switch_t;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -88,7 +94,6 @@ typedef enum {
|
|||||||
struct lpwrap_pri;
|
struct lpwrap_pri;
|
||||||
typedef int (*event_handler)(struct lpwrap_pri *, lpwrap_pri_event_t, pri_event *);
|
typedef int (*event_handler)(struct lpwrap_pri *, lpwrap_pri_event_t, pri_event *);
|
||||||
typedef int (*loop_handler)(struct lpwrap_pri *);
|
typedef int (*loop_handler)(struct lpwrap_pri *);
|
||||||
#define MAX_EVENT 18
|
|
||||||
|
|
||||||
struct lpwrap_pri {
|
struct lpwrap_pri {
|
||||||
struct pri *pri;
|
struct pri *pri;
|
||||||
@ -96,7 +101,7 @@ struct lpwrap_pri {
|
|||||||
zap_channel_t *dchan;
|
zap_channel_t *dchan;
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
void *private_info;
|
void *private_info;
|
||||||
event_handler eventmap[MAX_EVENT+1];
|
event_handler eventmap[LPWRAP_PRI_EVENT_MAX];
|
||||||
loop_handler on_loop;
|
loop_handler on_loop;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user