Skip to content

Commit

Permalink
Restrict scope of sesman_close_all()
Browse files Browse the repository at this point in the history
This function does not need to have global scope.
  • Loading branch information
matt335672 committed Nov 27, 2024
1 parent 600549c commit fe7d169
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
13 changes: 12 additions & 1 deletion sesman/sesman.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,18 @@ static int sesman_listen_test(struct config_sesman *cfg)
}

/******************************************************************************/
int
/**
* Close all file descriptors used by sesman.
*
* This is generally used after forking, to make sure the
* file descriptors used by the main process are not disturbed
*
* This call will also :-
* - release all trans objects held by sesman
* - Delete sesman wait objects
* - Call sesman_delete_listening_transport()
*/
static int
sesman_close_all(void)
{
LOG_DEVEL(LOG_LEVEL_TRACE, "sesman_close_all:");
Expand Down
14 changes: 0 additions & 14 deletions sesman/sesman.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,6 @@ struct trans;
/* Globals */
extern struct config_sesman *g_cfg;

/**
* Close all file descriptors used by sesman.
*
* This is generally used after forking, to make sure the
* file descriptors used by the main process are not disturbed
*
* This call will also :-
* - release all trans objects held by sesman
* - Delete sesman wait objects
* - Call sesman_delete_listening_transport()
*/
int
sesman_close_all(void);

/*
* Remove the listening transport
*
Expand Down

0 comments on commit fe7d169

Please sign in to comment.