about summary refs log tree commit diff stats
path: root/src/connection.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/connection.c')
-rw-r--r--src/connection.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/connection.c b/src/connection.c
index c484163..2c2bfbd 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -1,10 +1,10 @@
 #include <stdlib.h>
 #include <assert.h>
+#include <string.h>
 
-#include <libumumble.h>
+#include <umumble/umumble.h>
 #include <tlsuv/tlsuv.h>
 #include <uv.h>
-#include "Mumble.pb.h"
 
 void alloc_buffer(uv_handle_t *handle, size_t suggested_size, uv_buf_t *buf) {
 	buf->base = malloc(suggested_size);
@@ -37,10 +37,10 @@ void on_read_cb(uv_stream_t *client, ssize_t nread, const uv_buf_t *buf)
 	if (nread < 0) {
 		if (nread != UV_EOF) {
 			ctx->error = nread;
-			ctx->status = DISCONNECTED;
+			ctx->status = MUMBLE_STATUS_DISCONNECTED;
 		}
 		tlsuv_stream_close((tlsuv_stream_t *) client, on_close_cb);
-		ctx->status = DISCONNECTED;
+		ctx->status = MUMBLE_STATUS_DISCONNECTED;
 		free(buf->base);
 		free(client);
 		return;
@@ -62,11 +62,11 @@ void on_connect_cb(uv_connect_t *req, int status)
 
 	if (status < 0) {
 		ctx->error = status;
-		ctx->status = DISCONNECTED;
+		ctx->status = MUMBLE_STATUS_DISCONNECTED;
 		tlsuv_stream_close((tlsuv_stream_t *) req->handle, on_close_cb);
 		return;
 	}
-	ctx->status = CONNECTED;
+	ctx->status = MUMBLE_STATUS_CONNECTED;
 
 	tlsuv_stream_read(tls_stream, alloc_buffer, on_read_cb);
 
@@ -89,7 +89,7 @@ void on_resolve_cb(uv_getaddrinfo_t *resolver, int status, struct addrinfo *res)
 	assert(status >= 0);
 	if (status < 0) {
 		ctx->error = status;
-		ctx->status = DISCONNECTED;
+		ctx->status = MUMBLE_STATUS_DISCONNECTED;
 		return;
 	}