--- libaitrpc/example/tsrv.c 2011/09/01 14:33:00 1.3.2.5 +++ libaitrpc/example/tsrv.c 2011/09/03 12:39:27 1.3.2.8 @@ -66,8 +66,10 @@ int BBB(rpc_func_t *f, int in, array_t *iv) // b = rpc_srv_registerBLOB(f->func_parent, 128); // if (!b) // return -1; -// else -// AIT_SET_BLOB2(io_array(arr, 3, ait_val_t*), b); +// else { +// v = io_array(arr, 3, ait_val_t*); +// AIT_SET_BLOB2(v, b); +// } // if (rpc_srv_blobMap(f->func_parent, b) == -1) { // rpc_srv_blobFree(f->func_parent, b); @@ -96,18 +98,16 @@ int main() return 1; } - /* if (rpc_srv_initBLOBServer(srv, 0, "/tmp")) { printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); return 1; } - */ if (!fork()) { setsid(); rpc_srv_registerCall(srv, NULL, "aaa", 0); - rpc_srv_registerCall(srv, NULL, "BBB", /*4*/ 3); + rpc_srv_registerCall(srv, NULL, "BBB", 3); rpc_srv_registerCall(srv, NULL, "dummy", 1); rpc_srv_registerCall(srv, NULL, "xYz", 2); @@ -121,12 +121,11 @@ int main() for (f = srv->srv_funcs; f; f = f->func_next) printf("1.func::name=%s args=%d\n", f->func_name, io_arraySize(f->func_vars)); -// pthread_create(&tid[1], NULL, (void*(*)(void*)) rpc_srv_execBLOBServer, srv); -// pthread_detach(tid[1]); - rpc_srv_execServer(srv); +// rpc_srv_loopServer(srv); + rpc_srv_execServer(srv, &ret); } -// rpc_srv_endBLOBServer(srv); + rpc_srv_endBLOBServer(srv); rpc_srv_endServer(srv); return 0; }