Skip to content

Commit

Permalink
[agroal#392] Add application name and version in management protocol
Browse files Browse the repository at this point in the history
In order to improve debugging, [agroal#392] suggested to write
the sender application name and its version in the
socket over which pgagroal-cli and pgagroal communicate.

Introduces the 'write_info' function in management.c.
  • Loading branch information
EuGig committed Apr 16, 2024
1 parent 5dd618b commit 479361e
Show file tree
Hide file tree
Showing 3 changed files with 358 additions and 9 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Yongting You <2010youy01@gmail.com>
Ashutosh Sharma <ash2003sharma@gmail.com>
Henrique de Carvalho <decarv.henrique@gmail.com>
Yihe Lu <t1t4m1un@gmail.com>
Eugenio Gigante <giganteeugenio2@gmail.com>
19 changes: 19 additions & 0 deletions src/include/management.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,25 @@ extern "C" {
#define COMMAND_OUTPUT_FORMAT_TEXT 'T'
#define COMMAND_OUTPUT_FORMAT_JSON 'J'

/**
* Available applications
*/
#define PGAGROAL_EXECUTABLE 1
#define PGAGROAL_EXECUTABLE_CLI 2
#define PGAGROAL_EXECUTABLE_VAULT 3

/*
* stores the application name and its version
* which are sent through the socket
*/
struct pgagroal_version_info
{
char s[2];
int command;
char v[3];
int version;
};

/**
* Get the frontend password of a user
* @param ssl The SSL connection
Expand Down
Loading

0 comments on commit 479361e

Please sign in to comment.