Commit Graph

86 Commits

Author SHA1 Message Date
Richard Mudgett
d1cac6352a Fix I-frame retransmission quirks.
Revamped the I-frame retransmission queue to better comply with Q.921:
Figure B.7/Q.921 (sheet 1 of 10) and Figure B.9/Q.921 (Sheet 5 of 5).  The
changes prevent retransmitting I-frames when the peer is busy (RNR) (Q.921
Section 5.6.5) and eliminate an unnecessary delay sending new I-frames
after an I-frame retransmission.

Related to JIRA LIBPRI-60


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2200 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2011-02-14 23:33:56 +00:00
Richard Mudgett
82a0a8e2ab Enable LIBPRI_COUNTERS code by default.
Removed the conditional LIBPRI_COUNTERS to include the code
unconditionally.

Patches:
      enable_LIBPRI_COUNTERS_LIBPRI-61.diff uploaded by jbigelow

JIRA LIBPRI-61


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2183 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2011-02-01 00:37:49 +00:00
Richard Mudgett
517e5ac5ce Asterisk is getting a "No D-channels available!" warning message every 4 seconds.
For PTP links, libpri generated the PRI_EVENT_DCHAN_DOWN event every time
it failed to bring layer 2 up because the physical layer is down.

For PTP links, made generate the PRI_EVENT_DCHAN_UP/PRI_EVENT_DCHAN_DOWN
only when it enters/exits the Q.921 superstate consisting of states
7(Q921_MULTI_FRAME_ESTABLISHED) and 8(Q921_TIMER_RECOVERY).

Also changed the PTP link restart delay to be link specific instead of D
channel specific because the GR-303 PTP switch types have more than one
Q.921 link.

