celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpe...@apache.org
Subject svn commit: r1628253 - in /celix/trunk/remote_services/discovery_etcd/private/src: etcd.c etcd_watcher.c
Date Mon, 29 Sep 2014 18:45:49 GMT
Author: bpetri
Date: Mon Sep 29 18:45:49 2014
New Revision: 1628253

URL: http://svn.apache.org/r1628253
Log:
CELIX-152: ttl bugfix, change of default etcd server ip

Modified:
    celix/trunk/remote_services/discovery_etcd/private/src/etcd.c
    celix/trunk/remote_services/discovery_etcd/private/src/etcd_watcher.c

Modified: celix/trunk/remote_services/discovery_etcd/private/src/etcd.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery_etcd/private/src/etcd.c?rev=1628253&r1=1628252&r2=1628253&view=diff
==============================================================================
--- celix/trunk/remote_services/discovery_etcd/private/src/etcd.c (original)
+++ celix/trunk/remote_services/discovery_etcd/private/src/etcd.c Mon Sep 29 18:45:49 2014
@@ -192,7 +192,7 @@ bool etcd_set(char* key, char* value, in
 
 	snprintf(url, MAX_URL_LENGTH, "http://%s:%d/v2/keys/%s", etcd_server, etcd_port, key);
 
-	if (ttl > 0)
+	if (ttl <= 0)
 	    snprintf(request, MAX_CONTENT_LENGTH, "value=%s", value);
 	else
 	    snprintf(request, MAX_CONTENT_LENGTH, "value=%s;ttl=%d", value, ttl);

Modified: celix/trunk/remote_services/discovery_etcd/private/src/etcd_watcher.c
URL: http://svn.apache.org/viewvc/celix/trunk/remote_services/discovery_etcd/private/src/etcd_watcher.c?rev=1628253&r1=1628252&r2=1628253&view=diff
==============================================================================
--- celix/trunk/remote_services/discovery_etcd/private/src/etcd_watcher.c (original)
+++ celix/trunk/remote_services/discovery_etcd/private/src/etcd_watcher.c Mon Sep 29 18:45:49
2014
@@ -48,7 +48,7 @@ struct etcd_watcher {
 };
 
 #define CFG_ETCD_SERVER_IP		"DISCOVERY_ETCD_SERVER_IP"
-#define DEFAULT_ETCD_SERVER_IP	"172.17.8.201"
+#define DEFAULT_ETCD_SERVER_IP	"127.0.0.1"
 
 #define CFG_ETCD_SERVER_PORT	"DISCOVERY_ETCD_SERVER_PORT"
 #define DEFAULT_ETCD_SERVER_PORT 4001



Mime
View raw message