remove some code

This commit is contained in:
PolynomialDivision 2018-01-26 21:40:18 +01:00
parent 5d52c806e6
commit a4117a1bdf
3 changed files with 3 additions and 25 deletions

View file

@ -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);

View file

@ -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;

View file

@ -32,6 +32,7 @@ struct client {
struct ustream_fd s;
int ctr;
int counter;
};
static void client_close(struct ustream *s) {