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
80ba4060
Commit
80ba4060
authored
7 years ago
by
Jakob Olsson
Browse files
Options
Downloads
Patches
Plain Diff
libmobile_hilink.c: remove some debugging prints
parent
e84be507
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
libmobile_hilink.c
+7
-15
7 additions, 15 deletions
libmobile_hilink.c
with
7 additions
and
15 deletions
libmobile_hilink.c
+
7
−
15
View file @
80ba4060
...
@@ -51,13 +51,10 @@ struct json_object *xml_to_json_converter(struct string *result)
...
@@ -51,13 +51,10 @@ struct json_object *xml_to_json_converter(struct string *result)
jobj
=
json_object_new_object
();
jobj
=
json_object_new_object
();
xml_to_json
(
origin_node
,
jobj
);
xml_to_json
(
origin_node
,
jobj
);
//debug_print("Json object from xml: %s\n", json_object_to_json_string(jobj));
if
(
doc_ptr
)
if
(
doc_ptr
)
xmlFreeDoc
(
doc_ptr
);
xmlFreeDoc
(
doc_ptr
);
return
jobj
;
return
jobj
;
fail_origin_node:
fail_origin_node:
if
(
doc_ptr
)
if
(
doc_ptr
)
xmlFreeDoc
(
doc_ptr
);
xmlFreeDoc
(
doc_ptr
);
...
@@ -191,24 +188,24 @@ static struct string *get_request(const char *url, const char *api_url)
...
@@ -191,24 +188,24 @@ static struct string *get_request(const char *url, const char *api_url)
CURL
*
curl
=
NULL
;
CURL
*
curl
=
NULL
;
CURLcode
status
;
CURLcode
status
;
struct
string
*
result
;
struct
string
*
result
;
printf
(
"193
\n
"
);
curl
=
curl_easy_init
();
curl
=
curl_easy_init
();
if
(
!
curl
)
if
(
!
curl
)
goto
leave
;
goto
leave
;
printf
(
"197
\n
"
);
result
=
memalloc_write_result
();
result
=
memalloc_write_result
();
if
(
!
result
)
if
(
!
result
)
goto
leave
;
goto
leave
;
printf
(
"201
\n
"
);
prepare_curl_write_callback
(
curl
,
url
,
result
);
prepare_curl_write_callback
(
curl
,
url
,
result
);
printf
(
"203
\n
"
);
//curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); //start the cookie engine ..
//curl_easy_setopt(curl, CURLOPT_COOKIEFILE, ""); //start the cookie engine ..
//curl_easy_setopt(curl, CURLOPT_COOKIEJAR, "cookies.txt"); //Save the cookie from the server to cookie.txt
//curl_easy_setopt(curl, CURLOPT_COOKIEJAR, "cookies.txt"); //Save the cookie from the server to cookie.txt
status
=
curl_easy_perform
(
curl
);
status
=
curl_easy_perform
(
curl
);
if
(
check_cookie_status
(
status
,
curl
))
if
(
check_cookie_status
(
status
,
curl
))
goto
leave
;
goto
leave
;
printf
(
"210
\n
"
);
//Prepare result struct to get next http response.
//Prepare result struct to get next http response.
//memset(result->ptr, 0, BUFFER_SIZE);
//memset(result->ptr, 0, BUFFER_SIZE);
free
(
result
->
ptr
);
free
(
result
->
ptr
);
...
@@ -216,15 +213,14 @@ static struct string *get_request(const char *url, const char *api_url)
...
@@ -216,15 +213,14 @@ static struct string *get_request(const char *url, const char *api_url)
if
(
!
result
->
ptr
)
if
(
!
result
->
ptr
)
goto
leave_calloc
;
goto
leave_calloc
;
result
->
len
=
0
;
result
->
len
=
0
;
printf
(
"214
\n
"
);
prepare_curl_write_callback
(
curl
,
api_url
,
result
);
prepare_curl_write_callback
(
curl
,
api_url
,
result
);
//curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "cookies.txt"); //Read locally stored cookies
//curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "cookies.txt"); //Read locally stored cookies
printf
(
"217
\n
"
);
status
=
curl_easy_perform
(
curl
);
status
=
curl_easy_perform
(
curl
);
if
(
check_cookie_status
(
status
,
curl
))
if
(
check_cookie_status
(
status
,
curl
))
goto
leave
;
goto
leave
;
printf
(
"222
\n
"
);
result
->
ptr
[
result
->
len
]
=
'\0'
;
result
->
ptr
[
result
->
len
]
=
'\0'
;
if
(
DEBUG_RESULT
)
if
(
DEBUG_RESULT
)
printf
(
"Http get request data is: %s
\n
"
,
result
->
ptr
);
printf
(
"Http get request data is: %s
\n
"
,
result
->
ptr
);
...
@@ -259,8 +255,6 @@ static struct string *post_request(const char *url, const char *api_url, char *p
...
@@ -259,8 +255,6 @@ static struct string *post_request(const char *url, const char *api_url, char *p
CURL
*
curl
=
NULL
;
CURL
*
curl
=
NULL
;
CURLcode
status
;
CURLcode
status
;
printf
(
"
\n
url %s
\n
api_url %s
\n
post_query %s
\n
"
,
url
,
api_url
,
post_query
);
curl
=
curl_easy_init
();
curl
=
curl_easy_init
();
if
(
!
curl
)
if
(
!
curl
)
goto
leave
;
goto
leave
;
...
@@ -275,9 +269,7 @@ static struct string *post_request(const char *url, const char *api_url, char *p
...
@@ -275,9 +269,7 @@ static struct string *post_request(const char *url, const char *api_url, char *p
if
(
check_cookie_status
(
status
,
curl
))
if
(
check_cookie_status
(
status
,
curl
))
goto
leave
;
goto
leave
;
printf
(
"result->ptr %s
\n
"
,
result
->
ptr
);
result
->
ptr
[
result
->
len
]
=
'\0'
;
result
->
ptr
[
result
->
len
]
=
'\0'
;
printf
(
"result->ptr %s
\n
"
,
result
->
ptr
);
/*session_id = parser(result->ptr, "SessionID=");
/*session_id = parser(result->ptr, "SessionID=");
if (DEBUG)
if (DEBUG)
...
...
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