Commit 1a61394c2a0471d6a5338609161030fc4e9a5e0c

Authored by Perry Werneck
2 parents 70935bf2 8c67970f
Exists in master and in 1 other branch develop

Merge branch 'develop' of https://github.com/PerryWerneck/libv3270 into develop

.github/workflows/codeql-analysis.yml
@@ -71,7 +71,8 @@ jobs: @@ -71,7 +71,8 @@ jobs:
71 ./configure --prefix=/usr 71 ./configure --prefix=/usr
72 make all 72 make all
73 sudo make install 73 sudo make install
74 - cd .. 74 + cd ..
  75 + sudo rm -fr lib3270
75 76
76 - name: build 77 - name: build
77 run: | 78 run: |
@@ -20,8 +20,8 @@ For the supported distributions get the install repositories and instructions fr @@ -20,8 +20,8 @@ For the supported distributions get the install repositories and instructions fr
20 20
21 ### Requirements 21 ### Requirements
22 22
23 - * GTK-3 (https://www.gtk.org/)  
24 - * lib3270 (https://softwarepublico.gov.br/social/pw3270/) 23 + * [GTK3](https://www.gtk.org/)
  24 + * [lib3270](../../../lib3270)
25 25
26 ### Building 26 ### Building
27 27
src/filetransfer/v3270ftprogress.c
@@ -485,7 +485,9 @@ void v3270ftprogress_update(GtkWidget *widget, unsigned long current, unsigned l @@ -485,7 +485,9 @@ void v3270ftprogress_update(GtkWidget *widget, unsigned long current, unsigned l
485 char buffer[40]; 485 char buffer[40];
486 double seconds = ((double) remaining) / kbytes_sec; 486 double seconds = ((double) remaining) / kbytes_sec;
487 time_t eta = time(0) + ((time_t) seconds); 487 time_t eta = time(0) + ((time_t) seconds);
488 - strftime(buffer, 39, "%H:%M:%S", localtime(&eta)); 488 + struct tm tm;
  489 +
  490 + strftime(buffer, 39, "%H:%M:%S", localtime_r(&eta,&tm));
489 491
490 gtk_entry_set_text(dialog->info[PROGRESS_FIELD_ETA],buffer); 492 gtk_entry_set_text(dialog->info[PROGRESS_FIELD_ETA],buffer);
491 493
src/filetransfer/worker.c
@@ -455,7 +455,8 @@ @@ -455,7 +455,8 @@
455 char buffer[40]; 455 char buffer[40];
456 double seconds = ((double) remaining) / update->kbytes_sec; 456 double seconds = ((double) remaining) / update->kbytes_sec;
457 time_t eta = time(NULL) + ((time_t) seconds); 457 time_t eta = time(NULL) + ((time_t) seconds);
458 - strftime(buffer, 39, "%H:%M:%S", localtime(&eta)); 458 + struct tm tm;
  459 + strftime(buffer, 39, "%H:%M:%S", localtime_r(&eta,&tm));
459 460
460 gtk_entry_set_text(update->worker->field[PROGRESS_FIELD_ETA],buffer); 461 gtk_entry_set_text(update->worker->field[PROGRESS_FIELD_ETA],buffer);
461 462