diff options
author | Timo Dritschler <timo.dritschler@kit.edu> | 2014-11-21 17:54:13 +0100 |
---|---|---|
committer | Timo Dritschler <timo.dritschler@kit.edu> | 2014-11-21 17:54:13 +0100 |
commit | 5235e634860744f0b1251b0e50e89446f93381c2 (patch) | |
tree | b2ead7723f9d7fe30ca5fc000b7f37dd150d0561 /src/kiro-server.c | |
parent | f98bd3a5d58c59d950aa7318e9b708c42d51687f (diff) | |
download | kiro-5235e634860744f0b1251b0e50e89446f93381c2.tar.gz kiro-5235e634860744f0b1251b0e50e89446f93381c2.tar.bz2 kiro-5235e634860744f0b1251b0e50e89446f93381c2.tar.xz kiro-5235e634860744f0b1251b0e50e89446f93381c2.zip |
Fix #1: Added missing documentation to TRB, Client and Server header
Fixed build warnings
Fixed a bug in kiro-test-bandwidth
Diffstat (limited to 'src/kiro-server.c')
-rw-r--r-- | src/kiro-server.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/kiro-server.c b/src/kiro-server.c index b3c8516..91c86ec 100644 --- a/src/kiro-server.c +++ b/src/kiro-server.c @@ -288,7 +288,7 @@ event_loop (void *self) int -kiro_server_start (KiroServer *self, char *address, char *port, void *mem, size_t mem_size) +kiro_server_start (KiroServer *self, const char *address, const char *port, void *mem, size_t mem_size) { KiroServerPrivate *priv = KIRO_SERVER_GET_PRIVATE (self); @@ -307,7 +307,14 @@ kiro_server_start (KiroServer *self, char *address, char *port, void *mem, size_ hints.ai_port_space = RDMA_PS_IB; hints.ai_flags = RAI_PASSIVE; - if (rdma_getaddrinfo (address, port, &hints, &res_addrinfo)) { + char *addr_c = g_strdup (address); + char *port_c = g_strdup (port); + + int rtn = rdma_getaddrinfo (addr_c, port_c, &hints, &res_addrinfo); + g_free (addr_c); + g_free (port_c); + + if (rtn) { g_critical ("Failed to create address information: %s", strerror (errno)); return -1; } @@ -371,6 +378,8 @@ kiro_server_start (KiroServer *self, char *address, char *port, void *mem, size_ static void disconnect_client (gpointer data, gpointer user_data) { + (void)user_data; + if (data) { struct rdma_cm_id *id = (struct rdma_cm_id *)data; struct kiro_connection_context *ctx = (struct kiro_connection_context *) (id->context); |