diff options
Diffstat (limited to 'src/analysis/db/client.c')
-rw-r--r-- | src/analysis/db/client.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/analysis/db/client.c b/src/analysis/db/client.c index aa1407c..6ce33b0 100644 --- a/src/analysis/db/client.c +++ b/src/analysis/db/client.c @@ -99,6 +99,10 @@ static void g_hub_client_class_init(GHubClientClass *klass) object->dispose = (GObjectFinalizeFunc/* ! */)g_hub_client_dispose; object->finalize = (GObjectFinalizeFunc)g_hub_client_finalize; + klass->role = CRL_UNDEFINED; + klass->complete_hello = NULL; + klass->recv_func = NULL; + } @@ -485,7 +489,8 @@ static bool g_hub_client_start_common(GHubClient *client, char *desc) * On réalise l'envoi initial ; le premier paquet doit contenir : * - la commande 'DBC_HELO' ; * - le numéro de version du client ; - * - le rôle attendu de la connexion. + * - le rôle attendu de la connexion ; + * - des données complémentaires éventuelles. * * Tout ceci est à synchroniser avec la fonction g_db_server_listener(). */ @@ -501,9 +506,11 @@ static bool g_hub_client_start_common(GHubClient *client, char *desc) status = extend_packed_buffer(&out_pbuf, &class->role, sizeof(uint32_t), true); if (!status) goto setup_error; - - - + if (class->complete_hello != NULL) + { + status = class->complete_hello(client, &out_pbuf); + if (!status) goto setup_error; + } status = ssl_send_packed_buffer(&out_pbuf, client->tls_fd); if (!status) goto setup_error; |