Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Burton2013-04-04 22:47:08 -0400
committerFelix Burton2013-04-04 22:47:08 -0400
commitea0577e88a4dd1c77e9761a9c0574fe7dfa6aab6 (patch)
tree81ce0718d88a0e45b536471bfc936648df8de2c7
parente1036e188538d540f9240ed712c421b0a52ecfb7 (diff)
downloadorg.eclipse.tcf.agent-ea0577e88a4dd1c77e9761a9c0574fe7dfa6aab6.tar.gz
org.eclipse.tcf.agent-ea0577e88a4dd1c77e9761a9c0574fe7dfa6aab6.tar.xz
org.eclipse.tcf.agent-ea0577e88a4dd1c77e9761a9c0574fe7dfa6aab6.zip
TCF Agent: Allow default server name to be set at compile time
-rw-r--r--agent/tcf/framework/channel.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/agent/tcf/framework/channel.c b/agent/tcf/framework/channel.c
index f7b5f9e3..16ee177c 100644
--- a/agent/tcf/framework/channel.c
+++ b/agent/tcf/framework/channel.c
@@ -43,6 +43,10 @@
#include <tcf/framework/link.h>
#include <tcf/framework/json.h>
+#ifndef DEFAULT_SERVER_NAME
+# define DEFAULT_SERVER_NAME "TCF Agent"
+#endif
+
static void trigger_channel_shutdown(ShutdownInfo * obj);
ShutdownInfo channel_shutdown = { trigger_channel_shutdown };
@@ -224,7 +228,7 @@ PeerServer * channel_peer_from_url(const char * url) {
char transport[16];
PeerServer * ps = peer_server_alloc();
- peer_server_addprop(ps, loc_strdup("Name"), loc_strdup("TCF Agent"));
+ peer_server_addprop(ps, loc_strdup("Name"), loc_strdup(DEFAULT_SERVER_NAME));
peer_server_addprop(ps, loc_strdup("OSName"), loc_strdup(get_os_name()));
if (user != NULL) peer_server_addprop(ps, loc_strdup("UserName"), loc_strdup(user));
peer_server_addprop(ps, loc_strdup("AgentID"), loc_strdup(get_agent_id()));

Back to the top