mirror of
https://github.com/transmission/transmission
synced 2024-12-24 16:52:39 +00:00
(shttpd) replace VERSION with SHTTPD_VERSION.
(shttpd) make shttpd_edit_passwords() a public function for now to fix the build.
This commit is contained in:
parent
39541d4c5f
commit
dcaf1f16ef
9 changed files with 15 additions and 10 deletions
|
@ -371,7 +371,7 @@ startServer( tr_rpc_server * server )
|
|||
if( !server->isPasswordEnabled )
|
||||
unlink( passwd );
|
||||
else
|
||||
edit_passwords( passwd, MY_REALM, server->username, server->password );
|
||||
shttpd_edit_passwords( passwd, MY_REALM, server->username, server->password );
|
||||
|
||||
argv[argc++] = tr_strdup( "appname-unused" );
|
||||
|
||||
|
|
2
third-party/shttpd/auth.c
vendored
2
third-party/shttpd/auth.c
vendored
|
@ -350,7 +350,7 @@ _shttpd_send_authorization_request(struct conn *c)
|
|||
* Edit the passwords file.
|
||||
*/
|
||||
int
|
||||
_shttpd_edit_passwords(const char *fname, const char *domain,
|
||||
shttpd_edit_passwords(const char *fname, const char *domain,
|
||||
const char *user, const char *pass)
|
||||
{
|
||||
int ret = EXIT_SUCCESS, found = 0;
|
||||
|
|
2
third-party/shttpd/compat_win32.c
vendored
2
third-party/shttpd/compat_win32.c
vendored
|
@ -533,7 +533,7 @@ systray(void *arg)
|
|||
|
||||
cls.lpfnWndProc = (WNDPROC) WindowProc;
|
||||
cls.hIcon = LoadIcon(NULL, IDI_APPLICATION);
|
||||
cls.lpszClassName = "shttpd v." VERSION;
|
||||
cls.lpszClassName = "shttpd v." SHTTPD_VERSION;
|
||||
|
||||
if (!RegisterClass(&cls))
|
||||
_shttpd_elog(E_FATAL, NULL, "RegisterClass: %d", ERRNO);
|
||||
|
|
4
third-party/shttpd/config.h
vendored
4
third-party/shttpd/config.h
vendored
|
@ -11,7 +11,7 @@
|
|||
#ifndef CONFIG_HEADER_DEFINED
|
||||
#define CONFIG_HEADER_DEFINED
|
||||
|
||||
#define VERSION "1.42" /* Version */
|
||||
#define SHTTPD_VERSION "1.42" /* Version */
|
||||
#define CONFIG_FILE "shttpd.conf" /* Configuration file */
|
||||
#define HTPASSWD ".htpasswd" /* Passwords file name */
|
||||
#define URI_MAX 16384 /* Default max request size */
|
||||
|
@ -24,6 +24,6 @@
|
|||
#define EXPIRE_TIME 3600 /* Expiration time, seconds */
|
||||
#define ENV_MAX 4096 /* Size of environment block */
|
||||
#define CGI_ENV_VARS 64 /* Maximum vars passed to CGI */
|
||||
#define SERVICE_NAME "SHTTPD " VERSION /* NT service name */
|
||||
#define SERVICE_NAME "SHTTPD " SHTTPD_VERSION /* NT service name */
|
||||
|
||||
#endif /* CONFIG_HEADER_DEFINED */
|
||||
|
|
2
third-party/shttpd/defs.h
vendored
2
third-party/shttpd/defs.h
vendored
|
@ -380,7 +380,7 @@ extern void _shttpd_ssi_func_destructor(struct llhead *lp);
|
|||
extern int _shttpd_check_authorization(struct conn *c, const char *path);
|
||||
extern int _shttpd_is_authorized_for_put(struct conn *c);
|
||||
extern void _shttpd_send_authorization_request(struct conn *c);
|
||||
extern int _shttpd_edit_passwords(const char *fname, const char *domain,
|
||||
extern int shttpd_edit_passwords(const char *fname, const char *domain,
|
||||
const char *user, const char *pass);
|
||||
|
||||
/*
|
||||
|
|
2
third-party/shttpd/io_emb.c
vendored
2
third-party/shttpd/io_emb.c
vendored
|
@ -13,7 +13,7 @@
|
|||
const char *
|
||||
shttpd_version(void)
|
||||
{
|
||||
return (VERSION);
|
||||
return (SHTTPD_VERSION);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
2
third-party/shttpd/shttpd.c
vendored
2
third-party/shttpd/shttpd.c
vendored
|
@ -1760,7 +1760,7 @@ _shttpd_usage(const char *prog)
|
|||
|
||||
(void) fprintf(stderr,
|
||||
"SHTTPD version %s (c) Sergey Lyubka\n"
|
||||
"usage: %s [options] [config_file]\n", VERSION, prog);
|
||||
"usage: %s [options] [config_file]\n", SHTTPD_VERSION, prog);
|
||||
|
||||
#if !defined(NO_AUTH)
|
||||
fprintf(stderr, " -A <htpasswd_file> <realm> <user> <passwd>\n");
|
||||
|
|
5
third-party/shttpd/shttpd.h
vendored
5
third-party/shttpd/shttpd.h
vendored
|
@ -104,6 +104,11 @@ void shttpd_wakeup(const void *priv);
|
|||
int shttpd_join(struct shttpd_ctx *, fd_set *, fd_set *, int *max_fd);
|
||||
int shttpd_socketpair(int sp[2]);
|
||||
|
||||
|
||||
extern int shttpd_edit_passwords(const char *fname, const char *domain,
|
||||
const char *user, const char *pass);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
|
4
third-party/shttpd/standalone.c
vendored
4
third-party/shttpd/standalone.c
vendored
|
@ -36,7 +36,7 @@ main(int argc, char *argv[])
|
|||
if (argc > 1 && argv[1][0] == '-' && argv[1][1] == 'A') {
|
||||
if (argc != 6)
|
||||
_shttpd_usage(argv[0]);
|
||||
exit(_shttpd_edit_passwords(argv[2],argv[3],argv[4],argv[5]));
|
||||
exit(shttpd_edit_passwords(argv[2],argv[3],argv[4],argv[5]));
|
||||
}
|
||||
#endif /* NO_AUTH */
|
||||
|
||||
|
@ -60,7 +60,7 @@ main(int argc, char *argv[])
|
|||
"Cannot initialize SHTTPD context");
|
||||
|
||||
_shttpd_elog(E_LOG, NULL, "shttpd %s started on port(s) %s, serving %s",
|
||||
VERSION, ctx->options[OPT_PORTS], ctx->options[OPT_ROOT]);
|
||||
SHTTPD_VERSION, ctx->options[OPT_PORTS], ctx->options[OPT_ROOT]);
|
||||
|
||||
while (exit_flag == 0)
|
||||
shttpd_poll(ctx, 10 * 1000);
|
||||
|
|
Loading…
Reference in a new issue