Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
G
gdut-drcom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nanahira
gdut-drcom
Commits
23350d10
Commit
23350d10
authored
Nov 19, 2016
by
chenhaowen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: parse option enable crypt of config file
parent
65d02fc4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
0 deletions
+19
-0
src/config.c
src/config.c
+11
-0
src/config.h
src/config.h
+6
-0
src/root/etc/gdut-drcom.conf
src/root/etc/gdut-drcom.conf
+2
-0
No files found.
src/config.c
View file @
23350d10
...
...
@@ -90,6 +90,17 @@ static int parse_line(char *buf, int size)
{
sscanf
(
opt
.
value
,
"%02hhx"
,
&
drcom_config
.
keep_alive1_flag
);
}
else
if
(
strcmp
(
opt
.
key
,
"enable_crypt"
)
==
0
)
{
if
(
strcmp
(
opt
.
value
,
"1"
)
==
0
)
{
drcom_config
.
enable_crypt
=
1
;
}
else
if
(
strcmp
(
opt
.
value
,
"0"
)
==
0
)
{
drcom_config
.
enable_crypt
=
0
;
}
}
/* else if(strcmp(opt.key, "keep_alive2_flag") == 0)
{
sscanf(opt.value, "%02hhx", &drcom_config.keep_alive2_flag);
...
...
src/config.h
View file @
23350d10
#ifndef __CONFIG_H__
#define __CONFIG_H__
enum
CRYPT_TYPE
{
DISABLE_CRYPT
=
0
,
ENABLE_CRYPT
=
1
,
AUTO_CRYPT
=
2
};
struct
config_s
{
char
remote_ip
[
20
];
int
remote_port
;
...
...
src/root/etc/gdut-drcom.conf
View file @
23350d10
remote_ip
=
10
.
0
.
3
.
2
#remote_root = 61440 #leave as default
keep_alive1_flag
=
2
a
enable_crypt
=
1
Write
Preview
Markdown
is supported
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