Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2010-02-23 19:19:22 +0000
committereutarass2010-02-23 19:19:22 +0000
commit6cb7f13e524ff0d0045a504a8a1fc70a6610484c (patch)
tree84ce6e3c864ad3cf08311a7baab80b3d4e2abcf2 /main/main.c
parenta8d18bdce5c8aa30da17b052238e3f40d06181b9 (diff)
downloadorg.eclipse.tcf.agent-6cb7f13e524ff0d0045a504a8a1fc70a6610484c.tar.gz
org.eclipse.tcf.agent-6cb7f13e524ff0d0045a504a8a1fc70a6610484c.tar.xz
org.eclipse.tcf.agent-6cb7f13e524ff0d0045a504a8a1fc70a6610484c.zip
TCF Agent:
1. TCFSuspendGroup definition and related code is deleted. It was conflicting with value-add functionality. 2. "char *" changed to "const char *" where necessary to get rid of g++ warnings "deprecated conversion from string constant to 'char'" 3. fixed g++ warnings "'...' might be used uninitialized in this function"
Diffstat (limited to 'main/main.c')
-rw-r--r--main/main.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/main/main.c b/main/main.c
index c6ffc5b7..d22cc6c6 100644
--- a/main/main.c
+++ b/main/main.c
@@ -31,16 +31,14 @@
#include "cmdline.h"
#include "channel_tcp.h"
-static char * progname;
+static const char * progname;
static Protocol * proto;
static ChannelServer * serv;
static TCFBroadcastGroup * bcg;
-static TCFSuspendGroup * spg;
static void channel_new_connection(ChannelServer * serv, Channel * c) {
protocol_reference(proto);
c->protocol = proto;
- channel_set_suspend_group(c, spg);
channel_set_broadcast_group(c, bcg);
channel_start(c);
}
@@ -54,9 +52,8 @@ int main(int argc, char ** argv) {
int ind;
int daemon = 0;
int interactive = 0;
- char * s;
- char * log_name = 0;
- char * url = "TCP:";
+ const char * log_name = NULL;
+ const char * url = "TCP:";
PeerServer * ps = NULL;
ini_mdep();
@@ -75,7 +72,7 @@ int main(int argc, char ** argv) {
/* Parse arguments */
for (ind = 1; ind < argc; ind++) {
- s = argv[ind];
+ const char * s = argv[ind];
if (*s != '-') {
break;
}
@@ -147,7 +144,6 @@ int main(int argc, char ** argv) {
ini_events_queue();
bcg = broadcast_group_alloc();
- spg = suspend_group_alloc();
proto = protocol_alloc();
/* The static services must be initialised before the plugins */
@@ -157,7 +153,7 @@ int main(int argc, char ** argv) {
if (interactive) fprintf(stderr, "Warning: This version does not support interactive mode.\n");
#endif
- ini_services(proto, bcg, spg);
+ ini_services(proto, bcg);
ps = channel_peer_from_url(url);
if (ps == NULL) {

Back to the top