returning early if no data was received

This commit is contained in:
skarg
2005-03-23 16:03:34 +00:00
parent 32562856b8
commit a69905c8a3
+3
View File
@@ -318,6 +318,9 @@ uint16_t ethernet_receive(
return 0;
}
if (received_bytes == 0)
return 0;
/* the signature of an 802.2 BACnet packet */
if ((buf[14] != 0x82) && (buf[15] != 0x82)) {
//fprintf(stderr,"ethernet: Non-BACnet packet\n");