Explorar el Código

listener: move to system

ambrop7 hace 15 años
padre
commit
89d8c223d6

+ 0 - 1
CMakeLists.txt

@@ -81,7 +81,6 @@ add_subdirectory(tuntap)
 add_subdirectory(predicate)
 add_subdirectory(nspr_support)
 add_subdirectory(server_connection)
-add_subdirectory(listener)
 add_subdirectory(security)
 
 # example programs

+ 1 - 1
client/CMakeLists.txt

@@ -6,7 +6,7 @@ add_executable(badvpn-client
     DataProto.c
     PasswordSender.c
 )
-target_link_libraries(badvpn-client system flow tuntap server_conection listener security ${NSPR_LIBRARIES} ${NSS_LIBRARIES})
+target_link_libraries(badvpn-client system flow tuntap server_conection security ${NSPR_LIBRARIES} ${NSS_LIBRARIES})
 
 install(
     TARGETS badvpn-client

+ 1 - 1
client/PasswordListener.h

@@ -38,11 +38,11 @@
 #include <misc/dead.h>
 #include <misc/debug.h>
 #include <system/DebugObject.h>
+#include <system/Listener.h>
 #include <misc/sslsocket.h>
 #include <structure/LinkedList2.h>
 #include <structure/BAVL.h>
 #include <nspr_support/BPRFileDesc.h>
-#include <listener/Listener.h>
 
 /**
  * Handler function called when a client identifies itself with a password

+ 0 - 2
listener/CMakeLists.txt

@@ -1,2 +0,0 @@
-add_library(listener Listener.c)
-target_link_libraries(listener system)

+ 1 - 1
server/CMakeLists.txt

@@ -1,5 +1,5 @@
 add_executable(badvpn-server server.c)
-target_link_libraries(badvpn-server system flow nspr_support predicate listener security ${NSPR_LIBRARIES} ${NSS_LIBRARIES})
+target_link_libraries(badvpn-server system flow nspr_support predicate security ${NSPR_LIBRARIES} ${NSS_LIBRARIES})
 
 install(
     TARGETS badvpn-server

+ 1 - 1
server/server.c

@@ -54,7 +54,7 @@
 #include <system/BTime.h>
 #include <system/DebugObject.h>
 #include <system/BAddr.h>
-#include <listener/Listener.h>
+#include <system/Listener.h>
 #include <security/BRandom.h>
 
 #ifndef BADVPN_USE_WINAPI

+ 4 - 1
system/CMakeLists.txt

@@ -5,7 +5,9 @@ endif ()
 
 set(BSYSTEM_ADDITIONAL_SOURCES)
 if (NOT WIN32)
-    list(APPEND BSYSTEM_ADDITIONAL_SOURCES BLog_syslog.c)
+    list(APPEND BSYSTEM_ADDITIONAL_SOURCES
+        BLog_syslog.c
+    )
 endif ()
 
 add_library(system
@@ -16,6 +18,7 @@ add_library(system
     BTime.c
     DebugObject.c
     BPending.c
+    Listener.c
     ${BSYSTEM_ADDITIONAL_SOURCES}
 )
 target_link_libraries(system ${BSYSTEM_ADDITIONAL_LIBS})

+ 1 - 1
listener/Listener.c → system/Listener.c

@@ -25,7 +25,7 @@
 #include <misc/debug.h>
 #include <system/BLog.h>
 
-#include <listener/Listener.h>
+#include <system/Listener.h>
 
 #include <generated/blog_channel_Listener.h>
 

+ 2 - 2
listener/Listener.h → system/Listener.h

@@ -24,8 +24,8 @@
  * Object used to listen on a socket and accept clients.
  */
 
-#ifndef BADVPN_LISTENER_LISTENER_H
-#define BADVPN_LISTENER_LISTENER_H
+#ifndef BADVPN_SYSTEM_LISTENER_H
+#define BADVPN_SYSTEM_LISTENER_H
 
 #include <misc/dead.h>
 #include <misc/debugcounter.h>