diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-03-16 17:09:32 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-03-16 17:09:32 -0400 |
commit | 57b954293e3880f3b39d2f0f0f7710250e8ffc5f (patch) | |
tree | 06800a08323c179e6e38292ebba543165b0fb22d /src/or/ntmain.c | |
parent | 415caba967b9b470623ab29230b820b3470a91e6 (diff) | |
parent | 6617822b841e32d6339bac13c79dd5f2b566c3c6 (diff) | |
download | tor-57b954293e3880f3b39d2f0f0f7710250e8ffc5f.tar.gz tor-57b954293e3880f3b39d2f0f0f7710250e8ffc5f.zip |
Merge remote-tracking branch 'origin/maint-0.2.2'
Trivial Conflicts in
src/common/crypto.c
src/or/main.h
src/or/or.h
Diffstat (limited to 'src/or/ntmain.c')
-rw-r--r-- | src/or/ntmain.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/or/ntmain.c b/src/or/ntmain.c index 88537f3314..4eb487e976 100644 --- a/src/or/ntmain.c +++ b/src/or/ntmain.c @@ -54,6 +54,11 @@ static int nt_service_cmd_stop(void); struct service_fns { int loaded; + /** @{ */ + /** Function pointers for Windows API functions related to service + * management. These are NULL, or they point to the . They're set by + * calling the LOAD macro below. */ + BOOL (WINAPI *ChangeServiceConfig2A_fn)( SC_HANDLE hService, DWORD dwInfoLevel, @@ -122,6 +127,7 @@ struct service_fns { LPTSTR ReferencedDomainName, LPDWORD cchReferencedDomainName, PSID_NAME_USE peUse); + /** @} */ } service_fns = { 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, @@ -144,6 +150,10 @@ nt_service_loadlibrary(void) goto err; } +/* Helper macro: try to load a function named <b>f</b> from "library" into + * service_functions.<b>f</b>_fn. On failure, log an error message, and goto + * err. + */ #define LOAD(f) STMT_BEGIN \ if (!(fn = GetProcAddress(library, #f))) { \ log_err(LD_BUG, \ |