diff options
author | Tilman Schmidt <tilman@imap.cc> | 2010-02-22 08:09:22 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-26 04:24:23 -0500 |
commit | 63e055d1c6e3a5f6d370cc841d621d5fa4d5d834 (patch) | |
tree | 80f645c85bbc012d3b1b45ab66ee7dd8938de49b /drivers/isdn/gigaset/asyncdata.c | |
parent | 2ac2ed5f2dfc97ae9ed9f446ad6e064fa821ef6d (diff) |
bas_gigaset: collapse CR/LF at end of AT response
Copy the mechanism from ser_/usb_gigaset to avoid producing
spurious empty responses for CR/LF sequences from the device.
Add a comment in all drivers documenting that behaviour.
Correct an off by one error that might result in a one byte
buffer overflow when receiving an unexpectedly long reply.
Impact: minor bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/gigaset/asyncdata.c')
-rw-r--r-- | drivers/isdn/gigaset/asyncdata.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/isdn/gigaset/asyncdata.c b/drivers/isdn/gigaset/asyncdata.c index ccb2a7b7c41d..e913beb63f24 100644 --- a/drivers/isdn/gigaset/asyncdata.c +++ b/drivers/isdn/gigaset/asyncdata.c | |||
@@ -40,6 +40,8 @@ static inline int muststuff(unsigned char c) | |||
40 | * Append received bytes to the command response buffer and forward them | 40 | * Append received bytes to the command response buffer and forward them |
41 | * line by line to the response handler. Exit whenever a mode/state change | 41 | * line by line to the response handler. Exit whenever a mode/state change |
42 | * might have occurred. | 42 | * might have occurred. |
43 | * Note: Received lines may be terminated by CR, LF, or CR LF, which will be | ||
44 | * removed before passing the line to the response handler. | ||
43 | * Return value: | 45 | * Return value: |
44 | * number of processed bytes | 46 | * number of processed bytes |
45 | */ | 47 | */ |