From 899e4c5326d76a38f5b519e569931cfa5931fe14 Mon Sep 17 00:00:00 2001 From: "matthias.ringwald" Date: Sat, 11 Jul 2009 17:42:03 +0000 Subject: [PATCH] eliminate main.c in BTdaemon --- project.xcodeproj/project.pbxproj | 2 ++ src/Makefile.am | 1 - src/daemon.c | 2 +- src/main.c | 18 ------------------ 4 files changed, 3 insertions(+), 20 deletions(-) delete mode 100644 src/main.c diff --git a/project.xcodeproj/project.pbxproj b/project.xcodeproj/project.pbxproj index 8e98af919..744418bab 100644 --- a/project.xcodeproj/project.pbxproj +++ b/project.xcodeproj/project.pbxproj @@ -55,6 +55,7 @@ 9C88500C0FBF6702004980E4 /* l2cap.c */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.c; name = l2cap.c; path = src/l2cap.c; sourceTree = ""; }; 9C88500D0FBF6702004980E4 /* l2cap.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; name = l2cap.h; path = src/l2cap.h; sourceTree = ""; }; 9CA3C0900FB8B3C4005F48DE /* TODO.txt */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; path = TODO.txt; sourceTree = ""; }; + 9CC152C61009052100223347 /* config.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = ""; }; 9CC813A00FFC0774002816F9 /* btstack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = btstack.h; path = src/btstack.h; sourceTree = ""; }; 9CC813A10FFC0774002816F9 /* btstack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = btstack.c; path = src/btstack.c; sourceTree = ""; }; 9CC813A30FFC0A51002816F9 /* daemon.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = daemon.h; path = src/daemon.h; sourceTree = ""; }; @@ -77,6 +78,7 @@ 08FB7794FE84155DC02AAC07 /* project */ = { isa = PBXGroup; children = ( + 9CC152C61009052100223347 /* config.h */, 9C20720E10025E0500A07EA4 /* libusb-1.0.dylib */, 08FB7795FE84155DC02AAC07 /* Source */, C6A0FF2B0290797F04C91782 /* Documentation */, diff --git a/src/Makefile.am b/src/Makefile.am index 9dc3df2f9..c1e4dfffb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -12,7 +12,6 @@ BTdaemon_SOURCES = \ hci_transport_h4.c \ $(usb_support) \ l2cap.c \ - main.c \ run_loop.c \ socket_server.c diff --git a/src/daemon.c b/src/daemon.c index a19f08286..88e6bc2d7 100644 --- a/src/daemon.c +++ b/src/daemon.c @@ -228,7 +228,7 @@ void acl_handler(uint8_t *packet, int size){ static hci_transport_t * transport; static hci_uart_config_t config; -int daemon_main (int argc, const char * argv[]){ +int main (int argc, const char * argv[]){ bt_control_t * control = NULL; diff --git a/src/main.c b/src/main.c deleted file mode 100644 index be317c7be..000000000 --- a/src/main.c +++ /dev/null @@ -1,18 +0,0 @@ -/* - * main.c - * - * Simple tests - * - * Created by Matthias Ringwald on 4/29/09. - */ - -#include "daemon.h" - -int main (int argc, const char * argv[]) { - - // start daemon - daemon_main(argc, argv); - - // daemon does not returs so far - return 0; -}