mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-20 15:02:27 +02:00
2021-06-01 Fred Gleason <fredg@paravelsystems.com>
* Cleaned up compile warnings in 'lib/rdttydevice.cpp'. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
073d5e9caa
commit
1c8cc2e1d1
@ -21788,3 +21788,5 @@
|
||||
* Cleaned up compile warnings in 'lib/rdsvc.cpp'.
|
||||
2021-06-01 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Cleaned up compile warnings in 'lib/rdtextfile.cpp'.
|
||||
2021-06-01 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Cleaned up compile warnings in 'lib/rdttydevice.cpp'.
|
||||
|
@ -2,8 +2,7 @@
|
||||
//
|
||||
// A Qt driver for tty ports.
|
||||
//
|
||||
// (C) Copyright 2010-1018 Fred Gleason <fredg@paravelsystems.com>
|
||||
// All Rights Reserved.
|
||||
// (C) Copyright 2010-1021 Fred Gleason <fredg@paravelsystems.com>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Library General Public License
|
||||
@ -26,6 +25,7 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "rdapplication.h"
|
||||
#include "rdttydevice.h"
|
||||
|
||||
RDTTYDevice::RDTTYDevice(QObject *parent)
|
||||
@ -593,7 +593,8 @@ void RDTTYDevice::writeTtyData()
|
||||
{
|
||||
char data[2048];
|
||||
int bytes=0;
|
||||
|
||||
int s;
|
||||
|
||||
ioctl(tty_fd,TIOCOUTQ,&bytes);
|
||||
int n=2048-bytes;
|
||||
if((int)tty_write_queue.size()<n) {
|
||||
@ -607,5 +608,8 @@ void RDTTYDevice::writeTtyData()
|
||||
data[i]=tty_write_queue.front();
|
||||
tty_write_queue.pop();
|
||||
}
|
||||
::write(tty_fd,data,n);
|
||||
if((s=::write(tty_fd,data,n))!=n) {
|
||||
rda->
|
||||
syslog(LOG_WARNING,"RDTTYDevice::writeTtyData write lost %c bytes",n-s);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user