diff options
-rw-r--r-- | plugins/pychrysalide/analysis/binary.c | 4 | ||||
-rw-r--r-- | src/analysis/binary.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/plugins/pychrysalide/analysis/binary.c b/plugins/pychrysalide/analysis/binary.c index e97bea6..eb71a62 100644 --- a/plugins/pychrysalide/analysis/binary.c +++ b/plugins/pychrysalide/analysis/binary.c @@ -127,7 +127,7 @@ static PyObject *py_loaded_binary_new(PyTypeObject *type, PyObject *args, PyObje static PyObject *py_loaded_binary_get_client(PyObject *self, PyObject *args) { PyObject *result; /* Bilan à retourner */ - bool internal; /* Nature du client visé */ + int internal; /* Nature du client visé */ int ret; /* Bilan de lecture des args. */ GLoadedBinary *binary; /* Binaire en cours d'analyse */ GHubClient *client; /* Eventuel client en place */ @@ -140,6 +140,8 @@ static PyObject *py_loaded_binary_get_client(PyObject *self, PyObject *args) " if defined, or return None otherwise.\n" \ ) + internal = 1; + ret = PyArg_ParseTuple(args, "|p", &internal); if (!ret) return NULL; diff --git a/src/analysis/binary.c b/src/analysis/binary.c index 05e42c7..fb715bb 100644 --- a/src/analysis/binary.c +++ b/src/analysis/binary.c @@ -973,7 +973,10 @@ GHubClient *g_loaded_binary_get_client(const GLoadedBinary *binary, bool interna { GHubClient *result; /* Instance à retourner */ - result = binary->local; + if (internal) + result = binary->local; + else + result = binary->remote; if (result != NULL) g_object_ref(G_OBJECT(result)); |