Skip to content
This repository was archived by the owner on Aug 23, 2024. It is now read-only.

Commit 927966d

Browse files
committed
Fixed bug in unmounting sdcard causing issues with rshell
Fixed bug in curl module affecting sendmail
1 parent 934917e commit 927966d

18 files changed

Lines changed: 41 additions & 42 deletions

File tree

MicroPython_BUILD/components/micropython/esp32/modcurl.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,9 +415,7 @@ STATIC mp_obj_t curl_sendmail(size_t n_args, const mp_obj_t *pos_args, mp_map_t
415415
else quickmail_set_debug_log(mailobj, NULL);
416416

417417
const char* errmsg = NULL;
418-
MP_THREAD_GIL_EXIT();
419418
errmsg = quickmail_protocol_send(mailobj, mail_server, mail_port, mail_protocol, user, pass);
420-
MP_THREAD_GIL_ENTER();
421419

422420
// Cleanup
423421
quickmail_destroy(mailobj);
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// MicroPython version info
2-
#define MICROPY_GIT_TAG "ESP32_LoBo_v3.1.3"
2+
#define MICROPY_GIT_TAG "ESP32_LoBo_v3.1.4"
33
#define MICROPY_GIT_HASH "g2ddee729"
4-
#define MICROPY_BUILD_DATE "2017-01-13"
4+
#define MICROPY_BUILD_DATE "2017-01-14"
55
#define MICROPY_VERSION_MAJOR (3)
66
#define MICROPY_VERSION_MINOR (1)
7-
#define MICROPY_VERSION_MICRO (3)
8-
#define MICROPY_VERSION_STRING "3.1.3"
7+
#define MICROPY_VERSION_MICRO (4)
8+
#define MICROPY_VERSION_STRING "3.1.4"

MicroPython_BUILD/components/micropython/extmod/vfs_native.c

Lines changed: 33 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -881,6 +881,39 @@ STATIC mp_obj_t native_vfs_umount(mp_obj_t self_in) {
881881
}
882882
STATIC MP_DEFINE_CONST_FUN_OBJ_1(native_vfs_umount_obj, native_vfs_umount);
883883

884+
//------------------
885+
int internalUmount()
886+
{
887+
int res = 0;
888+
if (native_vfs_mounted[VFS_NATIVE_TYPE_SPIFLASH]) {
889+
#if MICROPY_USE_SPIFFS
890+
res = esp_vfs_spiffs_unregister("internalfs");
891+
if (res) res = 0;
892+
#else
893+
if (s_wl_handle != WL_INVALID_HANDLE) res = wl_unmount(s_wl_handle);
894+
if (res) res = 0;
895+
#endif
896+
native_vfs_mounted[VFS_NATIVE_TYPE_SPIFLASH] = false;
897+
}
898+
return res;
899+
}
900+
901+
//-----------------
902+
int externalUmount()
903+
{
904+
int res = 0;
905+
if (native_vfs_mounted[VFS_NATIVE_TYPE_SDCARD]) {
906+
esp_vfs_fat_sdmmc_unmount();
907+
if (res) res = 0;
908+
#if defined(CONFIG_SDCARD_MODE1)
909+
sdspi_host_deinit();
910+
#endif
911+
native_vfs_mounted[VFS_NATIVE_TYPE_SDCARD] = false;
912+
}
913+
914+
return res;
915+
}
916+
884917

885918
//-------------------------------------
886919
int mount_vfs(int type, char *chdir_to)
@@ -913,38 +946,6 @@ int mount_vfs(int type, char *chdir_to)
913946
return 0;
914947
}
915948

916-
//------------------
917-
int internalUmount()
918-
{
919-
int res = 0;
920-
if (native_vfs_mounted[VFS_NATIVE_TYPE_SPIFLASH]) {
921-
#if MICROPY_USE_SPIFFS
922-
res = esp_vfs_spiffs_unregister(NULL);
923-
if (res) res = 0;
924-
#else
925-
if (s_wl_handle != WL_INVALID_HANDLE) res = wl_unmount(s_wl_handle);
926-
if (res) res = 0;
927-
#endif
928-
}
929-
return res;
930-
}
931-
932-
//-----------------
933-
int externalUmount()
934-
{
935-
int res = 0;
936-
if (native_vfs_mounted[VFS_NATIVE_TYPE_SDCARD]) {
937-
esp_vfs_fat_sdmmc_unmount();
938-
if (res) res = 0;
939-
#if defined(CONFIG_SDCARD_MODE1)
940-
sdspi_host_deinit();
941-
#endif
942-
}
943-
944-
return res;
945-
}
946-
947-
948949
//===============================================================
949950
STATIC const mp_rom_map_elem_t native_vfs_locals_dict_table[] = {
950951
{ MP_ROM_QSTR(MP_QSTR_mkfs), MP_ROM_PTR(&native_vfs_mkfs_obj) },
60.9 KB
Binary file not shown.
27 KB
Binary file not shown.
0 Bytes
Binary file not shown.
27.1 KB
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

MicroPython_BUILD/firmware/esp32_ota/partitions_mpy.csv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
nvs, data, nvs, 0x9000, 16K,
77
otadata, data, ota, 0xd000, 8K,
88
phy_init, data, phy, 0xf000, 4K,
9-
MicroPython_1, app, ota_0, 0x10000, 1280K,
10-
MicroPython_2, app, ota_1, , 1280K,
9+
MicroPython_1, app, ota_0, 0x10000, 1344K,
10+
MicroPython_2, app, ota_1, , 1344K,
1111
internalfs, data, spiffs, , 1024K,

0 commit comments

Comments
 (0)