comparison src/uicommon/gftpui.c @ 783:6f766002bff2

2006-7-21 Brian Masney <masneyb@gftp.org> * src/gtk/misc-gtk.c (update_window_info) - fixed the default protocol dropdown when some protocols are disabled (from Aurelien Jarno <aurelien@aurel32.net>) (closes #348177) * src/uicommon/gftpui.c (_gftpui_common_thread_callback) - don't use pause(). This causes a problem on systems that use NPTL. Use nanosleep() instead (from Aurelien Jarno <aurelien@aurel32.net>) (closes #320883)
author masneyb
date Fri, 21 Jul 2006 13:17:33 +0000
parents c1144630c4f4
children ca59edd1b04d
comparison
equal deleted inserted replaced
782:deb8a8b07797 783:6f766002bff2
52 _gftpui_common_thread_callback (void * data) 52 _gftpui_common_thread_callback (void * data)
53 { 53 {
54 intptr_t network_timeout, sleep_time; 54 intptr_t network_timeout, sleep_time;
55 gftpui_callback_data * cdata; 55 gftpui_callback_data * cdata;
56 int success, sj, num_timeouts; 56 int success, sj, num_timeouts;
57 struct timespec ts;
57 58
58 cdata = data; 59 cdata = data;
59 gftp_lookup_request_option (cdata->request, "network_timeout", 60 gftp_lookup_request_option (cdata->request, "network_timeout",
60 &network_timeout); 61 &network_timeout);
61 gftp_lookup_request_option (cdata->request, "sleep_time", 62 gftp_lookup_request_option (cdata->request, "sleep_time",
88 89
89 cdata->retries--; 90 cdata->retries--;
90 cdata->request->logging_function (gftp_logging_error, cdata->request, 91 cdata->request->logging_function (gftp_logging_error, cdata->request,
91 _("Waiting %d seconds until trying to connect again\n"), 92 _("Waiting %d seconds until trying to connect again\n"),
92 sleep_time); 93 sleep_time);
93 alarm (sleep_time); 94
94 pause (); 95 ts.tv_sec = sleep_time;
96 ts.tv_nsec = 0;
97 if (nanosleep (&ts, NULL) == 0)
98 siglongjmp (gftpui_common_jmp_environment, 2);
95 } 99 }
96 } 100 }
97 else 101 else
98 { 102 {
99 _gftpui_cb_disconnect (cdata); 103 _gftpui_cb_disconnect (cdata);