Ticket #1635: 0001-bug-fixed-for-retrieving-empty-SMS-list-Erin-Yueh.patch

File 0001-bug-fixed-for-retrieving-empty-SMS-list-Erin-Yueh.patch, 1.6 KB (added by erin_yueh, 11 years ago)
  • src/libraries/qtopiaphonemodem/qmodemsmsreader.cpp

    From e245ff11f86fdb840cf29d687b7f45c393f2e1a8 Mon Sep 17 00:00:00 2001
    From: erin <erin@debian.tw.openmoko.com>
    Date: Fri, 5 Sep 2008 13:44:20 +0800
    Subject: [PATCH] bug fixed for retrieving empty SMS list (Erin Yueh)
    
    ---
     src/libraries/qtopiaphonemodem/qmodemsmsreader.cpp |    6 ++++--
     1 files changed, 4 insertions(+), 2 deletions(-)
    
    diff --git a/src/libraries/qtopiaphonemodem/qmodemsmsreader.cpp b/src/libraries/qtopiaphonemodem/qmodemsmsreader.cpp
    index 40eede8..0a2a494 100644
    a b void QModemSMSReader::cpmsDone( bool ok, const QAtResult& result ) 
    520520    // the "SMSMemoryFull" indicator on modems that don't have 
    521521    // a proprietry way of detecting the full state. 
    522522    QAtResultParser parser( result ); 
     523    uint totalused; 
    523524    QModemIndicators *indicators = d->service->indicators(); 
    524525    if ( parser.next( "+CPMS:" ) ) { 
    525526        if ( parser.line().startsWith( QChar('"') ) ) 
    void QModemSMSReader::cpmsDone( bool ok, const QAtResult& result ) 
    535536        // Update the local value space with the actual counts. 
    536537        setValue( "usedMessages", (int)used, Delayed ); 
    537538        setValue( "totalMessages", (int)total ); 
     539        totalused += used; 
    538540    } 
    539541 
    540     if (ok) { 
     542    if (ok && totalused >0) { 
    541543        listMessages(); 
    542544    } else { 
    543         qLog(Modem) << __PRETTY_FUNCTION__ << "Giving up on CPMS.... it keeps failing. how to escalate?"; 
     545        qLog(Modem) << __PRETTY_FUNCTION__ << "Giving up on CPMS.... it keeps failing or EMPTY. how to escalate?"; 
    544546    } 
    545547} 
    546548