.gitignore tags file,
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
build/
|
build/
|
||||||
.sconsign.dblite
|
.sconsign.dblite
|
||||||
*.swp
|
*.swp
|
||||||
/tags
|
tags
|
||||||
doc/
|
doc/
|
||||||
log_subdir/
|
log_subdir/
|
||||||
|
|||||||
@@ -256,18 +256,20 @@ int main(int argc, char *argv[])
|
|||||||
uint16_t local_port = 23456;
|
uint16_t local_port = 23456;
|
||||||
uint16_t remote_port = 23456;
|
uint16_t remote_port = 23456;
|
||||||
int c;
|
int c;
|
||||||
|
struct uc_log_destination *dest;
|
||||||
|
|
||||||
srand(getpid());
|
srand(getpid());
|
||||||
|
|
||||||
uc_log_init(&log_modules);
|
uc_log_init(&log_modules);
|
||||||
uc_log_add_destination(uc_log_new_stderr(UC_LL_DEBUG, 1));
|
dest = uc_log_new_stderr(UC_LL_DEBUG, 1);
|
||||||
|
uc_log_add_destination(dest);
|
||||||
|
|
||||||
mux = iomux_create(IOMUX_TYPE_DEFAULT);
|
mux = iomux_create(IOMUX_TYPE_DEFAULT);
|
||||||
ctx.mux = mux;
|
ctx.mux = mux;
|
||||||
|
|
||||||
init_hb_context(&ctx, local_port);
|
init_hb_context(&ctx, local_port);
|
||||||
|
|
||||||
while ((c = getopt(argc, argv, "p:P:a:")) != -1) {
|
while ((c = getopt(argc, argv, "m:p:P:a:")) != -1) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
case 'p':
|
case 'p':
|
||||||
local_port = atoi(optarg);
|
local_port = atoi(optarg);
|
||||||
@@ -278,6 +280,9 @@ int main(int argc, char *argv[])
|
|||||||
case 'a':
|
case 'a':
|
||||||
peer_add(&ctx, optarg, remote_port);
|
peer_add(&ctx, optarg, remote_port);
|
||||||
break;
|
break;
|
||||||
|
case 'm':
|
||||||
|
uc_log_destination_set_mask(dest, optarg);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
printf("Unknown option -%c\n", c);
|
printf("Unknown option -%c\n", c);
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user