Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
fredix
ncs
Commits
0d15fad3
Commit
0d15fad3
authored
Apr 24, 2013
by
fred
Browse files
check if user's node exist
parent
d23c8bdc
Changes
3
Hide whitespace changes
Inline
Side-by-side
docs/ncs_dev.dia
View file @
0d15fad3
No preview for this file type
docs/ncs_dev.png
View replaced file @
d23c8bdc
View file @
0d15fad3
498 KB
|
W:
|
H:
503 KB
|
W:
|
H:
2-up
Swipe
Onion skin
zerogw.cpp
View file @
0d15fad3
...
...
@@ -338,6 +338,7 @@ void Api_payload::receive_http_payload()
nodes
.
elems
(
list_nodes
);
list
<
be
>::
iterator
i
;
bool
node_found
=
false
;
/******** Iterate over each user's nodes *******/
/******** find node with uuid and set the node id to payload collection *******/
for
(
i
=
list_nodes
.
begin
();
i
!=
list_nodes
.
end
();
++
i
)
...
...
@@ -352,9 +353,11 @@ void Api_payload::receive_http_payload()
if
(
zerogw
[
"X-node-uuid"
].
toStdString
().
compare
(
l_node
.
getField
(
"uuid"
).
str
())
==
0
)
{
payload_builder
.
append
(
"node_id"
,
node_id
.
OID
());
node_found
=
true
;
break
;
}
}
}
if
(
!
node_found
)
bodyMessage
=
buildResponse
(
"error"
,
"node"
,
"unknown"
);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment