Skip to content

Commit 3efe664

Browse files
authored
Merge pull request #3161 from cesanta/fix
Unbreak MbedTLS (#3148), rollback debugging leftovers
2 parents 305d69e + 0459d9e commit 3efe664

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

mongoose.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14194,6 +14194,7 @@ long mg_tls_send(struct mg_connection *c, const void *buf, size_t len) {
1419414194
}
1419514195

1419614196
void mg_tls_flush(struct mg_connection *c) {
14197+
struct mg_tls *tls = (struct mg_tls *) c->tls;
1419714198
if (c->is_tls_throttled) {
1419814199
long n = mbedtls_ssl_write(&tls->ssl, tls->throttled_buf, tls->throttled_len);
1419914200
c->is_tls_throttled = (n == MBEDTLS_ERR_SSL_WANT_READ || n == MBEDTLS_ERR_SSL_WANT_WRITE);

src/tls_mbed.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ long mg_tls_send(struct mg_connection *c, const void *buf, size_t len) {
210210
}
211211

212212
void mg_tls_flush(struct mg_connection *c) {
213+
struct mg_tls *tls = (struct mg_tls *) c->tls;
213214
if (c->is_tls_throttled) {
214215
long n = mbedtls_ssl_write(&tls->ssl, tls->throttled_buf, tls->throttled_len);
215216
c->is_tls_throttled = (n == MBEDTLS_ERR_SSL_WANT_READ || n == MBEDTLS_ERR_SSL_WANT_WRITE);

tutorials/http/device-dashboard/net.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,6 @@ void web_init(struct mg_mgr *mgr) {
254254
s_settings.device_name = strdup("My Device");
255255
mg_http_listen(mgr, HTTP_URL, fn, NULL);
256256
mg_http_listen(mgr, HTTPS_URL, fn, NULL);
257-
mg_timer_add(mgr, 10 * 1000, MG_TIMER_RUN_NOW | MG_TIMER_REPEAT,
257+
mg_timer_add(mgr, 3600 * 1000, MG_TIMER_RUN_NOW | MG_TIMER_REPEAT,
258258
timer_sntp_fn, mgr);
259259
}

tutorials/tcpip/tap-driver/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ int main(int argc, char *argv[]) {
112112
struct mg_tcpip_driver driver = {.tx = tap_tx, .poll = tap_poll, .rx = tap_rx};
113113
struct mg_tcpip_if mif = {.driver = &driver,
114114
.driver_data = &fd,
115-
.enable_req_dns = false,
115+
.enable_req_dns = true,
116116
.enable_req_sntp = true,
117117
.fn = mif_fn};
118118
sscanf(mac, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &mif.mac[0], &mif.mac[1],

0 commit comments

Comments
 (0)