summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ipcpd/shim-udp/main.c14
-rw-r--r--src/irmd/main.c2
-rw-r--r--src/tools/echo/echo_server.c4
3 files changed, 10 insertions, 10 deletions
diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/shim-udp/main.c
index 130ac17e..14b08ba8 100644
--- a/src/ipcpd/shim-udp/main.c
+++ b/src/ipcpd/shim-udp/main.c
@@ -48,7 +48,7 @@
#define THIS_TYPE IPCP_SHIM_UDP
#define LISTEN_PORT htons(0x0D1F)
#define SHIM_UDP_BUF_SIZE 256
-#define SHIM_UDP_MAX_SDU_SIZE 9000
+#define SHIM_UDP_MAX_SDU_SIZE 8980
#define shim_data(type) ((struct ipcp_udp_data *) type->data)
@@ -127,7 +127,7 @@ struct ipcp_udp_data * ipcp_udp_data_create(char * ap_name,
return NULL;
}
- udp_data = malloc (sizeof *udp_data);
+ udp_data = malloc(sizeof *udp_data);
if (udp_data == NULL) {
LOG_DBGF("Failed to allocate.");
return NULL;
@@ -147,7 +147,7 @@ struct ipcp_udp_data * ipcp_udp_data_create(char * ap_name,
return udp_data;
}
-void * ipcp_udp_listener()
+static void * ipcp_udp_listener()
{
char buf[SHIM_UDP_BUF_SIZE];
int n = 0;
@@ -251,7 +251,7 @@ void * ipcp_udp_listener()
}
}
-static void * ipcp_udp_sdu_reader (void * o)
+static void * ipcp_udp_sdu_reader()
{
int n;
int fd;
@@ -423,7 +423,7 @@ int ipcp_udp_flow_alloc(uint32_t port_id,
if (qos != NULL)
LOG_DBGF("QoS requested. UDP/IP can't do that.");
- flow = malloc (sizeof *flow);
+ flow = malloc(sizeof *flow);
if (flow == NULL)
return -1;
@@ -494,7 +494,7 @@ int ipcp_udp_flow_alloc(uint32_t port_id,
ret_msg = send_recv_irm_msg(&msg);
if (ret_msg == NULL) {
- close (flow->fd);
+ close(flow->fd);
ipcp_data_del_flow(_ipcp->data, flow->flow.port_id);
return -1;
}
@@ -562,7 +562,7 @@ struct ipcp * ipcp_udp_create(char * ap_name, char * i_id)
return NULL;
}
- ops = malloc (sizeof *ops);
+ ops = malloc(sizeof *ops);
if (ops == NULL) {
free(data);
free(i);
diff --git a/src/irmd/main.c b/src/irmd/main.c
index 9a65cd4a..374bfb6c 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -89,7 +89,7 @@ static struct ipcp_entry * find_ipcp_by_name(instance_name_t * api)
static pid_t find_pid_by_dif_name(char * dif_name)
{
- struct list_head * pos = NULL;
+ struct list_head * pos = NULL;
list_for_each(pos, &instance->ipcps) {
struct ipcp_entry * tmp =
diff --git a/src/tools/echo/echo_server.c b/src/tools/echo/echo_server.c
index d7099a2d..e457e22b 100644
--- a/src/tools/echo/echo_server.c
+++ b/src/tools/echo/echo_server.c
@@ -64,7 +64,7 @@ int server_main()
return -1;
}
- printf("Echo server started...");
+ printf("Echo server started...\n");
while (true) {
client_fd = flow_accept(server_fd,
@@ -73,7 +73,7 @@ int server_main()
continue;
}
- printf("New flow from %s", client_name);
+ printf("New flow from %s\n", client_name);
if (flow_alloc_resp(client_fd, 0)) {
printf("Failed to give an allocate response\n");