projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
workqueue: style cleanup
[fio.git]
/
gfio.c
diff --git
a/gfio.c
b/gfio.c
index 313894169a3976fe8a472ce9d748fa1f81c34daa..42d536e033a18ffb53b9063f9bf47e970aabbdd6 100644
(file)
--- a/
gfio.c
+++ b/
gfio.c
@@
-444,12
+444,12
@@
static int send_job_file(struct gui_entry *ge)
while (!flist_empty(&gc->o_list)) {
struct gfio_client_options *gco;
while (!flist_empty(&gc->o_list)) {
struct gfio_client_options *gco;
- gco = flist_
entry(gc->o_list.nex
t, struct gfio_client_options, list);
+ gco = flist_
first_entry(&gc->o_lis
t, struct gfio_client_options, list);
flist_del(&gco->list);
free(gco);
}
flist_del(&gco->list);
free(gco);
}
- ret = fio_client_send_ini(gc->client, ge->job_file);
+ ret = fio_client_send_ini(gc->client, ge->job_file
, 0
);
if (!ret)
return 0;
if (!ret)
return 0;
@@
-654,6
+654,12
@@
static void gfio_client_added(struct gui_entry *ge, struct fio_client *client)
gc->o_list_nr++;
}
gc->o_list_nr++;
}
+static void gfio_clear_graph_data(struct gfio_graphs *g)
+{
+ graph_clear_values(g->iops_graph);
+ graph_clear_values(g->bandwidth_graph);
+}
+
static void connect_clicked(GtkWidget *widget, gpointer data)
{
struct gui_entry *ge = data;
static void connect_clicked(GtkWidget *widget, gpointer data)
{
struct gui_entry *ge = data;
@@
-694,6
+700,7
@@
static void connect_clicked(GtkWidget *widget, gpointer data)
if (!ge->ui->handler_running)
pthread_create(&ge->ui->t, NULL, job_thread, ge->ui);
gfio_set_state(ge, GE_STATE_CONNECTED);
if (!ge->ui->handler_running)
pthread_create(&ge->ui->t, NULL, job_thread, ge->ui);
gfio_set_state(ge, GE_STATE_CONNECTED);
+ gfio_clear_graph_data(&ge->graphs);
} else {
gfio_report_error(ge, "Failed to connect to %s: %s\n", ge->client->client->hostname, strerror(-ret));
}
} else {
gfio_report_error(ge, "Failed to connect to %s: %s\n", ge->client->client->hostname, strerror(-ret));
}
@@
-1670,14
+1677,19
@@
static void init_ui(int *argc, char **argv[], struct gui *ui)
* Without it, the update that happens in gfio_update_thread_status
* doesn't really happen in a timely fashion, you need expose events
*/
* Without it, the update that happens in gfio_update_thread_status
* doesn't really happen in a timely fashion, you need expose events
*/
+#if !GTK_CHECK_VERSION(2, 24, 0)
if (!g_thread_supported())
g_thread_init(NULL);
if (!g_thread_supported())
g_thread_init(NULL);
+#endif
+
gdk_threads_init();
gtk_init(argc, argv);
settings = gtk_settings_get_default();
gtk_settings_set_long_property(settings, "gtk_tooltip_timeout", 10, "gfio setting");
gdk_threads_init();
gtk_init(argc, argv);
settings = gtk_settings_get_default();
gtk_settings_set_long_property(settings, "gtk_tooltip_timeout", 10, "gfio setting");
+#if !GLIB_CHECK_VERSION(2, 36, 0)
g_type_init();
g_type_init();
+#endif
gdk_color_parse("#fffff4", &gfio_color_lightyellow);
gdk_color_parse("white", &gfio_color_white);
gdk_color_parse("#fffff4", &gfio_color_lightyellow);
gdk_color_parse("white", &gfio_color_white);