Commit e31449f624219a6162d393d345cf5594704b5a25
1 parent
077ee0c9
Exists in
master
and in
3 other branches
Ajustes para windows, incluindo detecção via ./configure e uso da função getaddr…
…info quando disponível
Showing
7 changed files
with
7 additions
and
30 deletions
Show diff stats
Makefile.in
glue.c
... | ... | @@ -810,7 +810,7 @@ Boolean error_popup_visible = False; |
810 | 810 | |
811 | 811 | |
812 | 812 | /* Pop up an error dialog, based on an error number. */ |
813 | -void popup_an_errno(int errn, const char *fmt, ...) | |
813 | +void popup_an_errno(H3270 *session, int errn, const char *fmt, ...) | |
814 | 814 | { |
815 | 815 | char vmsgbuf[4096]; |
816 | 816 | va_list args; |
... | ... | @@ -819,7 +819,7 @@ void popup_an_errno(int errn, const char *fmt, ...) |
819 | 819 | (void) vsprintf(vmsgbuf, fmt, args); |
820 | 820 | va_end(args); |
821 | 821 | |
822 | - lib3270_write_log("3270", "Error Popup:\n%s\nrc=%d (%s)",vmsgbuf,errn,strerror(errn)); | |
822 | + lib3270_write_log(session, "3270", "Error Popup:\n%s\nrc=%d (%s)",vmsgbuf,errn,strerror(errn)); | |
823 | 823 | |
824 | 824 | Error(NULL,vmsgbuf); |
825 | 825 | } | ... | ... |
host.c
... | ... | @@ -645,7 +645,7 @@ int lib3270_connect(H3270 *h, const char *n, int wait) |
645 | 645 | */ |
646 | 646 | static void try_reconnect(H3270 *session) |
647 | 647 | { |
648 | - lib3270_write_log("3270","Starting auto-reconnect (Host: %s)",session->full_current_host ? session->full_current_host : "-"); | |
648 | + lib3270_write_log(session,"3270","Starting auto-reconnect (Host: %s)",session->full_current_host ? session->full_current_host : "-"); | |
649 | 649 | session->auto_reconnect_inprogress = False; |
650 | 650 | lib3270_reconnect(session,0); |
651 | 651 | } | ... | ... |
popupsc.h
... | ... | @@ -14,5 +14,5 @@ |
14 | 14 | |
15 | 15 | /* Non-display version of popupsc.h */ |
16 | 16 | |
17 | -LIB3270_INTERNAL void popup_an_errno(int errn, const char *fmt, ...); | |
17 | +LIB3270_INTERNAL void popup_an_errno(H3270 *session, int errn, const char *fmt, ...); | |
18 | 18 | LIB3270_INTERNAL void action_output(const char *fmt, ...); | ... | ... |
resolver.c
... | ... | @@ -86,9 +86,7 @@ struct parms |
86 | 86 | */ |
87 | 87 | static int cresolve_host_and_port(H3270 *h, struct parms *p) |
88 | 88 | { |
89 | -#warning Should use configure to detect getaddrinfo and use it if available. | |
90 | - | |
91 | -#ifdef AF_INET6 | |
89 | +#ifdef HAVE_GETADDRINFO | |
92 | 90 | |
93 | 91 | struct addrinfo hints, *res; |
94 | 92 | int rc; | ... | ... |
telnet.c
... | ... | @@ -3277,7 +3277,7 @@ static void client_info_callback(INFO_CONST SSL *s, int where, int ret) |
3277 | 3277 | if (ret == 0) |
3278 | 3278 | { |
3279 | 3279 | trace_dsn("SSL_connect: failed in %s\n",SSL_state_string_long(s)); |
3280 | - lib3270_write_log("SSL","connect failed in %s (Alert: %s)",SSL_state_string_long(s),SSL_alert_type_string_long(ret)); | |
3280 | + lib3270_write_log(&h3270,"SSL","connect failed in %s (Alert: %s)",SSL_state_string_long(s),SSL_alert_type_string_long(ret)); | |
3281 | 3281 | } |
3282 | 3282 | else if (ret < 0) |
3283 | 3283 | { | ... | ... |
trace_ds.c
... | ... | @@ -246,27 +246,6 @@ static void __vwtrace(H3270 *session, const char *fmt, va_list args) |
246 | 246 | fflush(stdout); |
247 | 247 | } |
248 | 248 | |
249 | -/* | |
250 | -static void vwtrace(const char *fmt, va_list args) | |
251 | -{ | |
252 | - char buf[16384]; | |
253 | - | |
254 | - vsnprintf(buf,16384,fmt,args); | |
255 | - | |
256 | - if(!tracewindow_handle) | |
257 | - tracewindow_handle = console_window_new( _( "Trace Window" ), NULL ); | |
258 | - | |
259 | - if(tracewindow_handle) | |
260 | - console_window_append(tracewindow_handle,"%s",buf); | |
261 | - | |
262 | - if(tracef != NULL) | |
263 | - { | |
264 | - if(fwrite(buf,strlen(buf),1,tracef) != 1) | |
265 | - popup_an_errno(errno,_( "Write to trace file failed\n%s" ),strerror(errno)); | |
266 | - } | |
267 | -} | |
268 | -*/ | |
269 | - | |
270 | 249 | /* Write to the trace file. */ |
271 | 250 | static void wtrace(const char *fmt, ...) |
272 | 251 | { | ... | ... |