File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ int arduino::WiFiUDP::parsePacket() {
86
86
_current_packet = _packet_buffer;
87
87
_current_packet_size = ret;
88
88
89
- return 1 ;
89
+ return _current_packet_size ;
90
90
}
91
91
92
92
int arduino::WiFiUDP::available () {
@@ -106,7 +106,7 @@ int arduino::WiFiUDP::read() {
106
106
// check for overflow
107
107
if (_current_packet > _packet_buffer + _current_packet_size) {
108
108
// try reading the next packet...
109
- if (parsePacket () == 1 ) {
109
+ if (parsePacket () > 0 ) {
110
110
// if so, read first byte of next packet;
111
111
return read ();
112
112
}
@@ -141,7 +141,7 @@ int arduino::WiFiUDP::read(unsigned char* buffer, size_t len) {
141
141
// at the end of the packet?
142
142
if (max_bytes == 0 ) {
143
143
// try read next packet...
144
- if (parsePacket () == 1 ) {
144
+ if (parsePacket () > 0 ) {
145
145
return read (buffer, len);
146
146
}
147
147
else {
You can’t perform that action at this time.
0 commit comments