aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xautogen.sh2
-rw-r--r--configure.ac26
-rw-r--r--src/lib/protocols/dropbox.c11
3 files changed, 15 insertions, 24 deletions
diff --git a/autogen.sh b/autogen.sh
index 6d4876e5f..492ef3bf6 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -30,4 +30,4 @@ if test -z $AUTORECONF; then
fi
autoreconf -ivf
-./configure
+./configure $*
diff --git a/configure.ac b/configure.ac
index d2dfc4357..e65baea81 100644
--- a/configure.ac
+++ b/configure.ac
@@ -61,17 +61,20 @@ else
fi
fi
-PKG_CONFIG=$(which pkg-config)
-
-if test -d /usr/local/include/json-c/; then :
- CFLAGS="$CFLAGS -I/usr/local/include/json-c/"
- LDFLAGS="$LDFLAGS -L/usr/local/lib -ljson-c"
-else
- if ! test -z "$PKG_CONFIG"; then :
- CFLAGS="$CFLAGS $(pkg-config --cflags json-c)"
- LDFLAGS="$LDFLAGS $(pkg-config --libs json-c)"
- fi
-fi
+AC_ARG_ENABLE([json-c],
+ AS_HELP_STRING([--disable-json-c], [Disable json-c support]))
+
+AS_IF([test "x$enable_json_c" != "xno"], [
+ PKG_CONFIG_PATH=/usr/local/share/pkgconfig:$PKG_CONFIG_PATH
+ pkg-config --exists json-c
+ AS_IF([test "$?" == "0"],
+ [
+ CFLAGS="$CFLAGS $(pkg-config --cflags json-c)"
+ LDFLAGS="$LDFLAGS $(pkg-config --libs json-c)"
+ AC_CHECK_LIB(json-c, json_object_new_object, AC_DEFINE_UNQUOTED(HAVE_JSON_C, 1, [The JSON-C library is present]))
+ ],
+ [])
+ ])
OLD_LIBS=$LIBS
LIBS="-L/opt/napatech3/lib $LIBS"
@@ -81,7 +84,6 @@ AC_CHECK_LIB([ntapi],
[], [] )
LIBS=$OLD_LIBS
-AC_CHECK_LIB(json-c, json_object_new_object, AC_DEFINE_UNQUOTED(HAVE_JSON_C, 1, [The JSON-C library is present]))
AC_CHECK_LIB(pthread, pthread_setaffinity_np, AC_DEFINE_UNQUOTED(HAVE_PTHREAD_SETAFFINITY_NP, 1, [libc has pthread_setaffinity_np]))
diff --git a/src/lib/protocols/dropbox.c b/src/lib/protocols/dropbox.c
index 63a1f5531..f51de95d2 100644
--- a/src/lib/protocols/dropbox.c
+++ b/src/lib/protocols/dropbox.c
@@ -58,17 +58,6 @@ static void ndpi_check_dropbox(struct ndpi_detection_module_struct *ndpi_struct,
}
}
}
- if((packet->udp->dest == dropbox_port)) {
- if(payload_len > 2) {
- char * p = (char *) packet->payload;
- while(*p++ != '{');
- if(strncmp(p,"\"messageType\"", 13) == 0) {
- NDPI_LOG(NDPI_PROTOCOL_DROPBOX, ndpi_struct, NDPI_LOG_DEBUG, "Found dropbox.\n");
- ndpi_int_dropbox_add_connection(ndpi_struct, flow, 0);
- return;
- }
- }
- }
}
NDPI_LOG(NDPI_PROTOCOL_DROPBOX, ndpi_struct, NDPI_LOG_DEBUG, "exclude dropbox.\n");