shell ccnl: break & print after receiving content
This commit is contained in:
parent
a3bd67da2b
commit
395141fd22
@ -169,8 +169,12 @@ int _ccnl_interest(int argc, char **argv)
|
||||
|
||||
for (int cnt = 0; cnt < CCNL_INTEREST_RETRIES; cnt++) {
|
||||
ccnl_send_interest(CCNL_SUITE_NDNTLV, argv[1], relay_addr, addr_len, NULL, _int_buf, BUF_SIZE);
|
||||
ccnl_wait_for_chunk(_cont_buf, BUF_SIZE);
|
||||
if (ccnl_wait_for_chunk(_cont_buf, BUF_SIZE) > 0) {
|
||||
printf("Content received: %s\n", _cont_buf);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
printf("Timeout! No content received in response to the Interest for %s.\n", argv[1]);
|
||||
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user