[Top][All Lists]

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

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

From: Pawel Kot
Subject: [SCM] libgnokii and core programs branch, master, updated. rel_0_6_29-409-geb459fa
Date: Sun, 01 Jul 2012 18:23:05 +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  eb459fafc38b2c913ab9670ca5a724b960ded34c (commit)
      from  af558ce9cc7aed94667659c9fbbe6a13b7bb3400 (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 -----------------------------------------------------------------

commit eb459fafc38b2c913ab9670ca5a724b960ded34c
Author: Pawel Kot <address@hidden>
Date:   Sun Jul 1 20:21:17 2012 +0200

    Make debugging messages more consistent.
    Make debugging messages mode consistent when printing info about resizing
    incoming buffer for the phonet connection.

diff --git a/common/links/fbus-phonet.c b/common/links/fbus-phonet.c
index 7454a02..f99e2ea 100644
--- a/common/links/fbus-phonet.c
+++ b/common/links/fbus-phonet.c
@@ -52,7 +52,7 @@ static int verify_max_message_len(int len, char 
        static int max_message_len = 0;
        if (len > max_message_len) {
-               dprintf("overrun: %d %d\n", len, max_message_len);
+               dprintf("overrun, reallocating: %d %d\n", len, max_message_len);
                *message_buffer = realloc(*message_buffer, len + 1);
                max_message_len = len + 1;
@@ -173,7 +173,6 @@ static void phonet_rx_statemachine(unsigned char rx_byte, 
struct gn_statemachine
                i->buffer_count = 0;
                if (!verify_max_message_len(i->message_length, 
&(i->message_buffer))) {
                        dprintf("PHONET: Failed to allocate memory for larger 
-                       dprintf("PHONET: Message buffer overrun - resetting 
(message length: %d, max: %d)\n", i->message_length, PHONET_FRAME_MAX_LENGTH);
                        i->message_corrupted = 1;
@@ -391,8 +390,10 @@ gn_error phonet_initialise(struct gn_statemachine *state)
        if ((FBUSINST(state) = calloc(1, sizeof(phonet_incoming_message))) == 
                return GN_ERR_MEMORYFULL;
-       if (!verify_max_message_len(PHONET_FRAME_MAX_LENGTH, 
+       if (!verify_max_message_len(PHONET_FRAME_MAX_LENGTH, 
&(FBUSINST(state)->message_buffer))) {
+               dprintf("PHONET: Failed to initalize initial incoming buffer 
for %d bytes\n", PHONET_FRAME_MAX_LENGTH);
                return GN_ERR_MEMORYFULL;
+       }
        switch (state->config.connection_type) {
        case GN_CT_Infrared:


Summary of changes:
 common/links/fbus-phonet.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

libgnokii and core programs

reply via email to

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