Skip to content
Snippets Groups Projects
Commit 9770417c authored by Marek Vavrusa's avatar Marek Vavrusa
Browse files

Fixed default port for nsupdate.

parent 8cdbf859
No related branches found
No related tags found
No related merge requests found
......@@ -155,6 +155,9 @@ int nsupdate_params_parse(params_t *params, int argc, char *argv[])
if (ret != KNOT_EOK) {
return ret;
}
/* Fetch default server. */
server_t *srv = TAIL(params->servers);
/* Command line options processing. */
while ((opt = getopt(argc, argv, "dDvp:t:r:y:")) != -1) {
......@@ -167,6 +170,14 @@ int nsupdate_params_parse(params_t *params, int argc, char *argv[])
case 'v':
params_flag_tcp(params);
break;
case 'p':
free(srv->service);
srv->service = strdup(optarg);
if (!srv->service) {
ERR("failed to set default port '%s'\n", optarg);
return KNOT_ENOMEM;
}
break;
case 'r':
ret = params_parse_num(optarg, &params->retries);
if (ret != KNOT_EOK) return ret;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment