Mercurial > hg > Members > kono > Cerium
changeset 555:efbb6b527fa1
changed wait rd to in api
author | kazz@kazz187.st.ie.u-ryukyu.ac.jp |
---|---|
date | Fri, 23 Oct 2009 00:20:34 +0900 |
parents | 356bebf02461 |
children | 7f595548daf9 6289230fe821 |
files | TaskManager/Test/test_render/Application/dynamic_create.cc |
diffstat | 1 files changed, 16 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Test/test_render/Application/dynamic_create.cc Thu Oct 22 23:11:31 2009 +0900 +++ b/TaskManager/Test/test_render/Application/dynamic_create.cc Fri Oct 23 00:20:34 2009 +0900 @@ -159,17 +159,17 @@ return object; } -void -del_callback(unsigned char *data, void *arg) -{ - free(data); -} +// void +// del_callback(unsigned char *data, void *arg) +// { +// free(data); +// } -void -psx_del(int t, int id) -{ - psx_callback_in(t, id, del_callback, NULL); -} +// void +// psx_del(int t, int id) +// { +// psx_callback_in(t, id, del_callback, NULL); +// } static void callback_get_xml(unsigned char *xml_tuple, void *arg) { @@ -178,6 +178,7 @@ unsigned char *xml_data = xml_tuple+LINDA_HEADER_SIZE; SceneGraphPtr sgp; // ここで create + fwrite(xml_data, 1, 10, stdout); sgp = create_sg(carg->manager, carg->node, xml_data, xml_len, carg->sid); client_list_update(carg->manager, carg->clist, carg->sid, sgp); free(arg); @@ -195,9 +196,10 @@ data = tuple+LINDA_HEADER_SIZE; // clientのSerialIDを取得 serial_id = ntohl(*(int *)data); - + + printf("serial id = %d\n", serial_id); // タプルを解放 - psx_del(carg->tid, SERIAL_REGIST_TUPLE_NO); + //psx_del(carg->tid, SERIAL_REGIST_TUPLE_NO); // xml fileを取得する もうすでにxml fileが送信済みである事を期待 // つまり、送信者がserial_idを送る前にxml fileを送信していなくてはならない @@ -211,7 +213,7 @@ //printf("get data[%d]: `%s'\n", len, data); free(tuple); - psx_callback_wait_rd(carg->tid, carg->read_id, callbacker, arg); + psx_callback_in(carg->tid, carg->read_id, callbacker, arg); } void @@ -225,7 +227,7 @@ carg->node = node; carg->manager = manager; carg->clist = clist; - psx_callback_wait_rd(carg->tid, carg->read_id, callbacker, carg); + psx_callback_in(carg->tid, carg->read_id, callbacker, carg); } void