Commit 33f26133a1f71e2ea5dfbe6e7b9f244c2e004ea7

Authored by xiemeng
1 parent a868642c

update 0305

Showing 2 changed files with 5 additions and 3 deletions
... ... @@ -577,6 +577,7 @@ BOOL CALLBACK ToolbarProc(HWND hWndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
577 577 ErrorReporter("file err!\r\n");
578 578 return;
579 579 }
  580 + CloseHandle(g_appdata.hFileOfEarphoneBin);
580 581 SetWindowText(GetDlgItem(hWndDlg, IDC_BUTTON2_SEC_BINFILE), "下载软件");
581 582 }
582 583 if (g_appdata.DownloadReday == FALSE)
... ...
... ... @@ -661,11 +661,12 @@ char macid_company[3] = {0x0, 0x1, 0x2};
661 661
662 662
663 663 //char *fData,
664   -int fileCheck_fix_MACID(char *dataLen, const char macid_sub[3], const char macid_company[3])
  664 +int fileCheck_fix_MACID(DWORD dataLen, const char macid_sub[3], const char macid_company[3])
665 665 {
666 666 int i;
667 667 int ret = FILE_CHCK_SUCCESSFUL;
668 668 char *p = g_appdata.BufEarphoneBin + MAC_ADDR_OFFSET + BAUDRATE_DET_DATA_LEN + HEADER_LEN;
  669 + //char *p = g_appdata.BufEarphoneBin + MAC_ADDR_OFFSET + 0xB00 + 0x20;
669 670 U32 *p1 = (U32 *)g_appdata.BufEarphoneBin;
670 671 unsigned char baaddr[6];
671 672 BOOT_HEADER *p_header = (BOOT_HEADER *)(g_appdata.BufEarphoneBin + BAUDRATE_DET_DATA_LEN);
... ... @@ -906,7 +907,7 @@ DWORD WINAPI TransferThreadProc(LPVOID lpV)
906 907 /**********************check file*********************************/
907 908 //lpfileBuf = HeapAlloc(hDataHeap, 0, dwFileSize);
908 909 pRead = g_appdata.BufEarphoneBin;
909   - err = fileCheck_fix_MACID(dwFileSize, macid_sub, macid_company);
  910 + err = fileCheck_fix_MACID(g_appdata.BinSizeFileEarphone, macid_sub, macid_company);
910 911 if (err == WRONG_FILE_FORMAT)
911 912 {
912 913 ErrorReporter("wrong file format!");
... ... @@ -931,7 +932,7 @@ DWORD WINAPI TransferThreadProc(LPVOID lpV)
931 932 // inform writer thread that a file is about to be transferred
932 933 if (!fAborting)
933 934 {
934   - if (!WriterAddNewNode(WRITE_FILESTART, dwFileSize, 0, NULL, NULL, NULL))
  935 + if (!WriterAddNewNode(WRITE_FILESTART, g_appdata.BinSizeFileEarphone, 0, NULL, NULL, NULL))
935 936 fAborting = TRUE;
936 937 }
937 938 OutputDebugString("Xfer: About to start sending data\n");
... ...
Please register or login to post a comment