mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Log the Windows system error code at more places.
* common/asshelp.c (log_libassuan_system_error): New. * agent/gpg-agent.c (create_server_socket): Use new log function. (handle_connections): Log system error code for a failed accept. * dirmngr/dirmngr.c (handle_connections): Ditto. * kbx/keyboxd.c (handle_connections): Ditto. * scd/scdaemon.c (handle_connections): Ditto. * tpm2d/tpm2daemon.c (handle_connections): Ditto. * dirmngr/dirmngr.c (main): Log system error code for a failed bin. * kbx/keyboxd.c (create_server_socket): Ditto. * scd/scdaemon.c (create_server_socket): Ditto. * tpm2d/tpm2daemon.c (create_server_socket): Ditto.
This commit is contained in:
parent
c68eca6363
commit
41cf76b8c1
7 changed files with 43 additions and 17 deletions
|
@ -128,6 +128,21 @@ set_libassuan_log_cats (unsigned int newcats)
|
|||
}
|
||||
|
||||
|
||||
/* Get the last Windows error from an Assuan socket function and print
|
||||
* the raw error code using log_info. */
|
||||
void
|
||||
log_libassuan_system_error (assuan_fd_t fd)
|
||||
{
|
||||
int w32err = 0;
|
||||
|
||||
if (assuan_sock_get_flag (fd, "w32_error", &w32err))
|
||||
w32err = -1; /* Old Libassuan or not Windows. */
|
||||
|
||||
if (w32err != -1)
|
||||
log_info ("system error code: %d (0x%x)\n", w32err, w32err);
|
||||
}
|
||||
|
||||
|
||||
|
||||
static gpg_error_t
|
||||
send_one_option (assuan_context_t ctx, gpg_err_source_t errsource,
|
||||
|
|
|
@ -46,6 +46,8 @@ void setup_libassuan_logging (unsigned int *debug_var_address,
|
|||
const char *msg));
|
||||
void set_libassuan_log_cats (unsigned int newcats);
|
||||
|
||||
void log_libassuan_system_error (assuan_fd_t fd);
|
||||
|
||||
|
||||
gpg_error_t
|
||||
send_pinentry_environment (assuan_context_t ctx,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue