mirror of
https://github.com/berlin-open-wireless-lab/DAWN.git
synced 2025-03-09 15:40:12 +00:00
remove some code
This commit is contained in:
parent
5d52c806e6
commit
a4117a1bdf
3 changed files with 3 additions and 25 deletions
19
src/main.c
19
src/main.c
|
@ -9,26 +9,16 @@
|
|||
#include "ubus.h"
|
||||
#include "dawn_uci.h"
|
||||
#include "tcpsocket.h"
|
||||
|
||||
#define BUFSIZE 17
|
||||
#define BUFSIZE_DIR 256
|
||||
|
||||
#include "crypto.h"
|
||||
#include "dawn_iwinfo.h"
|
||||
|
||||
void daemon_shutdown();
|
||||
|
||||
void signal_handler(int sig);
|
||||
|
||||
int run_tcp_server();
|
||||
|
||||
int init_mutex();
|
||||
|
||||
struct sigaction signal_action;
|
||||
|
||||
pthread_t tid_tcp_server;
|
||||
pthread_t tid_connections;
|
||||
|
||||
void daemon_shutdown() {
|
||||
// kill threads
|
||||
close_socket();
|
||||
|
@ -94,13 +84,6 @@ int init_mutex() {
|
|||
return 0;
|
||||
}
|
||||
|
||||
int run_tcp_server() {
|
||||
//run_server(1027);
|
||||
//pthread_create(&tid_tcp_server, NULL, &run_tcp_socket, NULL);
|
||||
//start_umdns_update();
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
const char *ubus_socket = NULL;
|
||||
|
@ -119,8 +102,8 @@ int main(int argc, char **argv) {
|
|||
uci_init();
|
||||
struct network_config_s net_config = uci_get_dawn_network();
|
||||
network_config = net_config;
|
||||
printf("Broadcst bla: %s\n", net_config.broadcast_ip);
|
||||
|
||||
// init crypto
|
||||
gcrypt_init();
|
||||
gcrypt_set_key_and_iv(net_config.shared_key, net_config.iv);
|
||||
|
||||
|
|
|
@ -2,24 +2,18 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <libconfig.h>
|
||||
|
||||
#include <libubox/blobmsg_json.h>
|
||||
|
||||
#include "networksocket.h"
|
||||
#include "datastorage.h"
|
||||
#include "broadcastsocket.h"
|
||||
#include "multicastsocket.h"
|
||||
#include "broadcastsocket.h"
|
||||
#include "ubus.h"
|
||||
#include "crypto.h"
|
||||
#include "utils.h"
|
||||
|
||||
/* Network Defines */
|
||||
#define MAX_RECV_STRING 5000
|
||||
#define NET_CONFIG_PATH "/etc/wlancontroller/networkconfig.conf"
|
||||
|
||||
/* Network Attributes */
|
||||
int sock;
|
||||
|
|
|
@ -32,6 +32,7 @@ struct client {
|
|||
|
||||
struct ustream_fd s;
|
||||
int ctr;
|
||||
int counter;
|
||||
};
|
||||
|
||||
static void client_close(struct ustream *s) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue