Commit a7e426fb authored by Tommy Olofsson's avatar Tommy Olofsson
Browse files

More debugging. ACKs seem to be ignored. Also some intermittent memory allocation problem.

parent de944133
......@@ -6,7 +6,7 @@ set(VXWORKS_COMPILING TRUE)
# Specify the cross compiler:
set(CMAKE_C_COMPILER i586-wrs-vxworks-gcc)
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DLABCOMM_COMPAT=\\\"labcomm_compat_vxworks.h\\\"")
#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DLABCOMM_COMPAT=\\\"labcomm_compat_vxworks.h\\\" -DLABCOMM_NO_STDIO")
# Add additional includes
include_directories(
......
......@@ -302,6 +302,7 @@ void handle_channel_response(firefly_protocol_channel_response *chan_res,
conn = context;
printf("%s", __func__);
fecrr = FIREFLY_MALLOC(sizeof(*fecrr));
if (fecrr == NULL) {
firefly_error(FIREFLY_ERROR_ALLOC, 1,
......@@ -327,6 +328,8 @@ static void firefly_channel_send_channel_ack(
int dest_chan_id)
{
firefly_protocol_channel_ack ack;
printf("%s", __func__);
if (chan != NULL) {
ack.ack = true;
ack.source_chan_id = chan->local_id;
......
......@@ -135,7 +135,9 @@ void *firefly_event_vx_thread_main(void *args)
/* TODO: Retval can indicate badly contructed event, or
* failed execution. Should this be handled?
*/
printf("exec ev: %p\n", ev->execute);
firefly_event_execute(ev);
printf("done exec ev\n");
semTake(ctx->lock, WAIT_FOREVER);
firefly_event_return(eq, &ev);
semGive(ctx->lock);
......
......@@ -236,6 +236,8 @@ int firefly_resend_wait(struct resend_queue *rq,
result = -1;
} else {
*data = malloc(res->size);
if (!*data)
printf("malloc failed %s:%s\n", __FILE__, __LINE__);
memcpy(*data, res->data, res->size);
*size = res->size;
*id = res->id;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment