summaryrefslogtreecommitdiff
path: root/src/analysis/binary.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-09-08 07:47:41 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-09-08 07:47:41 (GMT)
commitfbb80d00d8ac456451963d52af24fcccbbc1d751 (patch)
tree232d2f63378bf30db17c33c399cedc28fc13d4f9 /src/analysis/binary.c
parent1a85f36e0505d75a51ab7b7f2c5078da7ef6bd98 (diff)
Updated the database protocol for bookmarks.
Diffstat (limited to 'src/analysis/binary.c')
-rw-r--r--src/analysis/binary.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/analysis/binary.c b/src/analysis/binary.c
index cf680c3..639d6cc 100644
--- a/src/analysis/binary.c
+++ b/src/analysis/binary.c
@@ -1068,7 +1068,7 @@ bool _g_loaded_binary_add_to_collection(GLoadedBinary *binary, GDbItem *item, bo
DBStorage storage; /* Forme d'enregistrement */
GHubClient *client; /* Liaison à utiliser */
packed_buffer out_pbuf; /* Tampon d'émission */
- int fd; /* Identifiant du canal de com.*/
+ SSL *tls_fd; /* Canal de communication SSL */
feature = g_db_item_get_feature(item);
@@ -1099,14 +1099,14 @@ bool _g_loaded_binary_add_to_collection(GLoadedBinary *binary, GDbItem *item, bo
{
init_packed_buffer(&out_pbuf);
- fd = g_hub_client_get_fd(client);
+ tls_fd = g_hub_client_get_ssl_fd(client);
result = g_db_collection_pack(collec, &out_pbuf, DBA_ADD_ITEM, item);
- g_hub_client_put_fd(client);
-
if (result)
- result = send_packed_buffer(&out_pbuf, fd);
+ result = ssl_send_packed_buffer(&out_pbuf, tls_fd);
+
+ g_hub_client_put_ssl_fd(client, tls_fd);
exit_packed_buffer(&out_pbuf);
@@ -1144,7 +1144,7 @@ bool _g_loaded_binary_remove_from_collection(GLoadedBinary *binary, DBFeatures f
DBStorage storage; /* Forme d'enregistrement */
GHubClient *client; /* Liaison à utiliser */
packed_buffer out_pbuf; /* Tampon d'émission */
- int fd; /* Identifiant du canal de com.*/
+ SSL *tls_fd; /* Canal de communication SSL */
collec = g_loaded_binary_find_collection(binary, feature);
if (collec == NULL) return false;
@@ -1168,14 +1168,14 @@ bool _g_loaded_binary_remove_from_collection(GLoadedBinary *binary, DBFeatures f
init_packed_buffer(&out_pbuf);
- fd = g_hub_client_get_fd(client);
+ tls_fd = g_hub_client_get_ssl_fd(client);
result = g_db_collection_pack(collec, &out_pbuf, DBA_REM_ITEM, item);
- g_hub_client_put_fd(client);
-
if (result)
- result = send_packed_buffer(&out_pbuf, fd);
+ result = ssl_send_packed_buffer(&out_pbuf, tls_fd);
+
+ g_hub_client_put_ssl_fd(client, tls_fd);
exit_packed_buffer(&out_pbuf);