The following commit has been merged in the master branch:
commit f950672705ee176283fe8da86e5b5e7db8c4c10a
Author: Michal Čihař <[email protected]>
Date:   Fri Sep 25 13:10:50 2009 +0200

    End reading when we read all items.
    
    Not actually one after last item.
    
    bug#839

diff --git a/libgammu/phone/at/samsung.c b/libgammu/phone/at/samsung.c
index 9af84f0..aaa40f9 100644
--- a/libgammu/phone/at/samsung.c
+++ b/libgammu/phone/at/samsung.c
@@ -866,11 +866,11 @@ GSM_Error SAMSUNG_GetNextCalendar(GSM_StateMachine *s, 
GSM_CalendarEntry *Note,
        error = ERR_EMPTY;
        while (error == ERR_EMPTY) {
                Note->Location++;
-               if (Note->Location > Priv->CalendarStatus.Used + 
Priv->CalendarStatus.Free) {
+               if (Note->Location >= Priv->CalendarStatus.Used + 
Priv->CalendarStatus.Free) {
                        /* We're at the end */
                        return ERR_EMPTY;
                }
-               if (Priv->CalendarRead > Priv->CalendarStatus.Used) {
+               if (Priv->CalendarRead >= Priv->CalendarStatus.Used) {
                        /* We've read all entries */
                        return ERR_EMPTY;
                }

-- 
Gammu

_______________________________________________
Gammu-svn mailing list
[email protected]
https://lists.cihar.com/cgi-bin/mailman/listinfo/gammu-svn

Reply via email to