80Fermer82
PpHdLe 06/08/2009 à 13:26
Bug: impossible d'envoyer une TIB avec Tilp + tiemu sous PedroM.
Message d'erreur 'Unkown calculator type' renvoyée.

Fix:
--- tilp_calcs.c~       2008-03-26 14:18:03.000000000 +0100
+++ tilp_calcs.c        2009-08-06 13:21:29.000000000 +0200
@@ -412,10 +412,14 @@
        int err, ret;
        char *msg = _("You are going to upgrade the Operating System\nof your calculator.\nYou are advised to eventually turn off\nyour screen saver, which could cause th            e transfer to crash.\nIf the transfer fails, wait until the TI89/TI92+ displays\n\"Waiting to receive\"\nand restart the transfer again.\nTI73/83+ users need to turn the             calculator off and press a key.");
 
+        /* Fix bug: Create a duplicate is necessary since filename is destroyed when calling a new GTK window */
+        filename = strdup (filename);
+
        if(g_list_length(remote.selection1) > 1)
        {
                gif->msg_box1(_("Error"),
                             _("You have to select _one_ upgrade to send."));
+                free((void*)filename);
                return -1;
        }
 
@@ -423,22 +427,28 @@
        {
                gif->msg_box1(_("Error"),
                             _("It's not an FLASH upgrade or this FLASH upgrade is not intended for this calculator type."));
+                free((void*)filename);
                return -1;
        }
 
        ret = gif->msg_box4(_("Warning"), msg);
-       if(ret == BUTTON2)
+       if(ret == BUTTON2) {
+                free((void*)filename);
                return -1;
+        }
 
        if(options.calc_model == CALC_NSPIRE)
-               if(tilp_calc_isready())
+          if(tilp_calc_isready()) {
+                free((void*)filename);
                        return -1;
+          }
 
        tilp_options_increase_timeout();
 
        gif->create_pbar_(FNCT_SEND_OS, _("Upgrading OS"));
        err = ticalcs_calc_send_os2(calc_handle, filename);
        gif->destroy_pbar();
+        free((void*)filename);
 
        ticables_options_set_timeout(cable_handle, options.cable_timeout);
 


A noter que maintenant ca envoie, mais ca ne recoit pas de l'autre coté...