Go http server code for tls does not need a Go 8 specific offset for dereferencing the file descriptor.
@@ -1022,7 +1022,6 @@ c_http_server_read(char *stackaddr)
cr_conn_rwc = *(uint64_t *)(cr_conn_rwc_if + g_go.iface_data);
netFD = *(uint64_t *)(cr_conn_rwc + g_go.iface_data);
if (netFD) {
- if (g_go.netfd_to_sysfd == UNDEF_OFFSET) {
pfd = *(uint64_t *)(netFD + g_go.netfd_to_pd);
if (pfd) {
//funcprint("Scope: %s:%d cr %p cr.conn %p cr.conn.rwc_if %p cr.conn.rwc %p netFD %p pfd %p fd %p\n",
@@ -1030,9 +1029,6 @@ c_http_server_read(char *stackaddr)
// netFD, pfd, pfd + g_go.pd_to_fd);
fd = *(int *)(pfd + g_go.pd_to_fd);
}
- } else {
- fd = *(int *)(netFD + g_go.netfd_to_sysfd);
- }
funcprint("Scope: go_http_server_read of %ld\n", fd);
doProtocol((uint64_t)0, fd, (void *)buf, rc, TLSRX, BUF);
@@ -1077,14 +1073,10 @@ c_http_server_write(char *stackaddr)
w_conn_rwc = *(uint64_t *)(w_conn_rwc_if + g_go.iface_data);
netFD = *(uint64_t *)(w_conn_rwc + g_go.iface_data);
if (netFD) {
- if (g_go.netfd_to_sysfd == UNDEF_OFFSET) {
pfd = *(uint64_t *)(netFD + g_go.netfd_to_pd);
if (pfd) {
fd = *(int *)(pfd + g_go.pd_to_fd);
}
- } else {
- fd = *(int *)(netFD + g_go.netfd_to_sysfd);
- }
funcprint("Scope: c_http_server_write of %ld\n", fd);
doProtocol((uint64_t)0, fd, (void *)buf, rc, TLSTX, BUF);
