Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libdap
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
cellframe
libdap
Commits
a51c0067
Commit
a51c0067
authored
6 years ago
by
armatusmiles
Browse files
Options
Downloads
Patches
Plain Diff
[*] Fix warnings
parent
563ad1bd
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.travis.yml
+2
-1
2 additions, 1 deletion
.travis.yml
core/unix/dap_network_monitor.c
+1
-0
1 addition, 0 deletions
core/unix/dap_network_monitor.c
test/core/unix/dap_network_monitor_test.c
+5
-5
5 additions, 5 deletions
test/core/unix/dap_network_monitor_test.c
with
8 additions
and
6 deletions
.travis.yml
+
2
−
1
View file @
a51c0067
sudo
:
required
sudo
:
required
language
:
cpp
language
:
cpp
compiler
:
gcc
compiler
:
gcc
dist
:
trusty
dist
:
xenial
notifications
:
notifications
:
email
:
false
email
:
false
...
@@ -10,6 +10,7 @@ before_install:
...
@@ -10,6 +10,7 @@ before_install:
-
git submodule update --recursive
-
git submodule update --recursive
script
:
script
:
-
sudo service network-manager start
-
export CC=gcc-5
-
export CC=gcc-5
-
mkdir build
-
mkdir build
-
cd build
-
cd build
...
...
This diff is collapsed.
Click to expand it.
core/unix/dap_network_monitor.c
+
1
−
0
View file @
a51c0067
...
@@ -182,4 +182,5 @@ static void* network_monitor_worker(void *arg)
...
@@ -182,4 +182,5 @@ static void* network_monitor_worker(void *arg)
}
}
}
}
}
}
return
NULL
;
}
}
This diff is collapsed.
Click to expand it.
test/core/unix/dap_network_monitor_test.c
+
5
−
5
View file @
a51c0067
...
@@ -84,7 +84,7 @@ void _network_callback(const dap_network_notification_t result)
...
@@ -84,7 +84,7 @@ void _network_callback(const dap_network_notification_t result)
// result.route.s_gateway_address);
// result.route.s_gateway_address);
}
else
if
(
result
.
type
==
IP_ROUTE_ADD
)
{
}
else
if
(
result
.
type
==
IP_ROUTE_ADD
)
{
if
(
result
.
route
.
gateway_address
!=
-
1
)
{
// gateway address is present
if
(
result
.
route
.
gateway_address
!=
(
uint64_t
)
-
1
)
{
// gateway address is present
dap_test_msg
(
"Checking new gateway addr"
);
dap_test_msg
(
"Checking new gateway addr"
);
dap_assert
(
result
.
route
.
gateway_address
==
dap_assert
(
result
.
route
.
gateway_address
==
_test_event_cases
[
NEW_GATEWAY_EV
].
route
.
gateway_address
,
_test_event_cases
[
NEW_GATEWAY_EV
].
route
.
gateway_address
,
...
@@ -164,12 +164,12 @@ void dap_network_monitor_test_run(void)
...
@@ -164,12 +164,12 @@ void dap_network_monitor_test_run(void)
dap_network_monitor_init
(
_network_callback
);
dap_network_monitor_init
(
_network_callback
);
const
char
*
add_test_interfece
=
"nmcli connection add type tun con-name "
const
char
*
add_test_interfece
=
"
sudo
nmcli connection add type tun con-name "
"DiveVPNTest autoconnect false ifname tun10 "
"DiveVPNTest autoconnect false ifname tun10 "
"mode tun ip4 10.1.0.111 gw4 10.1.0.1"
;
"mode tun ip4 10.1.0.111 gw4 10.1.0.1"
;
const
char
*
up_test_interfece
=
"nmcli connection up DiveVPNTest"
;
const
char
*
up_test_interfece
=
"
sudo
nmcli connection up DiveVPNTest"
;
const
char
*
down_test_interfece
=
"nmcli connection down DiveVPNTest"
;
const
char
*
down_test_interfece
=
"
sudo
nmcli connection down DiveVPNTest"
;
const
char
*
delete_test_interfece
=
"nmcli connection delete DiveVPNTest 2> /dev/null"
;
const
char
*
delete_test_interfece
=
"
sudo
nmcli connection delete DiveVPNTest 2> /dev/null"
;
system
(
delete_test_interfece
);
system
(
delete_test_interfece
);
system
(
add_test_interfece
);
system
(
add_test_interfece
);
...
...
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