shell ccnl: break & print after receiving content

This commit is contained in:
Oleg Hahm 2015-12-09 00:11:23 +01:00
parent a3bd67da2b
commit 395141fd22

View File

@ -169,8 +169,12 @@ int _ccnl_interest(int argc, char **argv)
for (int cnt = 0; cnt < CCNL_INTEREST_RETRIES; cnt++) { 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_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; return 0;
}
}
printf("Timeout! No content received in response to the Interest for %s.\n", argv[1]);
return -1;
} }