Remove duplicate code which was counting send error twice.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39604 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -388,6 +388,7 @@ dialup_send_data(net_device* _device, net_buffer* buffer)
|
|||||||
// mark frame start
|
// mark frame start
|
||||||
packet[packetSize++] = HDLC_FLAG_SEQUENCE;
|
packet[packetSize++] = HDLC_FLAG_SEQUENCE;
|
||||||
|
|
||||||
|
// encode frame data
|
||||||
ioVector = ioVectors;
|
ioVector = ioVectors;
|
||||||
while (vectorCount--) {
|
while (vectorCount--) {
|
||||||
uint8* data = (uint8*) ioVector->iov_base;
|
uint8* data = (uint8*) ioVector->iov_base;
|
||||||
@@ -404,6 +405,7 @@ dialup_send_data(net_device* _device, net_buffer* buffer)
|
|||||||
// next io vector
|
// next io vector
|
||||||
ioVector++;
|
ioVector++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// mark frame end
|
// mark frame end
|
||||||
packet[packetSize++] = HDLC_FLAG_SEQUENCE;
|
packet[packetSize++] = HDLC_FLAG_SEQUENCE;
|
||||||
|
|
||||||
@@ -411,7 +413,6 @@ dialup_send_data(net_device* _device, net_buffer* buffer)
|
|||||||
|
|
||||||
bytesWritten = write(device->fd, packet, packetSize);
|
bytesWritten = write(device->fd, packet, packetSize);
|
||||||
if (bytesWritten < 0) {
|
if (bytesWritten < 0) {
|
||||||
device->stats.send.errors++;
|
|
||||||
status = errno;
|
status = errno;
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user