sercomm_cons: Utilize msgb's better, don't always end at \n
authorHarald Welte <laforge@gnumonks.org>
Sun, 21 Feb 2010 14:16:40 +0000 (15:16 +0100)
committerHarald Welte <laforge@gnumonks.org>
Sun, 21 Feb 2010 14:16:40 +0000 (15:16 +0100)
commite943638a926a09e82fb56e18a1ca8ec14f2e1681
tree183345ecb7707cba9338ce229457db891ab0c075
parent0c1881a417651385664dfceac8511be38bf2cb87
sercomm_cons: Utilize msgb's better, don't always end at \n

In the sercomm_cons layer, ee used to enqueue a msgb for sending
every time there is an end-of-line.  However, if we send a number
of very short lines, we easily run out of msgbs.

Now we check how much msgb backlog there is in the transmit queue,
and decide to skip the end-of-line flushing if needed.

This still doesn't solve all our problems, but its still a useful
mechanism.
src/target/firmware/comm/sercomm_cons.c