-rw-r--r-- | noncore/apps/opie-console/dialer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/dialer.cpp b/noncore/apps/opie-console/dialer.cpp index 7bf9352..51d4093 100644 --- a/noncore/apps/opie-console/dialer.cpp +++ b/noncore/apps/opie-console/dialer.cpp @@ -221,14 +221,13 @@ qWarning("Sending: '%s'", m.latin1()); QString Dialer::receive() { QString buf; char buffer[1024]; int ret; - - qApp->processEvents(); + int counter; while(1) { ret = ::read(m_fd, buffer, sizeof(buffer)); if(ret > 0) @@ -244,13 +243,15 @@ qWarning("Receiving: '%s'", buf.latin1()); return buf; } } else if(ret < 0) { if(errno != EAGAIN) reset(); + else if(!(counter++ % 100)) qApp->processEvents(); } + else if(!(counter++ % 100)) qApp->processEvents(); } return QString::null; } void Dialer::switchState(int newstate) |