diff --git a/go/pserver/cclient/cclient.go b/go/pserver/cclient/cclient.go index ac84b993d1acebad3b249eda398c99828fc7bc2b..0b4aa79806b72f4608230d2216d1741389913d95 100644 --- a/go/pserver/cclient/cclient.go +++ b/go/pserver/cclient/cclient.go @@ -100,7 +100,7 @@ func (l lister) List() []pserver.Server { } //export paddle_new_pserver_client -func paddle_new_pserver_client(addrs *C.char, selected bool) C.client { +func paddle_new_pserver_client(addrs *C.char, selected int) C.client { a := C.GoString(addrs) as := strings.Split(a, ",") servers := make([]pserver.Server, len(as)) @@ -108,7 +108,7 @@ func paddle_new_pserver_client(addrs *C.char, selected bool) C.client { servers[i].Index = i servers[i].Addr = as[i] } - c := pserver.NewClient(lister(servers), len(as), selector(selected)) + c := pserver.NewClient(lister(servers), len(as), selector(selected != 0)) return add(c) } diff --git a/go/pserver/cclient/test/main.c b/go/pserver/cclient/test/main.c index abfb32e5603f5b51036f1f8475c8e3aca2f05ccb..c14037235c144e1193e0ed2a4c1b01787b92b202 100644 --- a/go/pserver/cclient/test/main.c +++ b/go/pserver/cclient/test/main.c @@ -11,9 +11,9 @@ void fail() { int main() { char addr[] = "localhost:3000"; - client c = paddle_new_pserver_client(addr); + client c = paddle_new_pserver_client(addr, 1); retry: - if (paddle_begin_init_params(c, NULL, 0)) { + if (paddle_begin_init_params(c)) { paddle_parameter param; char name_a[] = "param_a"; char name_b[] = "param_b";