Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

removes ccnl_addr2ascii calls in DEBUGMSG macros containing NULL #233

Merged
merged 2 commits into from
May 8, 2018

Conversation

mfrey
Copy link
Collaborator

@mfrey mfrey commented May 8, 2018

This PR addresses (partially) #232 and removes ccnl_addr2ascii calls in ccnl-fwd.c which might have NULL as a parameter as a result of the evaluation of an ternary operator, i.e.

ccnl_addr2ascii(from ? &from->peer : NULL)

In order to test this PR, the USE_LOGGING flag needs to be set. In addition, logging needs to be enabled in the ccn-lite-relay example by setting debug_level = VERBOSE;.

@mfrey
Copy link
Collaborator Author

mfrey commented May 8, 2018

Had to remove #ifdef/#endif guards (which were rather pointless).

This commit remove calls to ccnl_addr2ascii which are passed to the
DEBUGMSG macro and could have "NULL" as a parameter, e.g.

     DEBUGMSG_CFWD(INFO, "  incoming interest=<%s>%s nonce=%"PRIi32" from=%s\n",
                   ccnl_prefix_to_str((*pkt)->pfx,s,CCNL_MAX_PREFIX_SIZE),
                   ccnl_suite2str((*pkt)->suite), nonce,
                   ccnl_addr2ascii(from ? &from->peer : NULL));
@blacksheeep blacksheeep merged commit d2fd2fb into cn-uofbasel:master May 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants