Package: packeth
Version: 1.6.5-2
Severity: important
Tags: patch

Hi there!

Removing all gdk_flush() calls from src/function_send.c fixes the
crashes.

FYI, very similar fix is also applied in upstream version 1.7.3.


-- System Information:
Debian Release: 7.1
  APT prefers stable
  APT policy: (990, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages packeth depends on:
ii  libatk1.0-0         2.4.0-2
ii  libc6               2.13-38
ii  libgdk-pixbuf2.0-0  2.26.1-1
ii  libglib2.0-0        2.33.12+really2.32.4-5
ii  libgtk2.0-0         2.24.10-2

packeth recommends no packages.

packeth suggests no packages.

-- no debconf information
diff --git a/src/function_send.c b/src/function_send.c
index 3a131d9..7e0867c 100644
--- a/src/function_send.c
+++ b/src/function_send.c
@@ -187,7 +187,7 @@ void* sendbuilt (void *parameters)
                 	gtk_statusbar_push(GTK_STATUSBAR(p->button), GPOINTER_TO_INT(p->context_id), buff);
 
                 	error("Sorry but need the su rights!");
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 return NULL;
         }
 
@@ -207,7 +207,7 @@ void* sendbuilt (void *parameters)
                         gtk_statusbar_push(GTK_STATUSBAR(p->button), GPOINTER_TO_INT(p->context_id), buff);
 
 	                error("Error: Could not open socket!");
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 return NULL;
         }
 
@@ -232,7 +232,7 @@ void* sendbuilt (void *parameters)
 
                 	snprintf(buff, 100, "No such interface: %s", iftext);
                 	error(buff);
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 close(fd);
                 return NULL;
         }
@@ -254,7 +254,7 @@ void* sendbuilt (void *parameters)
 
                         snprintf(buff, 100, "Interface %s is down", iftext);
                 	error(buff);
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 close(fd);
                 return NULL;
         }
@@ -282,7 +282,6 @@ void* sendbuilt (void *parameters)
 	if (number < 60)
 		number = 60;
 
-
 	gtk_widget_set_sensitive (p->button1, FALSE);
 	gtk_widget_set_sensitive (p->button2, FALSE);
 	gtk_widget_set_sensitive (p->button3, FALSE);
@@ -321,7 +320,7 @@ void* sendbuilt (void *parameters)
                                 gtk_statusbar_push(GTK_STATUSBAR(p->button),
                                                                 GPOINTER_TO_INT(p->context_id), buff);
 
-                                gdk_flush();gdk_threads_leave ();
+                                gdk_threads_leave ();
 				close(fd);
                                 return NULL;
                         }
@@ -353,7 +352,7 @@ void* sendbuilt (void *parameters)
 			snprintf(buff, 100, "  Sent %ld packets on %s (%d packets/s, %d kbit/s data rate, %d kbit/s link utilization)", sentnumber, iftext, pkts, mbps, link);
                         gtk_statusbar_push(GTK_STATUSBAR(p->button), GPOINTER_TO_INT(p->context_id), buff);
 
-                        gdk_flush();gdk_threads_leave ();
+                        gdk_threads_leave ();
 
                         seconds++;
                 }
@@ -716,7 +715,7 @@ void* sendbuilt (void *parameters)
 		error("Warning! close(fd) returned -1!");
 	}
 
-        gdk_flush();gdk_threads_leave ();
+        gdk_threads_leave ();
 
         return NULL;
 
@@ -746,7 +745,7 @@ void* sendsequence (void *parameters)
                 	gtk_statusbar_push(GTK_STATUSBAR(p->button), GPOINTER_TO_INT(p->context_id), buff);
 
                 	error("Sorry but need the su rights!");
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 return NULL;
         }
 
@@ -760,7 +759,7 @@ void* sendsequence (void *parameters)
                         gtk_statusbar_push(GTK_STATUSBAR(p->button), GPOINTER_TO_INT(p->context_id), buff);
 
 	                error("Error: Could not open socket!");
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 return NULL;
         }
 
@@ -778,7 +777,7 @@ void* sendsequence (void *parameters)
 
                 	snprintf(buff, 100, "No such interface: %s", iftext);
 			error(buff);
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 close(fd);
                 return NULL;
         }
@@ -794,7 +793,7 @@ void* sendsequence (void *parameters)
 
                 	snprintf(buff, 100, "Interface %s is down", iftext);
                 	error(buff);
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 close(fd);
                 return NULL;
         }
@@ -848,7 +847,7 @@ void* sendsequence (void *parameters)
 				gtk_statusbar_push(GTK_STATUSBAR(p->button),
 								GPOINTER_TO_INT(p->context_id), buff);
 
-				gdk_flush();gdk_threads_leave ();
+				gdk_threads_leave ();
 				close(fd);
 				return NULL;
 			}
@@ -862,7 +861,7 @@ void* sendsequence (void *parameters)
 				gtk_statusbar_push(GTK_STATUSBAR(p->button), 
 							GPOINTER_TO_INT(p->context_id), buff);
 
-				gdk_flush();gdk_threads_leave ();
+				gdk_threads_leave ();
 
 				seconds++;
 			}
@@ -918,7 +917,7 @@ void* sendsequence (void *parameters)
 						gtk_statusbar_push(GTK_STATUSBAR(p->button),
 								GPOINTER_TO_INT(p->context_id), buff);
 
-						gdk_flush();gdk_threads_leave ();
+						gdk_threads_leave ();
 						close(fd);
 						return NULL;
 					}
@@ -932,7 +931,7 @@ void* sendsequence (void *parameters)
 						gtk_statusbar_push(GTK_STATUSBAR(p->button), 
 									GPOINTER_TO_INT(p->context_id), buff);
 
-						gdk_flush();gdk_threads_leave ();
+						gdk_threads_leave ();
 
 						seconds++;
 					}
@@ -979,7 +978,7 @@ void* sendsequence (void *parameters)
 					gtk_statusbar_push(GTK_STATUSBAR(p->button),
 									GPOINTER_TO_INT(p->context_id), buff);
 
-					gdk_flush();gdk_threads_leave ();
+					gdk_threads_leave ();
 					close(fd);
 					return NULL;
 				}
@@ -992,7 +991,7 @@ void* sendsequence (void *parameters)
 					gtk_statusbar_push(GTK_STATUSBAR(p->button), 
 								GPOINTER_TO_INT(p->context_id), buff);
 
-					gdk_flush();gdk_threads_leave ();
+					gdk_threads_leave ();
 
 					seconds++;
 				}
@@ -1021,7 +1020,7 @@ void* sendsequence (void *parameters)
 		error("Warning! close(fd) returned -1!");
 	}
 
-	gdk_flush();gdk_threads_leave ();
+	gdk_threads_leave ();
 
 	return NULL;
 
diff --git a/src/function_send.c b/src/function_send.c
index 3a131d9..7e0867c 100644
--- a/src/function_send.c
+++ b/src/function_send.c
@@ -187,7 +187,7 @@ void* sendbuilt (void *parameters)
                 	gtk_statusbar_push(GTK_STATUSBAR(p->button), GPOINTER_TO_INT(p->context_id), buff);
 
                 	error("Sorry but need the su rights!");
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 return NULL;
         }
 
@@ -207,7 +207,7 @@ void* sendbuilt (void *parameters)
                         gtk_statusbar_push(GTK_STATUSBAR(p->button), GPOINTER_TO_INT(p->context_id), buff);
 
 	                error("Error: Could not open socket!");
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 return NULL;
         }
 
@@ -232,7 +232,7 @@ void* sendbuilt (void *parameters)
 
                 	snprintf(buff, 100, "No such interface: %s", iftext);
                 	error(buff);
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 close(fd);
                 return NULL;
         }
@@ -254,7 +254,7 @@ void* sendbuilt (void *parameters)
 
                         snprintf(buff, 100, "Interface %s is down", iftext);
                 	error(buff);
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 close(fd);
                 return NULL;
         }
@@ -282,7 +282,6 @@ void* sendbuilt (void *parameters)
 	if (number < 60)
 		number = 60;
 
-
 	gtk_widget_set_sensitive (p->button1, FALSE);
 	gtk_widget_set_sensitive (p->button2, FALSE);
 	gtk_widget_set_sensitive (p->button3, FALSE);
@@ -321,7 +320,7 @@ void* sendbuilt (void *parameters)
                                 gtk_statusbar_push(GTK_STATUSBAR(p->button),
                                                                 GPOINTER_TO_INT(p->context_id), buff);
 
-                                gdk_flush();gdk_threads_leave ();
+                                gdk_threads_leave ();
 				close(fd);
                                 return NULL;
                         }
@@ -353,7 +352,7 @@ void* sendbuilt (void *parameters)
 			snprintf(buff, 100, "  Sent %ld packets on %s (%d packets/s, %d kbit/s data rate, %d kbit/s link utilization)", sentnumber, iftext, pkts, mbps, link);
                         gtk_statusbar_push(GTK_STATUSBAR(p->button), GPOINTER_TO_INT(p->context_id), buff);
 
-                        gdk_flush();gdk_threads_leave ();
+                        gdk_threads_leave ();
 
                         seconds++;
                 }
@@ -716,7 +715,7 @@ void* sendbuilt (void *parameters)
 		error("Warning! close(fd) returned -1!");
 	}
 
-        gdk_flush();gdk_threads_leave ();
+        gdk_threads_leave ();
 
         return NULL;
 
@@ -746,7 +745,7 @@ void* sendsequence (void *parameters)
                 	gtk_statusbar_push(GTK_STATUSBAR(p->button), GPOINTER_TO_INT(p->context_id), buff);
 
                 	error("Sorry but need the su rights!");
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 return NULL;
         }
 
@@ -760,7 +759,7 @@ void* sendsequence (void *parameters)
                         gtk_statusbar_push(GTK_STATUSBAR(p->button), GPOINTER_TO_INT(p->context_id), buff);
 
 	                error("Error: Could not open socket!");
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 return NULL;
         }
 
@@ -778,7 +777,7 @@ void* sendsequence (void *parameters)
 
                 	snprintf(buff, 100, "No such interface: %s", iftext);
 			error(buff);
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 close(fd);
                 return NULL;
         }
@@ -794,7 +793,7 @@ void* sendsequence (void *parameters)
 
                 	snprintf(buff, 100, "Interface %s is down", iftext);
                 	error(buff);
-		gdk_flush();gdk_threads_leave ();
+		gdk_threads_leave ();
                 close(fd);
                 return NULL;
         }
@@ -848,7 +847,7 @@ void* sendsequence (void *parameters)
 				gtk_statusbar_push(GTK_STATUSBAR(p->button),
 								GPOINTER_TO_INT(p->context_id), buff);
 
-				gdk_flush();gdk_threads_leave ();
+				gdk_threads_leave ();
 				close(fd);
 				return NULL;
 			}
@@ -862,7 +861,7 @@ void* sendsequence (void *parameters)
 				gtk_statusbar_push(GTK_STATUSBAR(p->button), 
 							GPOINTER_TO_INT(p->context_id), buff);
 
-				gdk_flush();gdk_threads_leave ();
+				gdk_threads_leave ();
 
 				seconds++;
 			}
@@ -918,7 +917,7 @@ void* sendsequence (void *parameters)
 						gtk_statusbar_push(GTK_STATUSBAR(p->button),
 								GPOINTER_TO_INT(p->context_id), buff);
 
-						gdk_flush();gdk_threads_leave ();
+						gdk_threads_leave ();
 						close(fd);
 						return NULL;
 					}
@@ -932,7 +931,7 @@ void* sendsequence (void *parameters)
 						gtk_statusbar_push(GTK_STATUSBAR(p->button), 
 									GPOINTER_TO_INT(p->context_id), buff);
 
-						gdk_flush();gdk_threads_leave ();
+						gdk_threads_leave ();
 
 						seconds++;
 					}
@@ -979,7 +978,7 @@ void* sendsequence (void *parameters)
 					gtk_statusbar_push(GTK_STATUSBAR(p->button),
 									GPOINTER_TO_INT(p->context_id), buff);
 
-					gdk_flush();gdk_threads_leave ();
+					gdk_threads_leave ();
 					close(fd);
 					return NULL;
 				}
@@ -992,7 +991,7 @@ void* sendsequence (void *parameters)
 					gtk_statusbar_push(GTK_STATUSBAR(p->button), 
 								GPOINTER_TO_INT(p->context_id), buff);
 
-					gdk_flush();gdk_threads_leave ();
+					gdk_threads_leave ();
 
 					seconds++;
 				}
@@ -1021,7 +1020,7 @@ void* sendsequence (void *parameters)
 		error("Warning! close(fd) returned -1!");
 	}
 
-	gdk_flush();gdk_threads_leave ();
+	gdk_threads_leave ();
 
 	return NULL;
 

Reply via email to