Skip to content
Permalink
Browse files
make the rsa listening ip configurable
  • Loading branch information
xuzhenbao committed Mar 26, 2022
1 parent 6f1817d commit 0f5581a02ba1cd52f11e63b0e9b910e863695e4b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
@@ -163,11 +163,13 @@ celix_status_t endpointDiscoveryServer_create(discovery_t *discovery,
char newPort[10];

do {
char listeningPorts[50]={0};
const char *options[] = {
"listening_ports", port,
"listening_ports", listeningPorts,
"num_threads", DEFAULT_SERVER_THREADS,
NULL
};
snprintf(listeningPorts,sizeof(listeningPorts),"%s:%s",(*server)->ip, port);

(*server)->ctx = mg_start(&callbacks, (*server), options);

@@ -134,7 +134,7 @@ static celix_status_t etcdWatcher_addAlreadyExistingWatchpoints(etcd_watcher_t *
static celix_status_t etcdWatcher_addOwnFramework(etcd_watcher_t *watcher)
{
char localNodePath[MAX_LOCALNODE_LENGTH];
char *value;
char *value=NULL;
char url[MAX_VALUE_LENGTH];
int modIndex;
char* endpoints = NULL;
@@ -257,8 +257,9 @@ celix_status_t remoteServiceAdmin_create(celix_bundle_context_t *context, remote

unsigned int port_counter = 0;
do {

const char *options[] = { "listening_ports", newPort, "num_threads", "5", NULL};
char listeningPorts[50]={0};
const char *options[] = { "listening_ports", listeningPorts, "num_threads", "5", NULL};
snprintf(listeningPorts,sizeof(listeningPorts),"%s:%s",(*admin)->ip, newPort);

(*admin)->ctx = mg_start(&callbacks, (*admin), options);

0 comments on commit 0f5581a

Please sign in to comment.