Lines Matching defs:sip

324 	struct selectinfo	*sip;
327 sip = (struct selectinfo *)ld->ld_selectinfo;
330 for (i=0; i< sip->nbfds; i++) {
331 if (sip->fds[i].fd == sb->sb_sd){
332 sip->fds[i].events |= POLLOUT;
336 if (sip->nbfds < LDAP_DEFAULT_REFHOPLIMIT) {
337 sip->fds[sip->nbfds].fd = sb->sb_sd;
338 sip->fds[sip->nbfds].events |= POLLOUT;
339 sip->nbfds++;
351 struct selectinfo *sip;
354 sip = (struct selectinfo *)ld->ld_selectinfo;
357 for (i=0; i< sip->nbfds; i++) {
358 if (sip->fds[i].fd == sb->sb_sd) {
359 sip->fds[i].events |= POLLIN;
364 if (sip->nbfds < LDAP_DEFAULT_REFHOPLIMIT) {
365 sip->fds[sip->nbfds].fd = sb->sb_sd;
366 sip->fds[sip->nbfds].events |= POLLIN;
367 sip->nbfds++;
379 struct selectinfo *sip;
382 sip = (struct selectinfo *)ld->ld_selectinfo;
384 for (i = 0; i< sip->nbfds; i++) {
385 if (sip->fds[i].fd == sb->sb_sd){
387 for (; i < sip->nbfds; i ++) {
388 sip->fds[ i - 1] = sip->fds[i];
390 sip->fds[i].fd = -1;
391 sip->fds[i].events = -1;
392 sip->nbfds--;
404 struct selectinfo *sip;
407 sip = (struct selectinfo *)ld->ld_selectinfo;
409 for (i=0; i< sip->nbfds; i++) {
410 if (sip->fds[i].fd == sb->sb_sd) {
411 if ( sip->fds[i].revents & (POLLERR | POLLHUP | POLLNVAL)) {
414 return( sip->fds[i].revents & POLLOUT );
424 struct selectinfo *sip;
427 sip = (struct selectinfo *)ld->ld_selectinfo;
429 for (i=0; i< sip->nbfds; i++) {
430 if (sip->fds[i].fd == sb->sb_sd) {
431 if (sip->fds[i].revents & (POLLERR | POLLHUP | POLLNVAL)) {
434 return( sip->fds[i].revents & POLLIN );
443 struct selectinfo *sip;
445 sip = (struct selectinfo *)calloc( 1, sizeof( struct selectinfo ));
447 return( (void *)sip );
452 free_select_info( void *sip )
454 free( sip );
461 struct selectinfo *sip;
469 sip = (struct selectinfo *)ld->ld_selectinfo;
471 /* sip->fds[0].revents = 0; */
482 rv = poll(sip->fds,sip->nbfds,tim);
487 return( poll(sip->fds,sip->nbfds,tim) );
503 struct selectinfo *sip;
505 sip = (struct selectinfo *)ld->ld_selectinfo;
507 if ( !FD_ISSET( sb->sb_sd, &sip->si_writefds )) {
508 FD_SET( sb->sb_sd, &sip->si_writefds );
516 struct selectinfo *sip;
518 sip = (struct selectinfo *)ld->ld_selectinfo;
520 if ( !FD_ISSET( sb->sb_sd, &sip->si_readfds )) {
521 FD_SET( sb->sb_sd, &sip->si_readfds );
529 struct selectinfo *sip;
531 sip = (struct selectinfo *)ld->ld_selectinfo;
533 FD_CLR( sb->sb_sd, &sip->si_writefds );
534 FD_CLR( sb->sb_sd, &sip->si_readfds );
541 struct selectinfo *sip;
543 sip = (struct selectinfo *)ld->ld_selectinfo;
545 return( FD_ISSET( sb->sb_sd, &sip->si_use_writefds ));
552 struct selectinfo *sip;
554 sip = (struct selectinfo *)ld->ld_selectinfo;
556 return( FD_ISSET( sb->sb_sd, &sip->si_use_readfds ));
563 struct selectinfo *sip;
565 if (( sip = (struct selectinfo *)calloc( 1,
567 FD_ZERO( &sip->si_readfds );
568 FD_ZERO( &sip->si_writefds );
571 return( (void *)sip );
576 free_select_info( void *sip )
578 free( sip );
585 struct selectinfo *sip;
601 sip = (struct selectinfo *)ld->ld_selectinfo;
602 sip->si_use_readfds = sip->si_readfds;
603 sip->si_use_writefds = sip->si_writefds;
608 return( select( tblsize, &sip->si_use_readfds, &sip->si_use_writefds,