-
Notifications
You must be signed in to change notification settings - Fork 1
make DSI default timeout dynamically configurable #204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -353,6 +353,7 @@ | |
| " -m, --map <mapname> : use this uid/gid mapping method, one of:\n" | ||
| " common, loginids\n" | ||
| " -O, --options <flags> : FUSE mount options; see the fuse man page\n" | ||
| " -t, --timeout <seconds> : DSI request timeout (overrides server-type default)\n" | ||
| "\n" | ||
| " unmount <mountpoint> : unmount the specified mountpoint\n" | ||
| " status [mountpoint] : get status of the AFP daemon;\n" | ||
|
|
@@ -577,6 +578,7 @@ | |
| {"uam", 1, 0, 'a'}, | ||
| {"map", 1, 0, 'm'}, | ||
| {"options", 1, 0, 'O'}, | ||
| {"timeout", 1, 0, 't'}, | ||
| {0, 0, 0, 0}, | ||
| }; | ||
|
|
||
|
|
@@ -593,7 +595,7 @@ | |
|
|
||
| while (1) { | ||
| optnum++; | ||
| c = getopt_long(argc, argv, "a:m:O:o:P:p:u:v:", long_options, &option_index); | ||
| c = getopt_long(argc, argv, "a:m:O:o:P:p:t:u:v:", long_options, &option_index); | ||
|
|
||
| if (c == -1) { | ||
| break; | ||
|
|
@@ -635,6 +637,10 @@ | |
| snprintf(request.url.password, AFP_MAX_PASSWORD_LEN, "%s", optarg); | ||
| break; | ||
|
|
||
| case 't': | ||
| request.dsi_timeout = strtol(optarg, NULL, 10); | ||
|
Check warning on line 641 in fuse/client.c
|
||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Severity: low Other Locations
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage. |
||
| break; | ||
|
|
||
| case 'u': | ||
| snprintf(request.url.username, AFP_MAX_USERNAME_LEN, "%s", optarg); | ||
| break; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -191,6 +191,9 @@ struct afp_server { | |
|
|
||
| unsigned int tx_delay; | ||
|
|
||
| /* DSI request timeout in seconds; set by server type detection or user override */ | ||
| int dsi_default_timeout; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding Severity: medium 🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage. |
||
|
|
||
| /* Connection information */ | ||
| //the linked list returned by getaddrinfo | ||
| struct addrinfo *address; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,6 +8,7 @@ | |
|
|
||
| #include <string.h> | ||
| #include "afp.h" | ||
| #include "dsi.h" | ||
|
|
||
| /* | ||
| * afp_server_identify() | ||
|
|
@@ -43,6 +44,10 @@ void afp_server_identify(struct afp_server * s) | |
| "Identified server %s as Time Capsule", | ||
| s->server_name_printable); | ||
| s->server_type = AFPFS_SERVER_TYPE_TIMECAPSULE; | ||
|
|
||
| if (s->dsi_default_timeout == DSI_DEFAULT_TIMEOUT) { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Using Severity: low 🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage. |
||
| s->dsi_default_timeout = DSI_TIMECAPSULE_DEFAULT_TIMEOUT; | ||
| } | ||
| } else { | ||
| log_for_client(NULL, AFPFSD, LOG_DEBUG, | ||
| "Could not identify server %s (machine type %s)", | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usage()output here still doesn’t mention the new-t/--timeoutoption, so-hhelp is now incomplete compared to the manpage and the actual supported flags.Severity: low
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.