+ gras_cb_register("plain ping", &server_cb_ping);
+ gras_cb_register("raise exception", &server_cb_raise_ex);
+ gras_cb_register("kill", &server_cb_kill);
+
+ XBT_INFO("Listening on port %d", xbt_socket_my_port(mysock));
+
+ /* 5. Wait for the ping incoming messages */
+
+ /** \bug if the server is gone before the forwarder tries to connect,
+ it dies awfully with the following message. The problem stands somewhere
+ at the interface between the xbt_socket_t and the msg mess. There is thus
+ no way for me to dive into this before this interface is rewritten
+==15875== Invalid read of size 4
+==15875== at 0x408B805: find_port (transport_plugin_sg.c:68)
+==15875== by 0x408BD64: gras_trp_sg_socket_client (transport_plugin_sg.c:115)
+==15875== by 0x404A38B: gras_socket_client_ext (transport.c:255)
+==15875== by 0x404A605: gras_socket_client (transport.c:288)
+==15875== by 0x804B49D: forwarder (rpc.c:245)
+==15875== by 0x80491FB: launch_forwarder (_rpc_simulator.c:52)
+==15875== by 0x406780B: __context_wrapper (context.c:164)
+==15875== by 0x41A6CB3: pthread_start_thread (manager.c:310)
+==15875== by 0x42AA549: clone (clone.S:119)
+==15875== Address 0x433B49C is 44 bytes inside a block of size 48 free'd
+==15875== at 0x401CF46: free (vg_replace_malloc.c:235)
+==15875== by 0x408F1FA: gras_process_exit (sg_process.c:117)
+==15875== by 0x4049386: gras_exit (gras.c:64)
+==15875== by 0x804B936: server (rpc.c:345)
+==15875== by 0x80492B1: launch_server (_rpc_simulator.c:69)
+==15875== by 0x406780B: __context_wrapper (context.c:164)
+==15875== by 0x41A6CB3: pthread_start_thread (manager.c:310)
+==15875== by 0x42AA549: clone (clone.S:119)
+ */
+ while (!sdata->done) {
+ gras_msg_handle(600.0);
+ exception_catching();
+ }