aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/libhicnctrl/src/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'ctrl/libhicnctrl/src/cli.c')
-rw-r--r--ctrl/libhicnctrl/src/cli.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/ctrl/libhicnctrl/src/cli.c b/ctrl/libhicnctrl/src/cli.c
index edaa93057..81400f8ee 100644
--- a/ctrl/libhicnctrl/src/cli.c
+++ b/ctrl/libhicnctrl/src/cli.c
@@ -219,7 +219,7 @@ parse_options(int argc, char *argv[], hc_command_t * command)
goto ERR_PARAM;
}
/* NAME will be autogenerated (and currently not used) */
- //snprintf(command->face.name, NAME_LEN, "%s", argv[optind++]);
+ //snprintf(command->face.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
command->face.face.type = face_type_from_str(argv[optind++]);
if (command->face.face.type == FACE_TYPE_UNDEFINED)
goto ERR_PARAM;
@@ -253,9 +253,9 @@ parse_options(int argc, char *argv[], hc_command_t * command)
/* Id or name */
if (is_number(argv[optind])) {
command->face.id = atoi(argv[optind++]);
- snprintf(command->face.name, NAME_LEN, "%s", argv[optind++]);
+ snprintf(command->face.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
//} else if (is_symbolic_name(argv[optind])) {
- // snprintf(command->face.name, NAME_LEN, "%s", argv[optind++]);
+ // snprintf(command->face.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
} else {
fprintf(stderr, "Invalid argument\n");
goto ERR_PARAM;
@@ -319,7 +319,7 @@ parse_options(int argc, char *argv[], hc_command_t * command)
fprintf(stderr, "%s -l NAME TYPE LOCAL_ADDRESS LOCAL_PORT [INTERFACE_NAME]\n", argv[0]);
goto ERR_PARAM;
}
- snprintf(command->listener.name, NAME_LEN, "%s", argv[optind++]);
+ snprintf(command->listener.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
command->listener.type = connection_type_from_str(argv[optind++]);
if (command->listener.type == CONNECTION_TYPE_UNDEFINED)
goto ERR_PARAM;
@@ -347,9 +347,9 @@ parse_options(int argc, char *argv[], hc_command_t * command)
/* Id or name */
if (is_number(argv[optind])) {
command->listener.id = atoi(argv[optind++]);
- snprintf(command->listener.name, NAME_LEN, "%s", argv[optind++]);
+ snprintf(command->listener.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
} else if (is_symbolic_name(argv[optind])) {
- snprintf(command->listener.name, NAME_LEN, "%s", argv[optind++]);
+ snprintf(command->listener.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
} else {
fprintf(stderr, "Invalid argument\n");
goto ERR_PARAM;
@@ -385,7 +385,7 @@ parse_options(int argc, char *argv[], hc_command_t * command)
fprintf(stderr, "%s -c NAME TYPE LOCAL_ADDRESS LOCAL_PORT REMOTE_ADDRESS REMOTE_PORT [INTERFACE_NAME]\n", argv[0]);
goto ERR_PARAM;
}
- snprintf(command->connection.name, NAME_LEN, "%s", argv[optind++]);
+ snprintf(command->connection.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
command->connection.type = connection_type_from_str(argv[optind++]);
if (command->connection.type == CONNECTION_TYPE_UNDEFINED)
goto ERR_PARAM;
@@ -416,9 +416,9 @@ parse_options(int argc, char *argv[], hc_command_t * command)
/* Id or name */
if (is_number(argv[optind])) {
command->connection.id = atoi(argv[optind++]);
- snprintf(command->connection.name, NAME_LEN, "%s", argv[optind++]);
+ snprintf(command->connection.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
} else if (is_symbolic_name(argv[optind])) {
- snprintf(command->connection.name, NAME_LEN, "%s", argv[optind++]);
+ snprintf(command->connection.name, SYMBOLIC_NAME_LEN, "%s", argv[optind++]);
} else {
fprintf(stderr, "Invalid argument\n");
goto ERR_PARAM;