master/fsm_foe.c
branchstable-1.5
changeset 2378 ca345abf0565
parent 2257 a2a675601c98
child 2498 9cdd7669dc0b
--- a/master/fsm_foe.c	Tue Apr 10 19:09:51 2012 +0200
+++ b/master/fsm_foe.c	Tue Apr 10 19:10:56 2012 +0200
@@ -622,15 +622,12 @@
         ec_fsm_foe_t *fsm /**< FoE statemachine. */
         )
 {
-    size_t current_size;
     ec_slave_t *slave = fsm->slave;
 
     fsm->rx_buffer_offset = 0;
     fsm->rx_expected_packet_no = 1;
     fsm->rx_last_packet = 0;
 
-    current_size = fsm->rx_filename_len;
-
 #ifdef DEBUG_FOE
     printk("ec_fsm_foe_read_start()\n");
 #endif
@@ -732,7 +729,8 @@
         return;
     }
 
-    if (!(data = ec_slave_mbox_fetch(slave, datagram, &mbox_prot, &rec_size))) {
+    if (!(data = ec_slave_mbox_fetch(slave, datagram, &mbox_prot,
+                    &rec_size))) {
         ec_foe_set_rx_error(fsm, FOE_MBOX_FETCH_ERROR);
         return;
     }
@@ -758,7 +756,7 @@
         EC_SLAVE_ERR(slave, "Received FoE Error Request (code 0x%08x).\n",
                 fsm->request->error_code);
         if (rec_size > 6) {
-            uint8_t text[1024];
+            uint8_t text[256];
             strncpy(text, data + 6, min(rec_size - 6, sizeof(text)));
             EC_SLAVE_ERR(slave, "FoE Error Text: %s\n", text);
         }