1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Amend the agent code with more comments.

* agent/command.c (server_local_s): Remove unused field MESSAGE_FD.
This commit is contained in:
Werner Koch 2011-12-05 10:54:59 +01:00
parent 239659d3a0
commit 477360e8cd
3 changed files with 161 additions and 46 deletions

View file

@ -309,6 +309,9 @@ static unsigned long pth_thread_id (void)
Functions.
*/
/* Allocate a string describing a library version by calling a GETFNC.
This function is expected to be called only once. GETFNC is
expected to have a semantic like gcry_check_version (). */
static char *
make_libversion (const char *libname, const char *(*getfnc)(const char*))
{
@ -326,7 +329,9 @@ make_libversion (const char *libname, const char *(*getfnc)(const char*))
return result;
}
/* Return strings describing this program. The case values are
described in common/argparse.c:strusage. The values here override
the default values given by strusage. */
static const char *
my_strusage (int level)
{
@ -448,6 +453,9 @@ remove_socket (char *name)
}
}
/* Cleanup code for this program. This is either called has an atexit
handler or directly. */
static void
cleanup (void)
{
@ -1268,6 +1276,8 @@ main (int argc, char **argv )
}
/* Exit entry point. This function should be called instead of a
plain exit. */
void
agent_exit (int rc)
{
@ -1294,6 +1304,11 @@ agent_exit (int rc)
}
/* Each thread has its own local variables conveyed by a control
structure usually identified by an argument named CTRL. This
function is called immediately after allocating the control
structure. Its purpose is to setup the default values for that
structure. */
static void
agent_init_default_ctrl (ctrl_t ctrl)
{
@ -1319,6 +1334,8 @@ agent_init_default_ctrl (ctrl_t ctrl)
}
/* Release all resources allocated by default in the control
structure. This is the counterpart to agent_init_default_ctrl. */
static void
agent_deinit_default_ctrl (ctrl_t ctrl)
{
@ -1720,6 +1737,7 @@ agent_sighup_action (void)
}
/* A helper function to handle SIGUSR2. */
static void
agent_sigusr2_action (void)
{
@ -1730,6 +1748,8 @@ agent_sigusr2_action (void)
}
/* The signal handler for this program. It is expected to be run in
its own trhead and not in the context of a signal handler. */
static void
handle_signal (int signo)
{