gnokii-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-37


From: Daniele Forsi
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-374-g1e776ad
Date: Wed, 07 Mar 2012 10:51:06 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "libgnokii and core programs".

The branch, master has been updated
       via  1e776ad9a6f02e2956b7e1d44b2670a2c64b8202 (commit)
      from  4115b567bcad69424b88c94d4ce793d944d9b5a4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/gnokii.git/commit/?id=1e776ad9a6f02e2956b7e1d44b2670a2c64b8202


commit 1e776ad9a6f02e2956b7e1d44b2670a2c64b8202
Author: Daniele Forsi <address@hidden>
Date:   Tue Mar 6 15:38:19 2012 +0100

    Show more information in debug message from GN_OP_GetMemoryStatus
    
    For all drivers show the same information: memory number, count of free
    locations and count of total locations (this is what is returned in frames
    from nk6510 and nk7100, adapt other models to this).

diff --git a/common/phones/atgen.c b/common/phones/atgen.c
index cf1cf8b..2bc9802 100644
--- a/common/phones/atgen.c
+++ b/common/phones/atgen.c
@@ -2100,6 +2100,8 @@ static gn_error ReplyMemoryStatus(int messagetype, 
unsigned char *buffer, int le
                } else {
                        return GN_ERR_UNKNOWN;
                }
+               dprintf("Status of memory %d: used %d/%d\n", 
drvinst->memorytype,
+                       data->memory_status->used, data->memory_status->used + 
data->memory_status->free);
        }
        return GN_ERR_NONE;
 }
diff --git a/common/phones/nk6100.c b/common/phones/nk6100.c
index 002d06c..d54cb10 100644
--- a/common/phones/nk6100.c
+++ b/common/phones/nk6100.c
@@ -934,9 +934,7 @@ static gn_error IncomingPhonebook(int messagetype, unsigned 
char *message, int l
                        return GN_ERR_UNHANDLEDFRAME;
                }
        case 0x08:
-               dprintf("\tMemory location: %d\n", message[4]);
-               dprintf("\tUsed: %d\n", message[6]);
-               dprintf("\tFree: %d\n", message[5]);
+               dprintf("Status of memory %d: used %d/%d\n", message[4], 
message[6], message[5] + message[6]);
                if (data->memory_status) {
                        data->memory_status->used = message[6];
                        data->memory_status->free = message[5];
diff --git a/common/phones/nk6510.c b/common/phones/nk6510.c
index 277e417..eb82128 100644
--- a/common/phones/nk6510.c
+++ b/common/phones/nk6510.c
@@ -2723,8 +2723,8 @@ static gn_error NK6510_IncomingPhonebook(int messagetype, 
unsigned char *message
                        if (message[5] != 0xff) {
                                data->memory_status->used = (message[20] << 8) 
+ message[21];
                                data->memory_status->free = ((message[18] << 8) 
+ message[19]) - data->memory_status->used;
-                               dprintf("Memory status - location = %d, 
Capacity: %d \n",
-                                       (message[4] << 8) + message[5], 
(message[18] << 8) + message[19]);
+                               dprintf("Status of memory %d: used %d/%d\n", 
(message[4] << 8) + message[5],
+                                       (message[20] << 8) + message[21], 
(message[18] << 8) + message[19]);
                        } else {
                                return GN_ERR_INVALIDMEMORYTYPE;
                        }
diff --git a/common/phones/nk7110.c b/common/phones/nk7110.c
index 1bb9564..abf5cd2 100644
--- a/common/phones/nk7110.c
+++ b/common/phones/nk7110.c
@@ -673,7 +673,8 @@ static gn_error NK7110_IncomingPhonebook(int messagetype, 
unsigned char *message
                        if (message[5] != 0xff) {
                                data->memory_status->used = (message[16] << 8) 
+ message[17];
                                data->memory_status->free = ((message[14] << 8) 
+ message[15]) - data->memory_status->used;
-                               dprintf("Memory status - location = %d\n", 
(message[4] << 8) + message[5]);
+                               dprintf("Status of memory %d: used %d/%d\n", 
(message[4] << 8) + message[5],
+                                       (message[16] << 8) + message[17], 
(message[14] << 8) + message[15]);
                        } else {
                                dprintf("Unknown error getting mem status\n");
                                return GN_ERR_UNHANDLEDFRAME;
diff --git a/common/phones/pcsc.c b/common/phones/pcsc.c
index 9887c5d..f696f98 100644
--- a/common/phones/pcsc.c
+++ b/common/phones/pcsc.c
@@ -593,6 +593,8 @@ static gn_error GetMemoryStatus(gn_data *data, struct 
gn_statemachine *state)
                        /* FIXME: this is total space (should read all entries 
and subtract empty ones) */
                        data->memory_status->used = (IoStruct.pbRecvBuffer[2] * 
256 + IoStruct.pbRecvBuffer[3]) / IoStruct.pbRecvBuffer[14];
                        data->memory_status->free = 0;
+                       dprintf("Status of memory %d: used %d/%d\n", file, 
data->memory_status->used,
+                               data->memory_status->used + 
data->memory_status->free);
                }
        }
 

-----------------------------------------------------------------------

Summary of changes:
 common/phones/atgen.c  |    2 ++
 common/phones/nk6100.c |    4 +---
 common/phones/nk6510.c |    4 ++--
 common/phones/nk7110.c |    3 ++-
 common/phones/pcsc.c   |    2 ++
 5 files changed, 9 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
libgnokii and core programs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]