Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mdmngr
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
IOPSYS
mdmngr
Commits
ddfe15c1
Commit
ddfe15c1
authored
7 years ago
by
Arun Muthusamy
Browse files
Options
Downloads
Patches
Plain Diff
comment out logic code on post calls
parent
a9e5b553
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
common.c
+3
-3
3 additions, 3 deletions
common.c
dongle_infrastructure.c
+22
-3
22 additions, 3 deletions
dongle_infrastructure.c
with
25 additions
and
6 deletions
common.c
+
3
−
3
View file @
ddfe15c1
...
@@ -59,9 +59,9 @@ void xml_to_json(xmlNode *anode, json_object *jobj)
...
@@ -59,9 +59,9 @@ void xml_to_json(xmlNode *anode, json_object *jobj)
json_object
*
cur_jstr
=
NULL
;
json_object
*
cur_jstr
=
NULL
;
for
(
cur_node
=
anode
;
cur_node
;
cur_node
=
cur_node
->
next
)
{
for
(
cur_node
=
anode
;
cur_node
;
cur_node
=
cur_node
->
next
)
{
debug_print
(
"child address: %p
\n
"
,
cur_node
);
//
debug_print("child address: %p\n", cur_node);
debug_print
(
"next addres: %p
\n
"
,
cur_node
->
next
);
//
debug_print("next addres: %p\n", cur_node->next);
debug_print
(
"root child content: %s
\n
"
,
(
uint8_t
*
)
xmlNodeGetContent
(
cur_node
));
//
debug_print("root child content: %s\n", (uint8_t *)xmlNodeGetContent(cur_node));
if
(
cur_node
->
type
==
XML_ELEMENT_NODE
)
{
if
(
cur_node
->
type
==
XML_ELEMENT_NODE
)
{
if
(
xmlChildElementCount
(
cur_node
)
==
0
)
{
if
(
xmlChildElementCount
(
cur_node
)
==
0
)
{
...
...
This diff is collapsed.
Click to expand it.
dongle_infrastructure.c
+
22
−
3
View file @
ddfe15c1
...
@@ -67,6 +67,12 @@ int set_pin(struct ubus_context *ctx, struct ubus_object *obj,
...
@@ -67,6 +67,12 @@ int set_pin(struct ubus_context *ctx, struct ubus_object *obj,
new_pin
=
(
char
*
)
blobmsg_data
(
tb
[
NEW_PIN
]);
new_pin
=
(
char
*
)
blobmsg_data
(
tb
[
NEW_PIN
]);
current_pin
=
(
char
*
)
blobmsg_data
(
tb
[
CURRENT_PIN
]);
current_pin
=
(
char
*
)
blobmsg_data
(
tb
[
CURRENT_PIN
]);
response
=
mobile_set_pin
(
global_dev
,
current_pin
,
new_pin
);
if
(
!
response
)
{
debug_print
(
"error setting pin!
\n
"
);
goto
fail_data
;
}
/*
rv = validate_pin_format(new_pin);
rv = validate_pin_format(new_pin);
if (rv > 0) {
if (rv > 0) {
debug_print("invalid pin format\n");
debug_print("invalid pin format\n");
...
@@ -95,7 +101,7 @@ int set_pin(struct ubus_context *ctx, struct ubus_object *obj,
...
@@ -95,7 +101,7 @@ int set_pin(struct ubus_context *ctx, struct ubus_object *obj,
debug_print("incorrect pin!\n");
debug_print("incorrect pin!\n");
goto fail_input_json;
goto fail_input_json;
}
}
*/
return
print_to_ubus
(
response
,
ctx
,
req
);
return
print_to_ubus
(
response
,
ctx
,
req
);
fail_input_json:
fail_input_json:
json_object_put
(
response
);
json_object_put
(
response
);
...
@@ -127,6 +133,12 @@ int disable_pin(struct ubus_context *ctx, struct ubus_object *obj,
...
@@ -127,6 +133,12 @@ int disable_pin(struct ubus_context *ctx, struct ubus_object *obj,
}
}
pin
=
(
char
*
)
blobmsg_data
(
tb
[
PIN
]);
pin
=
(
char
*
)
blobmsg_data
(
tb
[
PIN
]);
response
=
mobile_disable_pin
(
global_dev
,
pin
);
if
(
!
response
)
{
debug_print
(
"error disabling pin!
\n
"
);
goto
fail_data
;
}
/*
rv = validate_pin_format(pin);
rv = validate_pin_format(pin);
if (rv < 0) {
if (rv < 0) {
debug_print("invalid pin format!\n");
debug_print("invalid pin format!\n");
...
@@ -151,7 +163,7 @@ int disable_pin(struct ubus_context *ctx, struct ubus_object *obj,
...
@@ -151,7 +163,7 @@ int disable_pin(struct ubus_context *ctx, struct ubus_object *obj,
goto fail_input_response;
goto fail_input_response;
}
}
*/
return
print_to_ubus
(
response
,
ctx
,
req
);
return
print_to_ubus
(
response
,
ctx
,
req
);
fail_input_response:
fail_input_response:
json_object_put
(
response
);
json_object_put
(
response
);
...
@@ -183,7 +195,13 @@ int enable_pin(struct ubus_context *ctx, struct ubus_object *obj,
...
@@ -183,7 +195,13 @@ int enable_pin(struct ubus_context *ctx, struct ubus_object *obj,
}
}
pin
=
(
char
*
)
blobmsg_data
(
tb
[
PIN
]);
pin
=
(
char
*
)
blobmsg_data
(
tb
[
PIN
]);
rv
=
validate_pin_format
(
pin
);
response
=
mobile_enable_pin
(
global_dev
,
pin
);
if
(
!
response
)
{
debug_print
(
"error disabling pin!
\n
"
);
goto
fail_data
;
}
/* rv = validate_pin_format(pin);
if (rv < 0) {
if (rv < 0) {
debug_print("invalid pin format!\n");
debug_print("invalid pin format!\n");
goto fail_input;
goto fail_input;
...
@@ -206,6 +224,7 @@ int enable_pin(struct ubus_context *ctx, struct ubus_object *obj,
...
@@ -206,6 +224,7 @@ int enable_pin(struct ubus_context *ctx, struct ubus_object *obj,
debug_print("incorrect pin!\n");
debug_print("incorrect pin!\n");
goto fail_input_response;
goto fail_input_response;
}
}
*/
return
print_to_ubus
(
response
,
ctx
,
req
);
return
print_to_ubus
(
response
,
ctx
,
req
);
enabled:
enabled:
...
...
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