Skip to content

Commit fb7715a

Browse files
committed
fix bug in tos_at_channel_read_timed, update to 2.4.3
1 parent 8e9024c commit fb7715a

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

kernel/core/include/tos_version.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
#define TOS_VERSION_MAJOR 0x02
2727
#define TOS_VERSION_MINOR 0x04
28-
#define TOS_VERSION_PATCH 0x02
29-
#define TOS_VERSION "2.4.2"
28+
#define TOS_VERSION_PATCH 0x03
29+
#define TOS_VERSION "2.4.3"
3030

3131
#endif /* _TOS_VERSION_H_ */
3232

net/at/src/tos_at.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -709,11 +709,12 @@ __API__ int tos_at_channel_read_timed(int channel_id, uint8_t *buffer, size_t bu
709709
return total_read_len;
710710
}
711711

712-
read_len = tos_chr_fifo_pop_stream(&data_channel->rx_fifo, buffer + read_len, buffer_len - total_read_len);
712+
read_len = tos_chr_fifo_pop_stream(&data_channel->rx_fifo, buffer + total_read_len, buffer_len - total_read_len);
713713

714714
tos_mutex_post(&data_channel->rx_lock);
715715

716716
if (read_len == 0) {
717+
remain_tick = tos_stopwatch_remain(&data_channel->timer);
717718
tos_sem_pend(&data_channel->rx_sem, remain_tick);
718719
}
719720

0 commit comments

Comments
 (0)