[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
34a4427fba
commit
1bfb99db66
|
@ -59,7 +59,10 @@ typedef enum {
|
|||
LPWRAP_PRI_EVENT_NOTIFY = PRI_EVENT_NOTIFY,
|
||||
LPWRAP_PRI_EVENT_PROGRESS = PRI_EVENT_PROGRESS,
|
||||
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;
|
||||
|
||||
typedef enum {
|
||||
|
@ -78,7 +81,10 @@ typedef enum {
|
|||
LPWRAP_PRI_SWITCH_NI1 = PRI_SWITCH_NI1,
|
||||
LPWRAP_PRI_SWITCH_GR303_EOC = PRI_SWITCH_GR303_EOC,
|
||||
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;
|
||||
|
||||
typedef enum {
|
||||
|
@ -88,7 +94,6 @@ typedef enum {
|
|||
struct lpwrap_pri;
|
||||
typedef int (*event_handler)(struct lpwrap_pri *, lpwrap_pri_event_t, pri_event *);
|
||||
typedef int (*loop_handler)(struct lpwrap_pri *);
|
||||
#define MAX_EVENT 18
|
||||
|
||||
struct lpwrap_pri {
|
||||
struct pri *pri;
|
||||
|
@ -96,7 +101,7 @@ struct lpwrap_pri {
|
|||
zap_channel_t *dchan;
|
||||
unsigned int flags;
|
||||
void *private_info;
|
||||
event_handler eventmap[MAX_EVENT+1];
|
||||
event_handler eventmap[LPWRAP_PRI_EVENT_MAX];
|
||||
loop_handler on_loop;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue