Skip to content

Commit

Permalink
Merge pull request #2452 from cesanta/tlsbuiltin
Browse files Browse the repository at this point in the history
Make tls_builtin build with current API
  • Loading branch information
scaprile authored Nov 3, 2023
2 parents 22fc01d + bb5aba2 commit 13259f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions mongoose.c
Original file line number Diff line number Diff line change
Expand Up @@ -7381,7 +7381,7 @@ static inline void add32(struct mg_iobuf *io, uint32_t data) {
mg_iobuf_add(io, io->len, &data, sizeof(data));
}

void mg_tls_init(struct mg_connection *c, struct mg_str hostname) {
void mg_tls_init(struct mg_connection *c, const struct mg_tls_opts *opts) {
struct tls_data *tls = (struct tls_data *) calloc(1, sizeof(struct tls_data));
if (tls != NULL) {
tls->send.align = tls->recv.align = MG_IO_SIZE;
Expand All @@ -7390,7 +7390,7 @@ void mg_tls_init(struct mg_connection *c, struct mg_str hostname) {
} else {
mg_error(c, "tls oom");
}
(void) hostname;
(void) opts;
}
void mg_tls_free(struct mg_connection *c) {
struct tls_data *tls = c->tls;
Expand Down Expand Up @@ -7498,8 +7498,8 @@ void mg_tls_handshake(struct mg_connection *c) {
void mg_tls_ctx_free(struct mg_mgr *mgr) {
mgr->tls_ctx = NULL;
}
void mg_tls_ctx_init(struct mg_mgr *mgr, const struct mg_tls_opts *opts) {
(void) opts, (void) mgr;
void mg_tls_ctx_init(struct mg_mgr *mgr) {
(void) mgr;
}
#endif

Expand Down
8 changes: 4 additions & 4 deletions src/tls_builtin.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ static inline void add32(struct mg_iobuf *io, uint32_t data) {
mg_iobuf_add(io, io->len, &data, sizeof(data));
}

void mg_tls_init(struct mg_connection *c, struct mg_str hostname) {
void mg_tls_init(struct mg_connection *c, const struct mg_tls_opts *opts) {
struct tls_data *tls = (struct tls_data *) calloc(1, sizeof(struct tls_data));
if (tls != NULL) {
tls->send.align = tls->recv.align = MG_IO_SIZE;
Expand All @@ -51,7 +51,7 @@ void mg_tls_init(struct mg_connection *c, struct mg_str hostname) {
} else {
mg_error(c, "tls oom");
}
(void) hostname;
(void) opts;
}
void mg_tls_free(struct mg_connection *c) {
struct tls_data *tls = c->tls;
Expand Down Expand Up @@ -159,7 +159,7 @@ void mg_tls_handshake(struct mg_connection *c) {
void mg_tls_ctx_free(struct mg_mgr *mgr) {
mgr->tls_ctx = NULL;
}
void mg_tls_ctx_init(struct mg_mgr *mgr, const struct mg_tls_opts *opts) {
(void) opts, (void) mgr;
void mg_tls_ctx_init(struct mg_mgr *mgr) {
(void) mgr;
}
#endif

0 comments on commit 13259f8

Please sign in to comment.