File LPRng-3.8.28-peek.diff of Package lprng
--- src/common/lpd_dispatch.c
+++ src/common/lpd_dispatch.c
@@ -274,39 +274,6 @@
memset(input,0,sizeof(input));
- do {
- int my_len = sizeof( input ) - 1;
- static int timeout;
- timeout = (Send_job_rw_timeout_DYN>0)?Send_job_rw_timeout_DYN:
- ((Connect_timeout_DYN>0)?Connect_timeout_DYN:10);
- DEBUG1( "Service_connection: doing peek for %d on fd %d, timeout %d",
- my_len, talk, timeout );
- if( Set_timeout() ){
- Set_timeout_alarm( timeout );
- status = recv( talk, input, my_len, MSG_PEEK );
- } else {
- status = -1;
- }
- Clear_timeout();
-
- if( status <= 0 ){
- LOGERR_DIE(LOG_DEBUG) _("Service_connection: peek of length %d failed"), my_len );
- }
- DEBUG1("Service_connection: status %d 0x%02x%02x%02x%02x (%c%c%c%c)", status,
- cval(input+0), cval(input+1), cval(input+2), cval(input+3),
- cval(input+0), cval(input+1), cval(input+2), cval(input+3));
- } while( status < 2 );
-
- if( isalpha(cval(input+0)) &&
- isalpha(cval(input+1)) && isalpha(cval(input+2)) ){
- /*
- Service_ipp( talk, from_addr );
- */
- } else if( cval(input+0) == 0x80 ) {
- /*
- Service_ssh_ipp( talk, from_addr );
- */
- }
Service_lpd( talk, from_addr );
}