(closes issue #17270)
Reported by: jmls


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2113 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-11-12 02:31:24 +00:00
Richard Mudgett
12805eb71f SABME flood on backup D-channel in NFAS configuration.
Made delay restarting the PTP layer 2 link by the T200 time instead of
immediately.  Q.921 does not specify any particular time to restart the
layer 2 link.  Q.921 leaves it up to the upper layers to decide when or if
another attempt to bring layer 2 up is made.  Earlier versions of libpri
used the T200 time to restart the link.

This is a reimplementaion of -r1878.

(closes issue #18255)
Reported by: bklang

JIRA SWP-2508


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2111 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-11-11 00:30:33 +00:00
Richard Mudgett
d2984ee7eb Minor MDL handler changes.
* Clear mdl_error in case we could not schedule the handler callback.

* Change MDL handlers to not return the handled state since the caller did
not care.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2109 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-11-10 23:47:45 +00:00
Richard Mudgett
230e2d9013 Added TEI identity check feature to reclaim dead TEIs.
This is the new feature portion of JIRA LIBPRI-51/SWP-2453.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2105 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-11-05 20:05:25 +00:00
Richard Mudgett
de0bf0b50e Q.921 TEI assignment procedure corrections.
* We should send the TEI identity denied message with TEI=127 when the TEI
pool is exhausted.

* We should remove our TEI if we see a TEI identity assign message
assigning our TEI to someone else.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2104 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-11-05 19:59:45 +00:00
Richard Mudgett
f7866a2de8 Convert TEI identity defines to enum and create 2str() function.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2103 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-11-05 19:48:00 +00:00
Richard Mudgett
8db67a915d Remove unneeded struct q921_link.mdl_error_state member.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2102 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-11-05 19:35:15 +00:00
Richard Mudgett
948625318a Remove all TEIs when NT PTMP starts.
Remove all TEIs when a NT PTMP link is started and there are no other
links to make sure there are no devices that think they have a TEI.  A
device may think it has a TEI if the upper layer program is restarted or
the system reboots.

This fixes the bug portion of JIRA LIBPRI-51/SWP-2453.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2101 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-11-05 19:24:01 +00:00
Richard Mudgett
69694554fb Mainly put space after switch and while keywords.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2098 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-11-05 19:02:42 +00:00
Richard Mudgett
33aafe9b5a B410P gets incoming call packets on ISDN but Asterisk doesn't see the call.
The Cisco 1751 with VIC 2-BRI ports sends out SETUP messages on the
broadcast TEI as if the BRI were PTMP even though it is configured for PTP
mode.

Make PTP mode also accept frames on SAPI=0, TEI=127 (Broadcast).

(closes issue #18232)
Reported by: lelio
Patches:
      issue18232_v1.4.patch uploaded by rmudgett (license 664)
Tested by: lelio


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2088 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-11-02 19:11:01 +00:00
Richard Mudgett
f9c3c8d026 Extract the layer 2 link structure out of struct pri.
This completes the layer 2 link and Q.931 call control restructuring.
Some code is now simplified since there is only one D channel control
structure and the amount of allocated memory is reduced.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2077 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-10-21 17:30:41 +00:00
Richard Mudgett
53c142990f Restructure the Q.931 call record to layer 2 link association.
This is in anticipation of extracting a layer 2 link structure out of
struct pri.

Also completes fixing timer value access for the rest of libpri.  The
timer access must always be on the D channel control structure (Master).

May have fixed some events from timeouts not being passed to the upper
layer.  The timeout events must always be on the D channel control
structure (Master).


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2070 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-10-21 16:37:10 +00:00
Richard Mudgett
cd588eccce Logically separate Q.921 TEI link processing from D channel control.
This is in anticipation of extracting a layer 2 link structure out of
struct pri.

Also fixes Q.921 timer value access.  The timer access must always be on
the D channel control structure (Master).


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2063 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-10-21 16:14:54 +00:00
Richard Mudgett
cf456d41e2 Dump Q.931 message using the TEI value the message came in with.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@2042 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-10-16 04:34:39 +00:00
Richard Mudgett
384ae1e688 PRI links do not retain active calls if the link comes back before T309 expires.
The DL-ESTABLISH confirm event was not passed from Q.921 to Q.931 so Q.931
never cancelled the T309 timer.

Refactored q931_dl_tei_removal() and q931_dl_indication() into
q931_dl_event() to allow the DL-ESTABLISH confirm/indication and
DL-RELEASE confirm/indication events to be passed to Q.931.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1991 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-09-13 21:21:37 +00:00
Richard Mudgett
05158ec5fb BRI PTMP: Active channels not cleared when the interface goes down.
If the connection to the terminal is lost while there are open channels
on the interface, red alarm is reported, but the open channels are never
cleared.  Additionally, if you manually try to channel request hangup,
Asterisk crashes.

For PTMP, the T309 processing was not searching the call pool on the
master control record.  Additionally, for NT PTMP, the timeout events were
not passed to the upper layer because the events were not put on the
master control record where timer processing expects them.

(closes issue #17865)
Reported by: wimpy
Patches:
      issue17865_v1.4.patch uploaded by rmudgett (license 664)
Tested by: rmudgett, wimpy


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1982 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-09-13 16:07:24 +00:00
Richard Mudgett
c20f34992a Made Q.921 delay events to Q.931 if the event could immediately generate response frames.
Q.921 was passing a q931_dl_indication(up) event to Q.931 before it was
finished processing the frame.  The q931_dl_indication(up) event could
immediately send STATUS messages in the Q.921 intermediate state that
would then get stuck in the tx queue with an invalid N(S).

Q.921 was passing i-frames to Q.931 before it was finished processing the
frame.  The i-frames could cause Q.931 to immediately generate a response
message that may cause the peer to see the P/F bit as incorrect.

Delayed passing q931_dl_indication(up) events and i-frames to Q.931 until
Q.921 has completed processing the frame event.  (The Q.921 SDL diagrams
were designed with this assumption.)

(closes issue #17360)
Reported by: shawkris
Patches:
      issue17360_v1.4.patch uploaded by rmudgett (license 664)
Tested by: shawkris, rmudgett


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1962 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-09-08 00:13:24 +00:00
Richard Mudgett
ab32336b09 Reduced fake MDL-ERROR (Z) message severity to be visible only when debugging enabled.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1929 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-08-30 20:49:11 +00:00
Richard Mudgett
0089f4777a Q.921/Q.931 message debug output improvements.
The Q.931 message decode debug output now will follow the correct Q.921
header decode if Q.921 message dumping is enabled.  Also the Q.931 message
decode will happen when the message actually goes out on the line instead
of when Q.931 passes the message to Q.921.  Q.921 may have to request a
TEI, bring the connection up, or retransmit previous frames before it can
actually send the new message.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1928 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-08-30 20:30:59 +00:00
Richard Mudgett
1fba74a1d5 Q.921 improvements from comparing Q.921 SDL diagrams with implementation.
* Handle sending and receiving DM response frames as needed.

* Added handling of received FRMR frames.

* Completed implementation of Q921_AWAITING_RELEASE state.  (State is
currently unreachable since we have no API to initiate sending the DISC
message.)

* Better NT PTMP TEI allocation.

* Reduced more ERROR level severity messages so users will stop panicking
when they see ERROR.  This is especially true for the Q.921 MDL-ERROR
messages.

* Added better Q.921 visibility when normal debug message level is enabled.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1923 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-08-30 19:31:46 +00:00
Richard Mudgett
da0b057536 ISDN BRI does not recover from line faults
Q.921 was getting stuck in state 2 (Q921_ASSIGN_AWAITING_TEI).  For some
reason the network was removing the TEI.  Libpri then immediately tried to
get a new TEI assigned.  The network did not reply to the N202(3) attempts
to get a new TEI.  Libpri then just gave up trying but did not leave the
state.  Some paths in Q.921 Figure B.3 were not implemented.

Q.921 now transitions to the Q921_TEI_UNASSIGNED state when the N202 count
is exceeded.  Q.921 will wait there until an incoming or outgoing call is
attempted.

* Fixed initializing the n202_counter.  Not initializing the n202_counter
would cause the Q921_TEI_IDENTITY_REQUEST to unexpectedly not go out and
due to how state transitions were done, Q.921 would get stuck in the
Q921_ASSIGN_AWAITING_TEI state.

* Fixed start T202 timer fail causing Q.921 to get stuck in the
Q921_ASSIGN_AWAITING_TEI state if the network did not respond to the
request.

* Fixed handling of Q921_TEI_IDENTITY_REMOVE to do the MDL-REMOVE
primitive (q921_mdl_remove()) instead of transitioning directly to the
Q921_TEI_UNASSIGNED state.  Necessary state clean-up was not getting done.

* Minor tweaks to q921_mdl_remove().  The worst problem was erroneously
generating an error message.

* Fixed potential for sending I-frames with an invalid TEI.  The I-frame
could have been queued when Q.921 did not have an assigned TEI.

* Fixed testing of the q931_receive() return value when a UI-frame is
received.

(closes issue #17570)
Reported by: jcovert
Patches:
      issue17570_v1.4.11.3_v3.patch uploaded by rmudgett (license 664)
      issue17570_v1.4_v3.patch uploaded by rmudgett (license 664)
Tested by: jcovert, rmudgett


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1918 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-08-30 17:53:33 +00:00
Richard Mudgett
b612ee46c1 Don't silently fail to post our fake MDL-ERROR(Z).
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1883 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-08-25 16:38:29 +00:00
Matthew Fredrickson
b83fc0c33f Add silly fake MDL error Z for kicking L2 to reactivate if a DISC or DM is received in proper states on PTP links.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1878 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-08-23 22:13:44 +00:00
Richard Mudgett
9d1fa7f276 Learn (AGAIN!) why state 7 and state 8 transitions were suppressed.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1852 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-08-06 18:22:39 +00:00
Richard Mudgett
fc203e3101 Improved Q.921/Q.931 debug output.
* Debug output for a sent Q.931 message in TE PTMP now uses the best
available TEI number instead of always using 127.  It could still be wrong
if layer 2 does not have a TEI assigned.

* Q.921 debug output is grouped better so a decoded message is not split
by a blank line.

* The Q.921 state is also decoded to a name.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1848 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-08-03 23:04:52 +00:00
Richard Mudgett
5372776ef0 Q921_TIMER_RECOVERY SDL issue in q921_rnr_rx()
Added missing code specified by Q.921 (Figure B.8 Page 85) when receive
RNR in "Timer Recovery" state.

(closes issue #16791)
Reported by: alecdavis
Patches:
      rnr_timer_recovery.diff.txt uploaded by alecdavis (license 585)


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1845 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-08-03 17:33:54 +00:00
Richard Mudgett
589ea41f86 Renamed local struct pri *pri variables to struct pri *ctrl in q921.c.
The context tagging for my editor is much happier now that the struct and
the variable do not have the same name.  (At least for this file.)


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1842 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-08-02 18:47:10 +00:00
Matthew Fredrickson
3d5f9e762a It's amazing what a tiny bug in the Q.921 SDL diagram can do to cause trouble.... Fix issue where V_R was not reset and N_R was consequentially transmitted incorrectly. Particularly in layer 2 initiated re-establishments.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1702 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-05-19 21:30:34 +00:00
Richard Mudgett
ca0fc1a99d Avoid using a cast.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1665 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-04-26 16:59:05 +00:00
Richard Mudgett
7babaeb2fe Fix potential crash when pridump.c calls q921_dump() with NULL pri ptr.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1625 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-04-19 22:08:50 +00:00
Richard Mudgett
d5d69dddac Miscellaneous simple reorganization.
1) Make PRI_MASTER() no longer check for a NULL parameter.  It is the
caller's responsibility.  Not many callers could have passed a NULL
without crashing before or after anyway.

2) Replace calls to q931_is_ptmp() with PTMP_MODE().  They were
equivalent.

3) Made the following boolean config options bit fields: sendfacility,
overlapdial, chan_mapping_logical, and service_message_support.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1534 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-03-17 17:47:53 +00:00
Richard Mudgett
68a107a3e3 Restore ability to change the Q.921 K value.
The Q.921 rewrite only used value of PRI_TIMER_K right after it was set to
the default.  The Q.921 window size was thus no longer alterable by the
user.

(closes issue #16909)
Reported by: alecdavis
Patches:
      pritimer.libpri.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1511 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-03-02 23:47:12 +00:00
Matthew Fredrickson
9d9412e681 Revert useless check of pri->t200_timer value, since scheduler routines check the value anyways.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1476 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-02-08 23:29:51 +00:00
Matthew Fredrickson
a09da00b0a Make sure we set the l3initiated flag when PTP links are attempted to be re-established
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1470 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-02-08 22:14:17 +00:00
Matthew Fredrickson
6443238ed0 Sense of statement was inverted from what it should have been. Might have caused false T200 operation on reception of I-frames.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1457 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-01-29 21:55:52 +00:00
Richard Mudgett
f80fa82b33 Only set eres if there actually is an event to pass up.
(issue 16713)


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1451 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-01-29 19:32:58 +00:00
Matthew Fredrickson
3995397fa3 Fix bug in which an event was lost if an I-frame was received during a timer recovery state (related to #16713)
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1445 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-01-29 17:27:43 +00:00
Richard Mudgett
cec71a81e5 Don't be so noisy when D channel is down.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1439 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-01-26 21:04:48 +00:00
Richard Mudgett
7dd6494c61 Fix TE PTMP side sending FACILITY messages on the dummy call reference.
Only the NT PTMP side can send Q.931 broadcast messages.

Also removed an inaccurate comment in Q.921 and made
q921_mdl_handle_error_callback() call the correct struct pri free
function.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1426 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-01-19 21:53:31 +00:00
Richard Mudgett
79fbecc5ae Make some debugging messages conditional and some minor reformating changes.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1414 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-01-15 18:28:54 +00:00
Matthew Fredrickson
4d3bb14731 Merge of Q.921 rewrite branch for wider testing.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1406 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2010-01-13 19:37:59 +00:00
Matthew Fredrickson
80c8c46b89 Make sure we also revive links for PRIs, not just PTMP TE BRIs when we get a disconnect message
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1291 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-11-11 00:22:47 +00:00
Matthew Fredrickson
44ad020fe8 Re-add back in support for TE initiated layer 2 activation
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1276 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-11-10 20:25:02 +00:00
Richard Mudgett
a2dcb6adba Add BRI PTMP NT mode, HOLD/RETRIEVE, Call rerouting/deflection, and keypad facility support.
* Added support for BRI PTMP NT mode.  (Overlap dialing NT -> TE not supported.)
* Added handling of received HOLD/RETRIEVE messages and the optional ability
  to transfer a held call on disconnect similar to an analog phone.
* Added CallRerouting/CallDeflection support for Q.SIG, ETSI PTP, ETSI PTMP.
  Will reroute/deflect an outgoing call when receive the message.
  Can use the DAHDISendCallreroutingFacility to send the message for the
  supported switches.
* Added ability to send/receive keypad digits in the SETUP message.
  Send keypad digits in SETUP message: Dial(DAHDI/g1[/K<keypad_digits>][/extension])
  Access any received keypad digits in SETUP message by: ${CHANNEL(keypad_digits)}

(closes issue #15048)
Tested by: rmudgett, mattf


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1242 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-10-23 19:50:45 +00:00
Richard Mudgett
175c1e470f Merged revisions 1143, 1144 from
https://origsvn.digium.com/svn/libpri/tags/1.4.10.2

  ..........
  r1144 | mattf | 2009-09-29 10:32:23 -0500 (Tue, 29 Sep 2009) | 1 line

  This fix is more like the fix that was used to resolve the issue for the PRI case
  ..........
  r1143 | mattf | 2009-09-28 14:07:01 -0500 (Mon, 28 Sep 2009) | 1 line

  Changes for 1.4.10.2
  ..........


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1151 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-10-07 18:33:09 +00:00
Matthew Fredrickson
25b2496b0f Output multiline output with multiple calls to pri_message, so that logs look normal in Asterisk
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1077 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-09-14 22:32:40 +00:00
Richard Mudgett
6d9c1cb0d9 Optimized calls to pri_schedule_del().
There is no need to test if a scheduled event is running before calling
pri_schedule_del().


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1060 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-09-02 20:04:03 +00:00
Matthew Fredrickson
3a1739883b There are two changes in this commit that are bug fixes for various Q.921 issues found in internal testing.
Both were exposed/introduced by the TBR4 compliance patch for bug #12861, in changing how retransmissions and in how
the transmission queue was maintained.  TX-RX message flow and acknowledgement was severely restricted,
since the patch changed the behavior so that pending untransmitted frames would not actually be send until
the next RR was received in normal circumstances, or REJ when a reject frame was received.  On busy links,
this can severly limit the amount of useful traffic that is sent, and can slow down message transmission.

Until someone can point out where in Q.921 it is mandated for us to wait for RR frames to start sending
untransmitted messages, the first change is to allow us to send untransmitted frames when we receive new
I frames as well, with updated N(R).

The other bug fixed is a situation caused by the restricted traffic flow, if an outside process tries to send
an I-frame asynchronous to an RR frame, when the transmit window was previously closed and then opened up but 
an RR has not been received yet.  A bug was found with the integration of the old transmit code with the new reject 
handling code which caused the new frame to be sent immediately, regardless if there were any pending untransmitted 
I-frames in the queue to be sent and causing an out of order I-frame to be sent to the other side.  This bug is 
also fixed in this patch.


git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@859 2fbb986a-6c06-0410-b554-c9c1f0a7f128
2009-06-09 19:47:05 +00:00