Changeset 374 for asp3_tinet_ecnl_rx/trunk/ntshell/src/ntp_cli.c
- Timestamp:
- Apr 5, 2019, 9:26:53 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
asp3_tinet_ecnl_rx/trunk/ntshell/src/ntp_cli.c
r364 r374 50 50 #include <t_syslog.h> 51 51 #include "kernel_cfg.h" 52 #include "util/ntstdio.h" 53 54 extern ntstdio_t ntstdio; 52 #include <stdio.h> 55 53 56 54 #endif /* of #if defined(TARGET_KERNEL_ASP) */ … … 279 277 } 280 278 281 ntstdio_printf(&ntstdio,"[NTP CLI,%d] recv time: %s .%09u\n",279 printf("[NTP CLI,%d] recv time: %s .%09u\n", 282 280 nc->cepid, nc->buf, tp.tv_nsec); 283 281 } … … 311 309 line = lookup_ipaddr(&nc->ipaddr6, NTP_SRV_URL, API_PROTO_IPV4); 312 310 if (line == NULL || !in6_is_addr_ipv4mapped(&nc->ipaddr6)) { 313 ntstdio_printf(&ntstdio,"[NTP CLI,%d] sleep %d.%03u[s], unknown host.",311 printf("[NTP CLI,%d] sleep %d.%03u[s], unknown host.", 314 312 nc->cepid, SLP_ITV / SYSTIM_HZ, SLP_ITV % SYSTIM_HZ); 315 313 nc->timer = SLP_ITV; … … 319 317 #else /* of #if defined(SUPPORT_INET6) && defined(SUPPORT_INET4) */ 320 318 if ((line = lookup_ipaddr(&nc->snd_rmt.ipaddr, NTP_SRV_URL, DEFAULT_API_PROTO)) == NULL) { 321 ntstdio_printf(&ntstdio,"[NTP CLI,%d] sleep %d.%03u[s], unknown host.",319 printf("[NTP CLI,%d] sleep %d.%03u[s], unknown host.", 322 320 nc->cepid, SLP_ITV / SYSTIM_HZ, SLP_ITV % SYSTIM_HZ); 323 321 nc->timer = SLP_ITV; … … 423 421 424 422 if ((error = udp_snd_dat(nc->cepid, &nc->snd_rmt, ntp, len, TMO_NBLK)) != E_WBLK) { 425 ntstdio_printf(&ntstdio,"[NTP CLI,%d] udp_snd_dat error: %s",423 printf("[NTP CLI,%d] udp_snd_dat error: %s", 426 424 nc->cepid, itron_strerror(error)); 427 425 return error; … … 441 439 ret = get_tim(&time); 442 440 if (ret != E_OK) { 443 ntstdio_printf(&ntstdio,"[NTP CLI,%d] get_tim error: %s",441 printf("[NTP CLI,%d] get_tim error: %s", 444 442 nc->cepid, itron_strerror(ret)); 445 443 tp->tv_sec = 0; … … 461 459 ret = set_tim(time); 462 460 if (ret != E_OK) { 463 ntstdio_printf(&ntstdio,"[NTP CLI,%d] set_tim error: %s",461 printf("[NTP CLI,%d] set_tim error: %s", 464 462 nc->cepid, itron_strerror(ret)); 465 463 } … … 479 477 if (len < 0 && len != E_RLWAI) { 480 478 /* E_RLWAI 以外で、0 以下の場合は、エラーを意味している。*/ 481 ntstdio_printf(&ntstdio,"[NTP CLI,%d] callback error: %s, fncd: %s", nc->cepid,479 printf("[NTP CLI,%d] callback error: %s, fncd: %s", nc->cepid, 482 480 itron_strerror(len), in_strtfn(fncd)); 483 481 } … … 486 484 if ((len = udp_rcv_dat(nc->cepid, &nc->rcv_rmt, &nc->ntp_msg, len, TMO_POL)) < 0) 487 485 { 488 ntstdio_printf(&ntstdio,"[NTP CLI,%d] udp_rcv_dat error: %s", nc->cepid,486 printf("[NTP CLI,%d] udp_rcv_dat error: %s", nc->cepid, 489 487 itron_strerror(len)); 490 488 } … … 518 516 519 517 get_tid(&nc->tskid); 520 ntstdio_printf(&ntstdio,"[NTP CLI:%d,%d] started.", nc->tskid, (ID)exinf);518 printf("[NTP CLI:%d,%d] started.", nc->tskid, (ID)exinf); 521 519 522 520 /* 初期化 */ … … 525 523 ret = get_tim(&time); 526 524 if (ret != E_OK) { 527 ntstdio_printf(&ntstdio,"[NTP CLI,%d] get_tim error: %7lu,%s",525 printf("[NTP CLI,%d] get_tim error: %7lu,%s", 528 526 nc->cepid, time / SYSTIM_HZ, itron_strerror(ret)); 529 527 return; … … 539 537 error = tslp_tsk(timer); 540 538 if ((error != E_OK) && (error != E_TMOUT)) { 541 ntstdio_printf(&ntstdio,"[NTP CLI,%d] tslp_tsk error: %s %d",539 printf("[NTP CLI,%d] tslp_tsk error: %s %d", 542 540 nc->cepid, itron_strerror(error), timer); 543 541 break; … … 546 544 ret = get_tim(&time); 547 545 if (ret != E_OK) { 548 ntstdio_printf(&ntstdio,"[NTP CLI,%d] get_tim error: %s",546 printf("[NTP CLI,%d] get_tim error: %s", 549 547 nc->cepid, itron_strerror(ret)); 550 548 break;
Note:
See TracChangeset
for help on using the changeset viewer.