--- libaitrpc/example/tcli.c 2011/09/01 15:29:39 1.3.2.6 +++ libaitrpc/example/tcli.c 2011/09/03 12:39:27 1.3.2.7 @@ -29,18 +29,18 @@ int main() memset(blob43, 0, 512); strlcpy(blob43, "aaaaaaaaaaaaaaa cddddddddddddddd zzzzzzzzzzzzzzzzzzzzz !!!!\n\n\n675675676...\n", 512); - valz = rpc_cli_allocVals(3); + valz = rpc_cli_allocVals(2); v = io_array(valz, 0, ait_val_t*); AIT_SET_I32(v, 12345678); v = io_array(valz, 1, ait_val_t*); AIT_SET_STR(v, "gniah_blah SHMINK!"); - v = io_array(valz, 2, ait_val_t*); - AIT_NEW_BLOB(v, 512); - if (rpc_cli_sendBLOB(cli2, v, blob43) == -1) { - printf("!!!!! blob error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); - return 2; - } else - printf("Get BLOB = %x\n", AIT_GET_BLOB(v)); +// v = io_array(valz, 2, ait_val_t*); +// AIT_NEW_BLOB(v, 512); +// if (rpc_cli_sendBLOB(cli2, v, blob43) == -1) { +// printf("!!!!! blob error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); +// return 2; +// } else +// printf("Get BLOB = %x\n", AIT_GET_BLOB(v)); /* test case for unknown blob ... AIT_SET_BLOB(&tval, 0x554C1BC7, BUFSIZ); @@ -65,14 +65,14 @@ int main() v = io_array(arr, 2, ait_val_t*); printf("ret_val2:: is_empty? %d %s len=%d type=%d\n", AIT_ISEMPTY(v), AIT_GET_STR(v), AIT_LEN(v), AIT_TYPE(v)); - v = io_array(arr, 3, ait_val_t*); - printf("ret_val3:: %X %d\n", AIT_GET_BLOB(v), AIT_LEN(v)); - printf("test found blob=%d\n", rpc_cli_getBLOB(cli2, v, (void**) &mem)); -// printf("+++++++++ test found blob=%d\n", rpc_cli_recvBLOB(cli2, v, (void**) &mem)); - if (mem) { - printf("+++++++ BLOB=%s", mem); - free(mem); - } +// v = io_array(arr, 3, ait_val_t*); +// printf("ret_val3:: %X %d\n", AIT_GET_BLOB(v), AIT_LEN(v)); +// printf("test found blob=%d\n", rpc_cli_getBLOB(cli2, v, (void**) &mem)); +//// printf("+++++++++ test found blob=%d\n", rpc_cli_recvBLOB(cli2, v, (void**) &mem)); +// if (mem) { +// printf("+++++++ BLOB=%s", mem); +// free(mem); +// } rpc_cli_freeVals(&arr); } } @@ -93,6 +93,7 @@ int main() for (i = 0; i < (arr ? io_arraySize(arr) : 0); i++) printf("registeredClient(%d)=%s\n", i, AIT_GET_STR(io_array(arr, i, ait_val_t*))); rpc_cli_freeVals(&arr); + /* if (rpc_cli_execCall(cli, NULL, CALL_BLOBCLIENTS, NULL, &arr) < 0) { printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); return 4; @@ -109,6 +110,7 @@ int main() for (i = 0; i < (arr ? io_arraySize(arr) : 0); i++) printf("registeredBLOBVars(%d)=%s\n", i, AIT_GET_STR(io_array(arr, i, ait_val_t*))); rpc_cli_freeVals(&arr); + */ if (rpc_cli_execCall(cli, NULL, CALL_SRVCALLS, NULL, &arr) < 0) { printf("error:: errno=%d %s\n", rpc_GetErrno(), rpc_GetError()); return 5;