-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 | |||
@@ -219,18 +219,17 @@ qWarning("Sending: '%s'", m.latin1()); | |||
219 | } | 219 | } |
220 | } | 220 | } |
221 | 221 | ||
222 | QString Dialer::receive() | 222 | QString Dialer::receive() |
223 | { | 223 | { |
224 | QString buf; | 224 | QString buf; |
225 | char buffer[1024]; | 225 | char buffer[1024]; |
226 | int ret; | 226 | int ret; |
227 | 227 | int counter; | |
228 | qApp->processEvents(); | ||
229 | 228 | ||
230 | while(1) | 229 | while(1) |
231 | { | 230 | { |
232 | ret = ::read(m_fd, buffer, sizeof(buffer)); | 231 | ret = ::read(m_fd, buffer, sizeof(buffer)); |
233 | 232 | ||
234 | if(ret > 0) | 233 | if(ret > 0) |
235 | { | 234 | { |
236 | for(int i = 0; i < ret; i++) | 235 | for(int i = 0; i < ret; i++) |
@@ -242,17 +241,19 @@ qWarning("Got: '%s'", buffer); | |||
242 | { | 241 | { |
243 | qWarning("Receiving: '%s'", buf.latin1()); | 242 | qWarning("Receiving: '%s'", buf.latin1()); |
244 | return buf; | 243 | return buf; |
245 | } | 244 | } |
246 | } | 245 | } |
247 | else if(ret < 0) | 246 | else if(ret < 0) |
248 | { | 247 | { |
249 | if(errno != EAGAIN) reset(); | 248 | if(errno != EAGAIN) reset(); |
249 | else if(!(counter++ % 100)) qApp->processEvents(); | ||
250 | } | 250 | } |
251 | else if(!(counter++ % 100)) qApp->processEvents(); | ||
251 | } | 252 | } |
252 | 253 | ||
253 | return QString::null; | 254 | return QString::null; |
254 | } | 255 | } |
255 | 256 | ||
256 | void Dialer::switchState(int newstate) | 257 | void Dialer::switchState(int newstate) |
257 | { | 258 | { |
258 | int oldstate = state; | 259 | int oldstate = state; |