summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/analysis/loading.c16
-rw-r--r--src/analysis/project.c33
-rw-r--r--src/analysis/project.h15
3 files changed, 15 insertions, 49 deletions
diff --git a/src/analysis/loading.c b/src/analysis/loading.c
index 254939b..700a03f 100644
--- a/src/analysis/loading.c
+++ b/src/analysis/loading.c
@@ -27,6 +27,7 @@
#include "../core/formats.h"
#include "../core/global.h"
#include "../glibext/delayed-int.h"
+#include "../glibext/signal.h"
#include "../gui/panels/log.h"
@@ -591,6 +592,7 @@ static void g_binary_loader_process(GBinaryLoader *loader, GtkStatusStack *statu
{
xmlDocPtr xdoc; /* Structure XML chargée */
xmlXPathContextPtr context; /* Contexte pour les XPath */
+ GLoadedBinary *binary; /* Binaire désormais en place */
/* Tentative de chargement de binaire */
@@ -617,7 +619,19 @@ static void g_binary_loader_process(GBinaryLoader *loader, GtkStatusStack *statu
if (loader->from_content)
g_study_project_add_binary_content(loader->project, loader->content, PCS_ROOT/* FIXME : dstudy->state*/);
- ack_loaded_binary(loader, loader->project);
+ binary = g_binary_loader_get_result(loader);
+
+ if (binary != NULL)
+ {
+ g_signal_connect_to_main_swapped(binary, "disassembly-done",
+ G_CALLBACK(g_study_project_attach_content), loader->project,
+ g_cclosure_marshal_VOID__VOID);
+
+ g_loaded_binary_analyse(binary);
+
+ g_object_unref(G_OBJECT(binary));
+
+ }
}
diff --git a/src/analysis/project.c b/src/analysis/project.c
index a5b59ab..31376de 100644
--- a/src/analysis/project.c
+++ b/src/analysis/project.c
@@ -39,7 +39,6 @@
#include "../core/global.h"
#include "../core/params.h"
#include "../glibext/delayed-int.h"
-#include "../glibext/signal.h"
#include "../gui/core/panels.h"
#include "../gui/panels/log.h"
#include "../gui/panels/panel.h"
@@ -503,38 +502,6 @@ GBinContent *g_study_project_find_binary_content_by_hash(GStudyProject *project,
/******************************************************************************
* *
-* Paramètres : loader = travail de chargement mené à bien. *
-* project = lieu d'intégration des résultats obtenus. *
-* *
-* Description : Acquitte la fin d'un chargement différé et complet. *
-* *
-* Retour : - *
-* *
-* Remarques : - *
-* *
-******************************************************************************/
-
-void ack_loaded_binary(GBinaryLoader *loader, GStudyProject *project)
-{
- GLoadedBinary *binary; /* Binaire désormais en place */
-
- binary = g_binary_loader_get_result(loader);
-
- if (binary != NULL)
- {
- g_signal_connect_to_main_swapped(binary, "disassembly-done",
- G_CALLBACK(g_study_project_attach_content), project,
- g_cclosure_marshal_VOID__VOID);
-
- g_loaded_binary_analyse(binary);
-
- }
-
-}
-
-
-/******************************************************************************
-* *
* Paramètres : project = project à manipuler. *
* content = contenu chargé à associer au projet actuel. *
* *
diff --git a/src/analysis/project.h b/src/analysis/project.h
index 9e777ee..c6f6fc9 100644
--- a/src/analysis/project.h
+++ b/src/analysis/project.h
@@ -32,18 +32,6 @@
#include "loaded.h"
-/**
- * Comme "gui/panels/panel.h" inclut "gui/editem.h", qui inclut lui même
- * ce fichier pour la mise à jour de la zone de projet, on redéfinit...
- */
-//typedef struct _GPanelItem GPanelItem;
-
-/**
- * Autre boucle sans fin similaire...
- */
-typedef struct _GBinaryLoader GBinaryLoader;
-
-
/* ------------------------- DEFINITION D'UN PROJET INTERNE ------------------------- */
@@ -95,9 +83,6 @@ void g_study_project_add_binary_content(GStudyProject *, GBinContent *, ProjectC
/* Recherche un contenu binaire du projet selon son empreinte. */
GBinContent *g_study_project_find_binary_content_by_hash(GStudyProject *, const char *);
-/* Acquitte la fin d'un chargement différé et complet. */
-void ack_loaded_binary(GBinaryLoader *, GStudyProject *);
-
/* Attache un contenu donné à un projet donné. */
void g_study_project_attach_content(GStudyProject *, GLoadedContent *);