comparison dbutil.c @ 352:2481bc4370b8 debug-unrandom

add yet more
author Matt Johnston <matt@ucc.asn.au>
date Wed, 09 Aug 2006 16:22:20 +0000
parents cd14c94fe89c
children
comparison
equal deleted inserted replaced
351:e66eec4dcba7 352:2481bc4370b8
574 #if defined(DROPBEAR_CLIENT) || defined(ENABLE_SVR_PUBKEY_AUTH) 574 #if defined(DROPBEAR_CLIENT) || defined(ENABLE_SVR_PUBKEY_AUTH)
575 int buf_getline(buffer * line, FILE * authfile) { 575 int buf_getline(buffer * line, FILE * authfile) {
576 576
577 int c = EOF; 577 int c = EOF;
578 578
579 TRACE(("enter buf_getline"))
580
581 buf_setpos(line, 0); 579 buf_setpos(line, 0);
582 buf_setlen(line, 0); 580 buf_setlen(line, 0);
583 581
584 while (line->pos < line->size) { 582 while (line->pos < line->size) {
585 583
602 /* if we didn't read anything before EOF or error, exit */ 600 /* if we didn't read anything before EOF or error, exit */
603 if (c == EOF && line->pos == 0) { 601 if (c == EOF && line->pos == 0) {
604 TRACE(("leave buf_getline: failure")) 602 TRACE(("leave buf_getline: failure"))
605 return DROPBEAR_FAILURE; 603 return DROPBEAR_FAILURE;
606 } else { 604 } else {
607 TRACE(("leave buf_getline: success"))
608 buf_setpos(line, 0); 605 buf_setpos(line, 0);
609 return DROPBEAR_SUCCESS; 606 return DROPBEAR_SUCCESS;
610 } 607 }
611 608
612 } 609 }