Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Distributed Autonomous Networked Control Lab
MicroCART
Commits
8ecb55c4
Commit
8ecb55c4
authored
7 years ago
by
burneykb
Browse files
Options
Downloads
Patches
Plain Diff
bug squashing in addnodes
parent
31e62a13
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
groundStation/src/cli/cli_nodes.c
+6
-1
6 additions, 1 deletion
groundStation/src/cli/cli_nodes.c
with
6 additions
and
1 deletion
groundStation/src/cli/cli_nodes.c
+
6
−
1
View file @
8ecb55c4
...
...
@@ -73,6 +73,7 @@ int cli_getnodes(struct backend_conn * conn, int argc, char ** argv) {
int
cli_addnode
(
struct
backend_conn
*
conn
,
int
argc
,
char
**
argv
)
{
struct
frontend_node_data
node_data
;
int
needHelp
=
0
;
if
((
needHelp
=
help_check
(
argc
,
argv
)))
{
...
...
@@ -87,8 +88,12 @@ int cli_addnode(struct backend_conn * conn, int argc, char ** argv) {
return
1
;
}
if
((
node_data
.
name
=
(
char
*
)
malloc
((
*
node_data
.
name
)
*
strlen
(
argv
[
2
])))
==
NULL
)
{
return
1
;
}
node_data
.
type
=
atoi
(
argv
[
1
]);
strncpy
(
node_data
.
name
,
argv
[
2
],
512
/* this value matches the max space of name */
);
strncpy
(
node_data
.
name
,
argv
[
2
],
strlen
(
argv
[
2
])
);
if
(
frontend_addnode
(
conn
,
&
node_data
))
{
return
1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment