Summary: | ASTERISK-07054: [patch] pri_event_hangup structure fields not always initialized | ||
Reporter: | Frederic LE FOLL (flefoll) | Labels: | |
Date Opened: | 2006-05-30 07:04:04 | Date Closed: | 2006-06-01 13:01:36 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Core/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) patch_ev_hangup_1.2.2.txt ( 1) patch_ev_hangup_q931.c_rev328.txt | |
Description: | q931.c fills in pri->ev.hangup structure before generating a PRI_EVENT_HANGUP or PRI_EVENT_HANGUP_ACK event. But all structure fields are not systematically filled in, especially ev.hangup.aoc_units and ev.hangup.useruserinfo, which may lead to unpredictible results when chan_zap.c receives the event. For instance, chan_zap may trace a "span 1 received AOC-E charging 0 units" or "span 1 received AOC-E charging [some weird value] units". This is a bit difficult to reproduce, because the contents of union pri->ev depends on previous events on the link. Additionnally (not a bug ... yet), q931.c uses libpri_copy_string to set ev.hangup.useruserinfo, but the length parameter is sizeof(ev.ring.useruserinfo) : this is a copy/paste problem, and it does not really matter ... as long as useruserinfo size is 260 in all pri_event_<something> structures. I propose a patch for Asterisk 1.2.7.1 (i.e. libpri 1.2.2) and a patch for SVN trunk head (q931.c revision 328). The patch fixes : - ev.hangup fields initialization - libpri_copy_string(pri->ev...) 3rd parameter | ||
Comments: | By: Matthew Fredrickson (mattf) 2006-06-01 13:00:48 Put in 1.2 and trunk |