projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Assign more suitable types and fix narrowing conversion warns.
[tinc]
/
src
/
net_setup.c
diff --git
a/src/net_setup.c
b/src/net_setup.c
index
f3a4bcc
..
c2e0825
100644
(file)
--- a/
src/net_setup.c
+++ b/
src/net_setup.c
@@
-26,6
+26,7
@@
#include "conf_net.h"
#include "conf.h"
#include "connection.h"
#include "conf_net.h"
#include "conf.h"
#include "connection.h"
+#include "compression.h"
#include "control.h"
#include "device.h"
#include "digest.h"
#include "control.h"
#include "device.h"
#include "digest.h"
@@
-859,10
+860,9
@@
static bool setup_myself(void) {
#endif
/* Compression */
#endif
/* Compression */
-
if(get_config_int(lookup_config(config_tree, "Compression"), &myself->incompression)) {
switch(myself->incompression) {
if(get_config_int(lookup_config(config_tree, "Compression"), &myself->incompression)) {
switch(myself->incompression) {
- case
12
:
+ case
COMPRESS_LZ4
:
#ifdef HAVE_LZ4
break;
#else
#ifdef HAVE_LZ4
break;
#else
@@
-871,8
+871,8
@@
static bool setup_myself(void) {
return false;
#endif
return false;
#endif
- case
11
:
- case
10
:
+ case
COMPRESS_LZO_HI
:
+ case
COMPRESS_LZO_LO
:
#ifdef HAVE_LZO
break;
#else
#ifdef HAVE_LZO
break;
#else
@@
-881,15
+881,15
@@
static bool setup_myself(void) {
return false;
#endif
return false;
#endif
- case 9:
- case 8:
- case 7:
- case 6:
- case 5:
- case 4:
- case 3:
- case 2:
- case 1:
+ case
COMPRESS_ZLIB_
9:
+ case
COMPRESS_ZLIB_
8:
+ case
COMPRESS_ZLIB_
7:
+ case
COMPRESS_ZLIB_
6:
+ case
COMPRESS_ZLIB_
5:
+ case
COMPRESS_ZLIB_
4:
+ case
COMPRESS_ZLIB_
3:
+ case
COMPRESS_ZLIB_
2:
+ case
COMPRESS_ZLIB_
1:
#ifdef HAVE_ZLIB
break;
#else
#ifdef HAVE_ZLIB
break;
#else
@@
-898,7
+898,7
@@
static bool setup_myself(void) {
return false;
#endif
return false;
#endif
- case
0
:
+ case
COMPRESS_NONE
:
break;
default:
break;
default:
@@
-907,10
+907,10
@@
static bool setup_myself(void) {
return false;
}
} else {
return false;
}
} else {
- myself->incompression =
0
;
+ myself->incompression =
COMPRESS_NONE
;
}
}
- myself->connection->outcompression =
0
;
+ myself->connection->outcompression =
COMPRESS_NONE
;
/* Done */
/* Done */