Diffstat (limited to 'gammu/emb/common/device/serial/ser_unx.c') (more/less context) (ignore whitespace changes)
-rw-r--r-- | gammu/emb/common/device/serial/ser_unx.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/gammu/emb/common/device/serial/ser_unx.c b/gammu/emb/common/device/serial/ser_unx.c index 69c7515..18b5f6f 100644 --- a/gammu/emb/common/device/serial/ser_unx.c +++ b/gammu/emb/common/device/serial/ser_unx.c | |||
@@ -5,4 +5,13 @@ | |||
5 | * GNU GPL version 2 or later | 5 | * GNU GPL version 2 or later |
6 | */ | 6 | */ |
7 | /* Due to a problem in the source code management, the names of some of | ||
8 | * the authors have unfortunately been lost. We do not mean to belittle | ||
9 | * their efforts and hope they will contact us to see their names | ||
10 | * properly added to the Copyright notice above. | ||
11 | * Having published their contributions under the terms of the GNU | ||
12 | * General Public License (GPL) [version 2], the Copyright of these | ||
13 | * authors will remain respected by adhering to the license they chose | ||
14 | * to publish their code under. | ||
15 | */ | ||
7 | 16 | ||
8 | #include "../../gsmstate.h" | 17 | #include "../../gsmstate.h" |
@@ -61,6 +70,6 @@ static GSM_Error serial_open (GSM_StateMachine *s) | |||
61 | { | 70 | { |
62 | GSM_Device_SerialData *d = &s->Device.Data.Serial; | 71 | GSM_Device_SerialData *d = &s->Device.Data.Serial; |
63 | struct termios t; | 72 | struct termios t; |
64 | int i; | 73 | int i; |
65 | 74 | ||
66 | /* O_NONBLOCK MUST is required to avoid waiting for DCD */ | 75 | /* O_NONBLOCK MUST is required to avoid waiting for DCD */ |
@@ -125,5 +134,5 @@ static GSM_Error serial_setparity(GSM_StateMachine *s, bool parity) | |||
125 | { | 134 | { |
126 | GSM_Device_SerialData *d = &s->Device.Data.Serial; | 135 | GSM_Device_SerialData *d = &s->Device.Data.Serial; |
127 | struct termios t; | 136 | struct termios t; |
128 | 137 | ||
129 | if (tcgetattr(d->hPhone, &t)) { | 138 | if (tcgetattr(d->hPhone, &t)) { |
@@ -151,6 +160,6 @@ static GSM_Error serial_setdtrrts(GSM_StateMachine *s, bool dtr, bool rts) | |||
151 | { | 160 | { |
152 | GSM_Device_SerialData *d = &s->Device.Data.Serial; | 161 | GSM_Device_SerialData *d = &s->Device.Data.Serial; |
153 | struct termios t; | 162 | struct termios t; |
154 | unsigned int flags; | 163 | unsigned int flags; |
155 | 164 | ||
156 | if (tcgetattr(d->hPhone, &t)) { | 165 | if (tcgetattr(d->hPhone, &t)) { |
@@ -265,6 +274,6 @@ static int serial_read(GSM_StateMachine *s, void *buf, size_t nbytes) | |||
265 | GSM_Device_SerialData *d = &s->Device.Data.Serial; | 274 | GSM_Device_SerialData *d = &s->Device.Data.Serial; |
266 | struct timeval timeout2; | 275 | struct timeval timeout2; |
267 | fd_set readfds; | 276 | fd_set readfds; |
268 | int actual = 0; | 277 | int actual = 0; |
269 | 278 | ||
270 | FD_ZERO(&readfds); | 279 | FD_ZERO(&readfds); |
@@ -284,6 +293,6 @@ static int serial_write(GSM_StateMachine *s, void *buf, size_t nbytes) | |||
284 | { | 293 | { |
285 | GSM_Device_SerialData *d = &s->Device.Data.Serial; | 294 | GSM_Device_SerialData *d = &s->Device.Data.Serial; |
286 | int ret; | 295 | int ret; |
287 | size_t actual = 0; | 296 | size_t actual = 0; |
288 | 297 | ||
289 | do { | 298 | do { |