Changeset View
Changeset View
Standalone View
Standalone View
head/stand/libsa/net.c
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | if (tleft <= 0) { | ||||
} | } | ||||
tlast = t; | tlast = t; | ||||
} | } | ||||
/* Try to get a packet and process it. */ | /* Try to get a packet and process it. */ | ||||
cc = (*rproc)(d, pkt, payload, tleft); | cc = (*rproc)(d, pkt, payload, tleft); | ||||
/* Return on data, EOF or real error. */ | /* Return on data, EOF or real error. */ | ||||
if (cc != -1 || errno != 0) | if (cc != -1 || (errno != 0 && errno != ETIMEDOUT)) | ||||
return (cc); | return (cc); | ||||
/* Timed out or didn't get the packet we're waiting for */ | /* Timed out or didn't get the packet we're waiting for */ | ||||
t = getsecs(); | t = getsecs(); | ||||
tleft -= t - tlast; | tleft -= t - tlast; | ||||
tlast = t; | tlast = t; | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 154 Lines • Show Last 20 Lines |