diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2019-08-29 21:43:47 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2019-08-29 21:43:47 (GMT) |
commit | fa40856e942a7e1bd1cb2729645182c1fa717468 (patch) | |
tree | 954db169d2b734e661d904e502cd1c803f51c6ea /src/analysis/binary.c | |
parent | 7f973e015eb59b626edc584a19a1ad3ffddf4867 (diff) |
Defined a new way to launch updates share servers.
Diffstat (limited to 'src/analysis/binary.c')
-rw-r--r-- | src/analysis/binary.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c index 80d12d3..5ac8e04 100644 --- a/src/analysis/binary.c +++ b/src/analysis/binary.c @@ -72,8 +72,8 @@ struct _GLoadedBinary char *remote_host; /* Nom du serveur distant */ unsigned short remote_port; /* Port du serveur distant */ - GDbClient *local; /* Enregistrements locaux */ - GDbClient *remote; /* Enregistrements distants */ + GHubClient *local; /* Enregistrements locaux */ + GHubClient *remote; /* Enregistrements distants */ DBStorage storages[DBF_COUNT]; /* Lieux d'enregistrement */ GList *collections; /* Ensemble de modifications */ @@ -862,12 +862,12 @@ static bool g_loaded_binary_connect_internal(GLoadedBinary *binary) /* Tentative de connexion */ - binary->local = g_db_client_new(author, priv, + binary->local = g_hub_client_new(/*author, priv, g_loaded_binary_get_name(binary, false), - checksum, + */checksum, binary->collections); - result = g_db_client_start_internal(binary->local); + result = g_hub_client_start_internal(binary->local); glbcl_exit: @@ -920,12 +920,12 @@ static bool g_loaded_binary_connect_remote(GLoadedBinary *binary) /* Tentative de connexion */ - binary->remote = g_db_client_new(author, priv, + binary->remote = g_hub_client_new(/*author, priv, g_loaded_binary_get_name(binary, false), - checksum, + */checksum, binary->collections); - result = g_db_client_start_remote(binary->local, binary->remote_host, binary->remote_port); + result = g_hub_client_start_remote(binary->local, binary->remote_host, "1337", true);//binary->remote_port); if (!result) { @@ -1008,9 +1008,9 @@ bool g_loaded_binary_save_cache(const GLoadedBinary *binary) * * ******************************************************************************/ -GDbClient *g_loaded_binary_get_db_client(const GLoadedBinary *binary) +GHubClient *g_loaded_binary_get_db_client(const GLoadedBinary *binary) { - GDbClient *result; /* Instance à retourner */ + GHubClient *result; /* Instance à retourner */ result = binary->local; @@ -1106,7 +1106,7 @@ bool _g_loaded_binary_add_to_collection(GLoadedBinary *binary, GDbItem *item, bo DBFeatures feature; /* Domaine de fonctionnalité */ GDbCollection *collec; /* Collection visée au final */ DBStorage storage; /* Forme d'enregistrement */ - GDbClient *client; /* Liaison à utiliser */ + GHubClient *client; /* Liaison à utiliser */ packed_buffer out_pbuf; /* Tampon d'émission */ int fd; /* Identifiant du canal de com.*/ @@ -1134,11 +1134,11 @@ bool _g_loaded_binary_add_to_collection(GLoadedBinary *binary, GDbItem *item, bo init_packed_buffer(&out_pbuf); - fd = g_db_client_get_fd(client); + fd = g_hub_client_get_fd(client); result = g_db_collection_pack(collec, &out_pbuf, DBA_ADD_ITEM, item); - g_db_client_put_fd(client); + g_hub_client_put_fd(client); if (result) result = send_packed_buffer(&out_pbuf, fd); @@ -1175,7 +1175,7 @@ bool _g_loaded_binary_remove_from_collection(GLoadedBinary *binary, DBFeatures f bool result; /* Bilan à faire remonter */ GDbCollection *collec; /* Collection visée au final */ DBStorage storage; /* Forme d'enregistrement */ - GDbClient *client; /* Liaison à utiliser */ + GHubClient *client; /* Liaison à utiliser */ packed_buffer out_pbuf; /* Tampon d'émission */ int fd; /* Identifiant du canal de com.*/ @@ -1201,11 +1201,11 @@ bool _g_loaded_binary_remove_from_collection(GLoadedBinary *binary, DBFeatures f init_packed_buffer(&out_pbuf); - fd = g_db_client_get_fd(client); + fd = g_hub_client_get_fd(client); result = g_db_collection_pack(collec, &out_pbuf, DBA_REM_ITEM, item); - g_db_client_put_fd(client); + g_hub_client_put_fd(client); if (result) result = send_packed_buffer(&out_pbuf, fd); @@ -1629,7 +1629,7 @@ static bool g_loaded_binary_save(GLoadedBinary *binary, xmlDoc *xdoc, xmlXPathCo /* Sauvegarde côté serveur */ if (result) - g_db_client_save(binary->local); + g_hub_client_save(binary->local); return result; |