I am writing an example for CT Library. I am getting 2 error messages
1. Bus Error when I install a servermsg_callback
with the following prototype
CS_RETCODE servermsg_callback(CS_CONTEXT *cp, CS_CONNECTION *chp, CS_SERVERMSG *msgp)
and install it with the following call
ret = ct_callback(context, NULL, CS_SET, CS_SERVERMSG_CB,
(CS_VOID *) servermsg_callback);
EXIT_ON_FAIL(context, ret, "ct_callback for server messages failed");
On running the binary I get an error "Bus Error"
2. On commenting the above lines and checking the results with the line "while( (results_ret = ct_results(cmd, &result_type)) == CS_SUCCEED)" the result_ytpe gives me a value 0 which is an error.

Please help me in finding a solution to these problems