rpms/xcdroast/devel xcdroast-0.98alpha15-frozen_gui.patch, NONE, 1.1 xcdroast.spec, 1.19, 1.20
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Apr 18 13:33:16 UTC 2005
Update of /cvs/dist/rpms/xcdroast/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv32126
Modified Files:
xcdroast.spec
Added Files:
xcdroast-0.98alpha15-frozen_gui.patch
Log Message:
fixed frozen progress bars with patch from Didier Heyden (bug #134334)
xcdroast-0.98alpha15-frozen_gui.patch:
io.c | 2 +-
main.h | 1 +
tools.c | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 65 insertions(+), 1 deletion(-)
--- NEW FILE xcdroast-0.98alpha15-frozen_gui.patch ---
diff -ur xcdroast-0.98alpha15/src/io.c xcdroast-0.98alpha15.new/src/io.c
--- xcdroast-0.98alpha15/src/io.c 2004-12-15 10:28:52.624442832 +0100
+++ xcdroast-0.98alpha15.new/src/io.c 2004-12-15 10:10:35.000000000 +0100
@@ -2970,7 +2970,7 @@
/* read output of getcdtoc */
- n = read_line(source, line, MAXLINE);
+ n = read_line_wait(source, line, MAXLINE);
/* getcdtoc finished */
if (n <= 0) {
diff -ur xcdroast-0.98alpha15/src/main.h xcdroast-0.98alpha15.new/src/main.h
--- xcdroast-0.98alpha15/src/main.h 2003-10-30 13:49:04.000000000 +0100
+++ xcdroast-0.98alpha15.new/src/main.h 2004-12-15 10:21:34.000000000 +0100
@@ -137,6 +137,7 @@
gint determine_cd_type(gchar *ret, gint mode);
gint determine_free_space(gint *biggestfree);
gint read_line(gint fd, gchar *ptr, gint maxlen);
+gint read_line_wait(gint fd, gchar *ptr, gint maxlen);
gint allocate_track_filenames(gint *overwrite, gint *overwritebiggest);
gint scan_for_toc_files();
void print_trackreadset();
diff -ur xcdroast-0.98alpha15/src/tools.c xcdroast-0.98alpha15.new/src/tools.c
--- xcdroast-0.98alpha15/src/tools.c 2004-12-15 10:28:52.612444656 +0100
+++ xcdroast-0.98alpha15.new/src/tools.c 2004-12-15 10:24:35.000000000 +0100
@@ -596,6 +596,69 @@
if (rc == -1 && errno == EAGAIN) {
if (n == 1)
return(-1);
+ else
+ break;
+ }
+ return(-1); /* error */
+ }
+ }
+
+ /* terminate the string */
+ *ptr = 0;
+
+ /* strip of some trailing chars - yes..we need both levels */
+ ptr--;
+ if ((*ptr == '\n') || (*ptr == '\r') ) {
+ *ptr = 0;
+ }
+ ptr--;
+ if ((*ptr == '\n') || (*ptr == '\r') ) {
+ *ptr = 0;
+ }
+
+ if (strlen(str) == 0) {
+ /* if we read an empty string, but are NOT on EOF return 1 */
+ return 1;
+ } else {
+ return(strlen(str));
+ }
+}
+
+
+/*
+ * Use this version to work around some of the critical races
+ * such as bz 127658. This issue should be solved on a case by case basis.
+ * Expected side effects: GUI freezes (e.g. if called from read_write_out() in io.c).
+ */
+
+gint read_line_wait(gint fd, gchar *ptr, gint maxlen) {
+gint n, rc;
+gchar c;
+gchar *str;
+
+ str = ptr;
+
+ for (n = 1; n < maxlen; n++) {
+ if ( (rc = read(fd, &c, 1)) == 1) {
+ *ptr++ = c;
+ if (c == '\n') {
+ break;
+ }
+
+ } else if (rc == 0) {
+ /* EOF */
+ if (n == 1)
+ return(0); /* EOF, no data read */
+ else
+ break; /* EOF, some data was read */
+ } else if (rc == -2) {
+ /* timeout while reading string */
+ return(-2);
+ } else {
+ /* nonblocking mode an nothing to read? */
+ if (rc == -1 && errno == EAGAIN) {
+ if (n == 1)
+ return(-1);
else {
/* Partial line read. Wait a
* bit longer in case there's
Index: xcdroast.spec
===================================================================
RCS file: /cvs/dist/rpms/xcdroast/devel/xcdroast.spec,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- xcdroast.spec 3 Mar 2005 12:48:02 -0000 1.19
+++ xcdroast.spec 18 Apr 2005 13:33:14 -0000 1.20
@@ -1,7 +1,7 @@
Summary: An X Window System based tool for creating CDs.
Name: xcdroast
Version: 0.98a15
-Release: 10
+Release: 11
License: GPL
Group: Applications/Multimedia
Source: http://prdownloads.sourceforge.net/xcdroast/xcdroast-0.98alpha15.tar.gz
@@ -12,6 +12,8 @@
Patch4: xcdroast-0.98alpha15-nowarn.patch
Patch5: xcdroast-0.98alpha15-scan.patch
Patch6: xcdroast-0.98alpha15-prodvd.patch
+Patch7: xcdroast-0.98alpha15-frozen_gui.patch
+
Url: http://www.xcdroast.org/
BuildRoot: /var/tmp/%{name}-root
Requires: cdrecord >= 2.0, mkisofs >= 2.0
@@ -34,6 +36,7 @@
%patch4 -p1 -b .nowarn
%patch5 -p1 -b .scan
%patch6 -p1 -b .prodvd
+%patch7 -p1 -b .frozen
%build
%configure --enable-gtk2 --disable-nonrootmode
@@ -70,6 +73,9 @@
%{_datadir}/applications/*
%changelog
+* Mon Apr 18 2004 Harald Hoyer <harald at redhat.com> - 0.98a15-11
+- fixed frozen progress bars with patch from Didier Heyden (bug #134334)
+
* Thu Mar 03 2005 Harald Hoyer <harald at redhat.com>
- rebuilt
More information about the fedora-cvs-commits
mailing list