Skip to content
Browse files

changes and license edit

  • Loading branch information...
1 parent a2fe124 commit 689e3bb0bce9e7506bb0d5553a7870f4a6127575 @DylanLukes DylanLukes committed Oct 14, 2011
View
8 CMakeLists.txt
@@ -10,11 +10,11 @@ set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib)
# Project Options
-option(MCPROXY_USE_CLANG "Compile using clang, if it is available" ON)
+option(MCPROXY_USE_CLANG "Compile using clang, if it is available" OFF)
option(MCPROXY_USE_NAMED_SEMAPHORES "Use named semaphores regardless of platform" OFF)
-option(MCPROXY_HANDLERS_STATIC "Compile handlers as static libraries" ON)
-option(MCPROXY_LIBAPI_STATIC "Compile libproxyapi as a static library" ON)
-set(MCPROXY_EMBEDDED_HANDLER "noop" CACHE STRING "Embedded handler library for non-modular mode")
+option(MCPROXY_HANDLERS_STATIC "Compile handlers as static libraries" OFF)
+option(MCPROXY_LIBAPI_STATIC "Compile libproxyapi as a static library" OFF)
+set(MCPROXY_EMBEDDED_HANDLER "" CACHE STRING "Embedded handler library for non-modular mode")
# Flags/Includes
add_definitions("-Werror -Wall -Wextra
View
2 handlers/serverlog/src/action.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
* ServerLog handler library.
*
* Licensed under MIT open-source license.
View
2 handlers/serverlog/src/chat.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
* ServerLog handler library.
*
* Licensed under MIT open-source license.
View
2 handlers/serverlog/src/gamestate.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
* ServerLog handler library.
*
* Licensed under MIT open-source license.
View
2 handlers/serverlog/src/init.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
* ServerLog handler library.
*
* Licensed under MIT open-source license.
View
2 handlers/serverlog/src/inventory.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
* ServerLog handler library.
*
* Licensed under MIT open-source license.
View
2 handlers/serverlog/src/login.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
* ServerLog handler library.
*
* Licensed under MIT open-source license.
View
2 handlers/serverlog/src/settings.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
* ServerLog handler library.
*
* Licensed under MIT open-source license.
View
2 handlers/serverlog/src/track.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
* ServerLog handler library.
*
* Licensed under MIT open-source license.
View
2 handlers/serverlog/src/transaction.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
* ServerLog handler library.
*
* Licensed under MIT open-source license.
View
45 src/core.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
*
* Licensed under MIT open-source license.
* See COPYING file for details.
@@ -34,7 +34,7 @@ int core_loop_proxy(nethost_t* client, nethost_t* server, thread_data_t* thread_
int core_throttle(uint64_t* last, unsigned long delay);
int core_dispatch(thread_data_t* data, char direction,
- nethost_t* host_from, nethost_t* host_to)
+ nethost_t* host_from, nethost_t* host_to)
{
unsigned char msgid;
msgdesc_t* msgdesc = NULL;
@@ -65,17 +65,17 @@ int core_dispatch(thread_data_t* data, char direction,
// Datahelper (from -> to)
if(msgdesc->datahelper) {
if(msgdesc->datahelper(data->client_id, MODE_RECV,
- msgid, host_from,
- objlist, msgdesc->datahelper_extra) != PROXY_OK)
+ msgid, host_from,
+ objlist, msgdesc->datahelper_extra) != PROXY_OK)
return CORE_EDATAHELPER;
}
// Handler
handler_result = PROXY_OK;
if(msgdesc->handler) {
handler_result = msgdesc->handler(data->client_id, direction,
- msgid, host_from, host_to,
- objlist, msgdesc->handler_extra);
+ msgid, host_from, host_to,
+ objlist, msgdesc->handler_extra);
if(handler_result == PROXY_ERROR)
return CORE_EHANDLER;
}
@@ -87,15 +87,15 @@ int core_dispatch(thread_data_t* data, char direction,
if(msgdesc->format) {
if(proto_send(host_to, objlist, OBJFLAG_NORMAL) != 0)
- return CORE_ENETWORK;
+ return CORE_ENETWORK;
}
// Datahelper (to -> from)
if(msgdesc->datahelper) {
if(msgdesc->datahelper(data->client_id, MODE_SEND,
- msgid, host_to,
- objlist, msgdesc->datahelper_extra) != PROXY_OK)
- return CORE_EDATAHELPER;
+ msgid, host_to,
+ objlist, msgdesc->datahelper_extra) != PROXY_OK)
+ return CORE_EDATAHELPER;
}
}
@@ -165,28 +165,28 @@ static void* core_thread(void* data)
if(!pool_create(&pool, sys_get_config()->pool_size)) {
log_print(NULL, "(%04d) Thread memory pool allocation failed",
- thread_data->client_id);
+ thread_data->client_id);
goto _thread_exit;
}
pool_set_default(&pool);
ev = &thread_data->events[EVENT_CONNECTED];
if(ev->callback) {
if(ev->callback(thread_data->client_id, EVENT_CONNECTED, client, server,
- ev->callback_extra) != PROXY_OK) {
+ ev->callback_extra) != PROXY_OK) {
log_print(NULL, "(%04d) CONNECTED event callback returned error status",
- thread_data->client_id);
+ thread_data->client_id);
goto _thread_exit;
}
}
CORE_MODE(MCP_MODE_CLIENT) {
log_print(NULL, "(%04d) Connected to server at %s on port %d",
- thread_data->client_id, thread_data->server_addr, thread_data->server_port);
+ thread_data->client_id, thread_data->server_addr, thread_data->server_port);
}
CORE_MODE(MCP_MODE_SERVER | MCP_MODE_PROXY) {
log_print(NULL, "(%04d) Client connected from %s on port %d",
- thread_data->client_id, client->addr, client->port);
+ thread_data->client_id, client->addr, client->port);
}
thread_data->flags |= THREAD_FLAG_RUNNING;
@@ -210,9 +210,8 @@ static void* core_thread(void* data)
ev = &thread_data->events[EVENT_DISCONNECTED];
if(ev->callback) {
if(ev->callback(thread_data->client_id, EVENT_DISCONNECTED, client, server,
- ev->callback_extra) != PROXY_OK)
- log_print(NULL, "(%04d) DISCONNECTED event callback returned error status",
- thread_data->client_id);
+ ev->callback_extra) != PROXY_OK)
+ log_print(NULL, "(%04d) DISCONNECTED event callback returned error status", thread_data->client_id);
}
if(net_error == CORE_EOK || net_error == CORE_EDONE) {
@@ -267,8 +266,8 @@ int core_main(sys_config_t* system_config, handler_api_t* handler_api)
uname(&platform_info);
log_print(NULL, "Minecraft Proxy, version %s starting ...", MCPROXY_VERSION_STR);
log_print(NULL, "%s %s at %s (%s)",
- platform_info.sysname, platform_info.release,
- platform_info.nodename, platform_info.machine);
+ platform_info.sysname, platform_info.release,
+ platform_info.nodename, platform_info.machine);
thread_barrier_init(&sync_barrier, 2);
pthread_attr_init(&thread_attr);
@@ -306,7 +305,7 @@ int core_main(sys_config_t* system_config, handler_api_t* handler_api)
return EXIT_FAILURE;
}
log_print(NULL, "Handler library loaded: %s, version: %d",
- handler_info->name, handler_info->version);
+ handler_info->name, handler_info->version);
log_print(NULL, "Startup completed, entering main loop");
while(sys_status() == SYSTEM_OK) {
@@ -315,8 +314,8 @@ int core_main(sys_config_t* system_config, handler_api_t* handler_api)
CORE_MODE(MCP_MODE_SERVER | MCP_MODE_PROXY) {
if(!(net_select_rd(1, listen_sockfd) & 0x01))
- continue;
- }
+ continue;
+ }
if(core_throttle(&last_connection, system_config->connect_delay) != SYSTEM_OK)
break;
View
2 src/log.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
*
* Licensed under MIT open-source license.
* See COPYING file for details.
View
14 src/main.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
*
* Licensed under MIT open-source license.
* See COPYING file for details.
@@ -74,21 +74,21 @@ void mcp_parse_arguments(int argc, char **argv, sys_config_t* config)
break;
case 'l':
if(optarg[0] == '/')
- strcpy(config->logfile, optarg);
+ strcpy(config->logfile, optarg);
else
- sprintf(config->logfile, "%s/%s", workdir, optarg);
+ sprintf(config->logfile, "%s/%s", workdir, optarg);
break;
case 'r':
if(optarg[0] == '/')
- strcpy(config->pidfile, optarg);
+ strcpy(config->pidfile, optarg);
else
- sprintf(config->pidfile, "%s/%s", workdir, optarg);
+ sprintf(config->pidfile, "%s/%s", workdir, optarg);
break;
case 'L':
if(optarg[0] == '/')
- strcpy(config->libfile, optarg);
+ strcpy(config->libfile, optarg);
else
- sprintf(config->libfile, "%s/%s", workdir, optarg);
+ sprintf(config->libfile, "%s/%s", workdir, optarg);
break;
default:
mcp_usage(argv[0]);
View
2 src/mm.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
*
* Licensed under MIT open-source license.
* See COPYING file for details.
View
2 src/msgtable.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
*
* Licensed under MIT open-source license.
* See COPYING file for details.
View
2 src/network.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
*
* Licensed under MIT open-source license.
* See COPYING file for details.
View
2 src/proto.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
*
* Licensed under MIT open-source license.
* See COPYING file for details.
View
2 src/proxy.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
*
* Licensed under MIT open-source license.
* See COPYING file for details.
View
2 src/system.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
*
* Licensed under MIT open-source license.
* See COPYING file for details.
View
2 src/thread.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
*
* Licensed under MIT open-source license.
* See COPYING file for details.
View
2 src/util.c
@@ -1,5 +1,5 @@
/* Minecraft Protocol Proxy (mcproxy)
- * Copyright (c) 2011 Michał Siejak
+ * Copyright (c) 2011 Michał Siejak, Dylan Lukes
*
* Licensed under MIT open-source license.
* See COPYING file for details.

0 comments on commit 689e3bb

Please sign in to comment.
Something went wrong with that request. Please try again.