Commit 909b81b4deba804ca39da1dcbdf44f658dc1bbd0
1 parent
f8a7ffc3
Exists in
master
and in
5 other branches
Movendo mais campos para estrutura de sessão
Showing
3 changed files
with
67 additions
and
54 deletions
Show diff stats
src/include/lib3270/session.h
@@ -194,6 +194,19 @@ | @@ -194,6 +194,19 @@ | ||
194 | unsigned long e_funcs; /**< negotiated TN3270E functions */ | 194 | unsigned long e_funcs; /**< negotiated TN3270E functions */ |
195 | unsigned short e_xmit_seq; /**< transmit sequence number */ | 195 | unsigned short e_xmit_seq; /**< transmit sequence number */ |
196 | int response_required; | 196 | int response_required; |
197 | + int tn3270e_bound; | ||
198 | + int tn3270e_negotiated; | ||
199 | + | ||
200 | + enum | ||
201 | + { | ||
202 | + E_NONE, | ||
203 | + E_3270, | ||
204 | + E_NVT, | ||
205 | + E_SSCP | ||
206 | + } tn3270e_submode; | ||
207 | + | ||
208 | + unsigned char * lbuf; /**< line-mode input buffer */ | ||
209 | + unsigned char * lbptr; | ||
197 | 210 | ||
198 | 211 | ||
199 | // 3270 input buffer | 212 | // 3270 input buffer |
src/lib3270/session.c
@@ -199,7 +199,7 @@ static void lib3270_session_init(H3270 *hSession, const char *model) | @@ -199,7 +199,7 @@ static void lib3270_session_init(H3270 *hSession, const char *model) | ||
199 | hSession->aid = AID_NO; | 199 | hSession->aid = AID_NO; |
200 | hSession->reply_mode = SF_SRM_FIELD; | 200 | hSession->reply_mode = SF_SRM_FIELD; |
201 | hSession->linemode = 1; | 201 | hSession->linemode = 1; |
202 | - | 202 | + hSession->tn3270e_submode = E_NONE; |
203 | 203 | ||
204 | #ifdef _WIN32 | 204 | #ifdef _WIN32 |
205 | hSession->sockEvent = NULL; | 205 | hSession->sockEvent = NULL; |
src/lib3270/telnet.c
@@ -178,9 +178,9 @@ Boolean local_process = False; | @@ -178,9 +178,9 @@ Boolean local_process = False; | ||
178 | 178 | ||
179 | #if defined(X3270_ANSI) /*[*/ | 179 | #if defined(X3270_ANSI) /*[*/ |
180 | static int ansi_data = 0; | 180 | static int ansi_data = 0; |
181 | -static unsigned char *lbuf = (unsigned char *)NULL; | ||
182 | - /* line-mode input buffer */ | ||
183 | -static unsigned char *lbptr; | 181 | +// static unsigned char *lbuf = (unsigned char *)NULL; |
182 | +/* line-mode input buffer */ | ||
183 | +// static unsigned char *lbptr; | ||
184 | static int lnext = 0; | 184 | static int lnext = 0; |
185 | static int backslashed = 0; | 185 | static int backslashed = 0; |
186 | static int t_valid = 0; | 186 | static int t_valid = 0; |
@@ -194,9 +194,9 @@ static char vrprnt; | @@ -194,9 +194,9 @@ static char vrprnt; | ||
194 | static char vlnext; | 194 | static char vlnext; |
195 | #endif /*]*/ | 195 | #endif /*]*/ |
196 | 196 | ||
197 | -static int tn3270e_negotiated = 0; | ||
198 | -static enum { E_NONE, E_3270, E_NVT, E_SSCP } tn3270e_submode = E_NONE; | ||
199 | -static int tn3270e_bound = 0; | 197 | +// static int tn3270e_negotiated = 0; |
198 | +//static enum { E_NONE, E_3270, E_NVT, E_SSCP } tn3270e_submode = E_NONE; | ||
199 | +// static int tn3270e_bound = 0; | ||
200 | static char plu_name[BIND_PLU_NAME_MAX+1]; | 200 | static char plu_name[BIND_PLU_NAME_MAX+1]; |
201 | static char **lus = (char **)NULL; | 201 | static char **lus = (char **)NULL; |
202 | static char **curr_lu = (char **)NULL; | 202 | static char **curr_lu = (char **)NULL; |
@@ -887,9 +887,9 @@ static void net_connected(H3270 *session) | @@ -887,9 +887,9 @@ static void net_connected(H3270 *session) | ||
887 | session->ns_bsent = 0; | 887 | session->ns_bsent = 0; |
888 | session->ns_rsent = 0; | 888 | session->ns_rsent = 0; |
889 | session->syncing = 0; | 889 | session->syncing = 0; |
890 | - tn3270e_negotiated = 0; | ||
891 | - tn3270e_submode = E_NONE; | ||
892 | - tn3270e_bound = 0; | 890 | + session->tn3270e_negotiated = 0; |
891 | + session->tn3270e_submode = E_NONE; | ||
892 | + session->tn3270e_bound = 0; | ||
893 | 893 | ||
894 | setup_lus(); | 894 | setup_lus(); |
895 | 895 | ||
@@ -1256,7 +1256,7 @@ static int telnet_fsm(H3270 *session, unsigned char c) | @@ -1256,7 +1256,7 @@ static int telnet_fsm(H3270 *session, unsigned char c) | ||
1256 | h3270.telnet_state = TNS_DATA; | 1256 | h3270.telnet_state = TNS_DATA; |
1257 | break; | 1257 | break; |
1258 | case EOR: /* eor, process accumulated input */ | 1258 | case EOR: /* eor, process accumulated input */ |
1259 | - if (IN_3270 || (IN_E && tn3270e_negotiated)) { | 1259 | + if (IN_3270 || (IN_E && h3270.tn3270e_negotiated)) { |
1260 | h3270.ns_rrcvd++; | 1260 | h3270.ns_rrcvd++; |
1261 | if (process_eor()) | 1261 | if (process_eor()) |
1262 | return -1; | 1262 | return -1; |
@@ -1700,7 +1700,7 @@ tn3270e_negotiate(void) | @@ -1700,7 +1700,7 @@ tn3270e_negotiate(void) | ||
1700 | /* They want what we want, or less. Done. */ | 1700 | /* They want what we want, or less. Done. */ |
1701 | h3270.e_funcs = e_rcvd; | 1701 | h3270.e_funcs = e_rcvd; |
1702 | tn3270e_subneg_send(TN3270E_OP_IS, h3270.e_funcs); | 1702 | tn3270e_subneg_send(TN3270E_OP_IS, h3270.e_funcs); |
1703 | - tn3270e_negotiated = 1; | 1703 | + h3270.tn3270e_negotiated = 1; |
1704 | trace_dsn("TN3270E option negotiation complete.\n"); | 1704 | trace_dsn("TN3270E option negotiation complete.\n"); |
1705 | check_in3270(&h3270); | 1705 | check_in3270(&h3270); |
1706 | } else { | 1706 | } else { |
@@ -1736,7 +1736,7 @@ tn3270e_negotiate(void) | @@ -1736,7 +1736,7 @@ tn3270e_negotiate(void) | ||
1736 | break; | 1736 | break; |
1737 | } | 1737 | } |
1738 | } | 1738 | } |
1739 | - tn3270e_negotiated = 1; | 1739 | + h3270.tn3270e_negotiated = 1; |
1740 | trace_dsn("TN3270E option negotiation complete.\n"); | 1740 | trace_dsn("TN3270E option negotiation complete.\n"); |
1741 | check_in3270(&h3270); | 1741 | check_in3270(&h3270); |
1742 | break; | 1742 | break; |
@@ -1886,9 +1886,9 @@ process_eor(void) | @@ -1886,9 +1886,9 @@ process_eor(void) | ||
1886 | switch (h->data_type) { | 1886 | switch (h->data_type) { |
1887 | case TN3270E_DT_3270_DATA: | 1887 | case TN3270E_DT_3270_DATA: |
1888 | if ((h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)) && | 1888 | if ((h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE)) && |
1889 | - !tn3270e_bound) | 1889 | + !h3270.tn3270e_bound) |
1890 | return 0; | 1890 | return 0; |
1891 | - tn3270e_submode = E_3270; | 1891 | + h3270.tn3270e_submode = E_3270; |
1892 | check_in3270(&h3270); | 1892 | check_in3270(&h3270); |
1893 | h3270.response_required = h->response_flag; | 1893 | h3270.response_required = h->response_flag; |
1894 | rv = process_ds(h3270.ibuf + EH_SIZE, | 1894 | rv = process_ds(h3270.ibuf + EH_SIZE, |
@@ -1906,20 +1906,20 @@ process_eor(void) | @@ -1906,20 +1906,20 @@ process_eor(void) | ||
1906 | return 0; | 1906 | return 0; |
1907 | process_bind(h3270.ibuf + EH_SIZE, (h3270.ibptr - h3270.ibuf) - EH_SIZE); | 1907 | process_bind(h3270.ibuf + EH_SIZE, (h3270.ibptr - h3270.ibuf) - EH_SIZE); |
1908 | trace_dsn("< BIND PLU-name '%s'\n", plu_name); | 1908 | trace_dsn("< BIND PLU-name '%s'\n", plu_name); |
1909 | - tn3270e_bound = 1; | 1909 | + h3270.tn3270e_bound = 1; |
1910 | check_in3270(&h3270); | 1910 | check_in3270(&h3270); |
1911 | return 0; | 1911 | return 0; |
1912 | case TN3270E_DT_UNBIND: | 1912 | case TN3270E_DT_UNBIND: |
1913 | if (!(h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE))) | 1913 | if (!(h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE))) |
1914 | return 0; | 1914 | return 0; |
1915 | - tn3270e_bound = 0; | ||
1916 | - if (tn3270e_submode == E_3270) | ||
1917 | - tn3270e_submode = E_NONE; | 1915 | + h3270.tn3270e_bound = 0; |
1916 | + if (h3270.tn3270e_submode == E_3270) | ||
1917 | + h3270.tn3270e_submode = E_NONE; | ||
1918 | check_in3270(&h3270); | 1918 | check_in3270(&h3270); |
1919 | return 0; | 1919 | return 0; |
1920 | case TN3270E_DT_NVT_DATA: | 1920 | case TN3270E_DT_NVT_DATA: |
1921 | /* In tn3270e NVT mode */ | 1921 | /* In tn3270e NVT mode */ |
1922 | - tn3270e_submode = E_NVT; | 1922 | + h3270.tn3270e_submode = E_NVT; |
1923 | check_in3270(&h3270); | 1923 | check_in3270(&h3270); |
1924 | for (s = h3270.ibuf; s < h3270.ibptr; s++) { | 1924 | for (s = h3270.ibuf; s < h3270.ibptr; s++) { |
1925 | ansi_process(*s++); | 1925 | ansi_process(*s++); |
@@ -1928,7 +1928,7 @@ process_eor(void) | @@ -1928,7 +1928,7 @@ process_eor(void) | ||
1928 | case TN3270E_DT_SSCP_LU_DATA: | 1928 | case TN3270E_DT_SSCP_LU_DATA: |
1929 | if (!(h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE))) | 1929 | if (!(h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE))) |
1930 | return 0; | 1930 | return 0; |
1931 | - tn3270e_submode = E_SSCP; | 1931 | + h3270.tn3270e_submode = E_SSCP; |
1932 | check_in3270(&h3270); | 1932 | check_in3270(&h3270); |
1933 | ctlr_write_sscp_lu(&h3270, h3270.ibuf + EH_SIZE,(h3270.ibptr - h3270.ibuf) - EH_SIZE); | 1933 | ctlr_write_sscp_lu(&h3270, h3270.ibuf + EH_SIZE,(h3270.ibptr - h3270.ibuf) - EH_SIZE); |
1934 | return 0; | 1934 | return 0; |
@@ -2196,9 +2196,9 @@ static void net_cookout(H3270 *hSession, const char *buf, int len) | @@ -2196,9 +2196,9 @@ static void net_cookout(H3270 *hSession, const char *buf, int len) | ||
2196 | static void | 2196 | static void |
2197 | cooked_init(void) | 2197 | cooked_init(void) |
2198 | { | 2198 | { |
2199 | - if (lbuf == (unsigned char *)NULL) | ||
2200 | - lbuf = (unsigned char *)lib3270_malloc(BUFSZ); | ||
2201 | - lbptr = lbuf; | 2199 | + if (h3270.lbuf == (unsigned char *)NULL) |
2200 | + h3270.lbuf = (unsigned char *)lib3270_malloc(BUFSZ); | ||
2201 | + h3270.lbptr = h3270.lbuf; | ||
2202 | lnext = 0; | 2202 | lnext = 0; |
2203 | backslashed = 0; | 2203 | backslashed = 0; |
2204 | } | 2204 | } |
@@ -2213,17 +2213,17 @@ ansi_process_s(const char *data) | @@ -2213,17 +2213,17 @@ ansi_process_s(const char *data) | ||
2213 | static void | 2213 | static void |
2214 | forward_data(void) | 2214 | forward_data(void) |
2215 | { | 2215 | { |
2216 | - net_cookedout(&h3270, (char *) lbuf, lbptr - lbuf); | 2216 | + net_cookedout(&h3270, (char *) h3270.lbuf, h3270.lbptr - h3270.lbuf); |
2217 | cooked_init(); | 2217 | cooked_init(); |
2218 | } | 2218 | } |
2219 | 2219 | ||
2220 | static void | 2220 | static void |
2221 | do_data(char c) | 2221 | do_data(char c) |
2222 | { | 2222 | { |
2223 | - if (lbptr+1 < lbuf + BUFSZ) { | ||
2224 | - *lbptr++ = c; | 2223 | + if (h3270.lbptr+1 < h3270.lbuf + BUFSZ) { |
2224 | + *h3270.lbptr++ = c; | ||
2225 | if (c == '\r') | 2225 | if (c == '\r') |
2226 | - *lbptr++ = 'lbptr++ = '\0';'; | 2226 | + *h3270.lbptr++ = 'lbptr++ = '\0';'; |
2227 | if (c == '\t') | 2227 | if (c == '\t') |
2228 | ansi_process((unsigned int) c); | 2228 | ansi_process((unsigned int) c); |
2229 | else | 2229 | else |
@@ -2264,7 +2264,7 @@ do_cerase(char c) | @@ -2264,7 +2264,7 @@ do_cerase(char c) | ||
2264 | int len; | 2264 | int len; |
2265 | 2265 | ||
2266 | if (backslashed) { | 2266 | if (backslashed) { |
2267 | - lbptr--; | 2267 | + h3270.lbptr--; |
2268 | ansi_process_s("\b"); | 2268 | ansi_process_s("\b"); |
2269 | do_data(c); | 2269 | do_data(c); |
2270 | return; | 2270 | return; |
@@ -2273,8 +2273,8 @@ do_cerase(char c) | @@ -2273,8 +2273,8 @@ do_cerase(char c) | ||
2273 | do_data(c); | 2273 | do_data(c); |
2274 | return; | 2274 | return; |
2275 | } | 2275 | } |
2276 | - if (lbptr > lbuf) { | ||
2277 | - len = strlen(ctl_see((int) *--lbptr)); | 2276 | + if (h3270.lbptr > h3270.lbuf) { |
2277 | + len = strlen(ctl_see((int) *--h3270.lbptr)); | ||
2278 | 2278 | ||
2279 | while (len--) | 2279 | while (len--) |
2280 | ansi_process_s("\b \b"); | 2280 | ansi_process_s("\b \b"); |
@@ -2291,14 +2291,14 @@ do_werase(char c) | @@ -2291,14 +2291,14 @@ do_werase(char c) | ||
2291 | do_data(c); | 2291 | do_data(c); |
2292 | return; | 2292 | return; |
2293 | } | 2293 | } |
2294 | - while (lbptr > lbuf) { | 2294 | + while (h3270.lbptr > h3270.lbuf) { |
2295 | char ch; | 2295 | char ch; |
2296 | 2296 | ||
2297 | - ch = *--lbptr; | 2297 | + ch = *--h3270.lbptr; |
2298 | 2298 | ||
2299 | if (ch == ' ' || ch == '\t') { | 2299 | if (ch == ' ' || ch == '\t') { |
2300 | if (any) { | 2300 | if (any) { |
2301 | - ++lbptr; | 2301 | + ++h3270.lbptr; |
2302 | break; | 2302 | break; |
2303 | } | 2303 | } |
2304 | } else | 2304 | } else |
@@ -2316,7 +2316,7 @@ do_kill(char c) | @@ -2316,7 +2316,7 @@ do_kill(char c) | ||
2316 | int i, len; | 2316 | int i, len; |
2317 | 2317 | ||
2318 | if (backslashed) { | 2318 | if (backslashed) { |
2319 | - lbptr--; | 2319 | + h3270.lbptr--; |
2320 | ansi_process_s("\b"); | 2320 | ansi_process_s("\b"); |
2321 | do_data(c); | 2321 | do_data(c); |
2322 | return; | 2322 | return; |
@@ -2325,8 +2325,8 @@ do_kill(char c) | @@ -2325,8 +2325,8 @@ do_kill(char c) | ||
2325 | do_data(c); | 2325 | do_data(c); |
2326 | return; | 2326 | return; |
2327 | } | 2327 | } |
2328 | - while (lbptr > lbuf) { | ||
2329 | - len = strlen(ctl_see((int) *--lbptr)); | 2328 | + while (h3270.lbptr > h3270.lbuf) { |
2329 | + len = strlen(ctl_see((int) *--h3270.lbptr)); | ||
2330 | 2330 | ||
2331 | for (i = 0; i < len; i++) | 2331 | for (i = 0; i < len; i++) |
2332 | ansi_process_s("\b \b"); | 2332 | ansi_process_s("\b \b"); |
@@ -2344,7 +2344,7 @@ do_rprnt(char c) | @@ -2344,7 +2344,7 @@ do_rprnt(char c) | ||
2344 | } | 2344 | } |
2345 | ansi_process_s(ctl_see((int) c)); | 2345 | ansi_process_s(ctl_see((int) c)); |
2346 | ansi_process_s("\r\n"); | 2346 | ansi_process_s("\r\n"); |
2347 | - for (p = lbuf; p < lbptr; p++) | 2347 | + for (p = h3270.lbuf; p < h3270.lbptr; p++) |
2348 | ansi_process_s(ctl_see((int) *p)); | 2348 | ansi_process_s(ctl_see((int) *p)); |
2349 | } | 2349 | } |
2350 | 2350 | ||
@@ -2352,7 +2352,7 @@ static void | @@ -2352,7 +2352,7 @@ static void | ||
2352 | do_eof(char c) | 2352 | do_eof(char c) |
2353 | { | 2353 | { |
2354 | if (backslashed) { | 2354 | if (backslashed) { |
2355 | - lbptr--; | 2355 | + h3270.lbptr--; |
2356 | ansi_process_s("\b"); | 2356 | ansi_process_s("\b"); |
2357 | do_data(c); | 2357 | do_data(c); |
2358 | return; | 2358 | return; |
@@ -2372,12 +2372,12 @@ do_eol(char c) | @@ -2372,12 +2372,12 @@ do_eol(char c) | ||
2372 | do_data(c); | 2372 | do_data(c); |
2373 | return; | 2373 | return; |
2374 | } | 2374 | } |
2375 | - if (lbptr+2 >= lbuf + BUFSZ) { | 2375 | + if (h3270.lbptr+2 >= h3270.lbuf + BUFSZ) { |
2376 | ansi_process_s("\007"); | 2376 | ansi_process_s("\007"); |
2377 | return; | 2377 | return; |
2378 | } | 2378 | } |
2379 | - *lbptr++ = '\r'; | ||
2380 | - *lbptr++ = '\n'; | 2379 | + *h3270.lbptr++ = '\r'; |
2380 | + *h3270.lbptr++ = '\n'; | ||
2381 | ansi_process_s("\r\n"); | 2381 | ansi_process_s("\r\n"); |
2382 | forward_data(); | 2382 | forward_data(); |
2383 | } | 2383 | } |
@@ -2422,9 +2422,9 @@ check_in3270(H3270 *session) | @@ -2422,9 +2422,9 @@ check_in3270(H3270 *session) | ||
2422 | 2422 | ||
2423 | #if defined(X3270_TN3270E) /*[*/ | 2423 | #if defined(X3270_TN3270E) /*[*/ |
2424 | if (h3270.myopts[TELOPT_TN3270E]) { | 2424 | if (h3270.myopts[TELOPT_TN3270E]) { |
2425 | - if (!tn3270e_negotiated) | 2425 | + if (!h3270.tn3270e_negotiated) |
2426 | new_cstate = CONNECTED_INITIAL_E; | 2426 | new_cstate = CONNECTED_INITIAL_E; |
2427 | - else switch (tn3270e_submode) { | 2427 | + else switch (h3270.tn3270e_submode) { |
2428 | case E_NONE: | 2428 | case E_NONE: |
2429 | new_cstate = CONNECTED_INITIAL_E; | 2429 | new_cstate = CONNECTED_INITIAL_E; |
2430 | break; | 2430 | break; |
@@ -2488,9 +2488,9 @@ check_in3270(H3270 *session) | @@ -2488,9 +2488,9 @@ check_in3270(H3270 *session) | ||
2488 | #if defined(X3270_TN3270E) /*[*/ | 2488 | #if defined(X3270_TN3270E) /*[*/ |
2489 | /* If we fell out of TN3270E, remove the state. */ | 2489 | /* If we fell out of TN3270E, remove the state. */ |
2490 | if (!h3270.myopts[TELOPT_TN3270E]) { | 2490 | if (!h3270.myopts[TELOPT_TN3270E]) { |
2491 | - tn3270e_negotiated = 0; | ||
2492 | - tn3270e_submode = E_NONE; | ||
2493 | - tn3270e_bound = 0; | 2491 | + h3270.tn3270e_negotiated = 0; |
2492 | + h3270.tn3270e_submode = E_NONE; | ||
2493 | + h3270.tn3270e_bound = 0; | ||
2494 | } | 2494 | } |
2495 | #endif /*]*/ | 2495 | #endif /*]*/ |
2496 | trace_dsn("Now operating in %s mode.\n",state_name[new_cstate]); | 2496 | trace_dsn("Now operating in %s mode.\n",state_name[new_cstate]); |
@@ -2803,13 +2803,13 @@ net_add_dummy_tn3270e(void) | @@ -2803,13 +2803,13 @@ net_add_dummy_tn3270e(void) | ||
2803 | { | 2803 | { |
2804 | tn3270e_header *h; | 2804 | tn3270e_header *h; |
2805 | 2805 | ||
2806 | - if (!IN_E || tn3270e_submode == E_NONE) | 2806 | + if (!IN_E || h3270.tn3270e_submode == E_NONE) |
2807 | return False; | 2807 | return False; |
2808 | 2808 | ||
2809 | space3270out(EH_SIZE); | 2809 | space3270out(EH_SIZE); |
2810 | h = (tn3270e_header *)h3270.obptr; | 2810 | h = (tn3270e_header *)h3270.obptr; |
2811 | 2811 | ||
2812 | - switch (tn3270e_submode) { | 2812 | + switch (h3270.tn3270e_submode) { |
2813 | case E_NONE: | 2813 | case E_NONE: |
2814 | break; | 2814 | break; |
2815 | case E_NVT: | 2815 | case E_NVT: |
@@ -3001,23 +3001,23 @@ net_abort(void) | @@ -3001,23 +3001,23 @@ net_abort(void) | ||
3001 | * SSCP-LU mode), or should we put ourselves in it? | 3001 | * SSCP-LU mode), or should we put ourselves in it? |
3002 | * Time, and testers, will tell. | 3002 | * Time, and testers, will tell. |
3003 | */ | 3003 | */ |
3004 | - switch (tn3270e_submode) { | 3004 | + switch (h3270.tn3270e_submode) { |
3005 | case E_NONE: | 3005 | case E_NONE: |
3006 | case E_NVT: | 3006 | case E_NVT: |
3007 | break; | 3007 | break; |
3008 | case E_SSCP: | 3008 | case E_SSCP: |
3009 | net_rawout(&h3270, buf, sizeof(buf)); | 3009 | net_rawout(&h3270, buf, sizeof(buf)); |
3010 | trace_dsn("SENT AO\n"); | 3010 | trace_dsn("SENT AO\n"); |
3011 | - if (tn3270e_bound || | 3011 | + if (h3270.tn3270e_bound || |
3012 | !(h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE))) { | 3012 | !(h3270.e_funcs & E_OPT(TN3270E_FUNC_BIND_IMAGE))) { |
3013 | - tn3270e_submode = E_3270; | 3013 | + h3270.tn3270e_submode = E_3270; |
3014 | check_in3270(&h3270); | 3014 | check_in3270(&h3270); |
3015 | } | 3015 | } |
3016 | break; | 3016 | break; |
3017 | case E_3270: | 3017 | case E_3270: |
3018 | net_rawout(&h3270, buf, sizeof(buf)); | 3018 | net_rawout(&h3270, buf, sizeof(buf)); |
3019 | trace_dsn("SENT AO\n"); | 3019 | trace_dsn("SENT AO\n"); |
3020 | - tn3270e_submode = E_SSCP; | 3020 | + h3270.tn3270e_submode = E_SSCP; |
3021 | check_in3270(&h3270); | 3021 | check_in3270(&h3270); |
3022 | break; | 3022 | break; |
3023 | } | 3023 | } |
@@ -3157,7 +3157,7 @@ net_snap_options(void) | @@ -3157,7 +3157,7 @@ net_snap_options(void) | ||
3157 | *h3270.obptr++ = IAC; | 3157 | *h3270.obptr++ = IAC; |
3158 | *h3270.obptr++ = SE; | 3158 | *h3270.obptr++ = SE; |
3159 | 3159 | ||
3160 | - if (tn3270e_bound) { | 3160 | + if (h3270.tn3270e_bound) { |
3161 | tn3270e_header *h; | 3161 | tn3270e_header *h; |
3162 | 3162 | ||
3163 | space3270out(EH_SIZE + 3); | 3163 | space3270out(EH_SIZE + 3); |