gfio: fix wrong pointer being passed into file_open()
authorJens Axboe <axboe@kernel.dk>
Mon, 12 Mar 2012 14:09:42 +0000 (15:09 +0100)
committerJens Axboe <axboe@kernel.dk>
Mon, 12 Mar 2012 14:09:42 +0000 (15:09 +0100)
We passed the gui_entry, it wants the gui. Fixes segfault
on clicking "Connect", when attempting to auto-load the
file open dialog.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
gfio.c

diff --git a/gfio.c b/gfio.c
index c25a264031473412a7db298f1a29062205e42957..ff8763dd07e938285ac51223de88b71d08805b3c 100644 (file)
--- a/gfio.c
+++ b/gfio.c
@@ -1753,7 +1753,7 @@ static void connect_clicked(GtkWidget *widget, gpointer data)
                int ret;
 
                if (!ge->nr_job_files)
-                       file_open(widget, data);
+                       file_open(widget, ge->ui);
                if (!ge->nr_job_files)
                        return;
 
@@ -2065,7 +2065,7 @@ static void file_new(GtkWidget *w, gpointer data)
  * Return the 'ge' corresponding to the tab. If the active tab is the
  * main tab, open a new tab.
  */
-static struct gui_entry *get_ge_from_page(unsigned int cur_page)
+static struct gui_entry *get_ge_from_page(gint cur_page)
 {
        struct flist_head *entry;
        struct gui_entry *ge;