comparison svr-chansession.c @ 502:43bbe17d6ba0

- Add Counter Mode support
author Matt Johnston <matt@ucc.asn.au>
date Mon, 29 Sep 2008 13:53:31 +0000
parents 9f583f4d59a6
children d4bbc0039008
comparison
equal deleted inserted replaced
501:d58c478bd399 502:43bbe17d6ba0
661 ses.maxfd = MAX(ses.maxfd, channel->errfd); 661 ses.maxfd = MAX(ses.maxfd, channel->errfd);
662 662
663 addchildpid(chansess, chansess->pid); 663 addchildpid(chansess, chansess->pid);
664 664
665 if (svr_ses.lastexit.exitpid != -1) { 665 if (svr_ses.lastexit.exitpid != -1) {
666 unsigned int i;
666 TRACE(("parent side: lastexitpid is %d", svr_ses.lastexit.exitpid)) 667 TRACE(("parent side: lastexitpid is %d", svr_ses.lastexit.exitpid))
667 /* The child probably exited and the signal handler triggered 668 /* The child probably exited and the signal handler triggered
668 * possibly before we got around to adding the childpid. So we fill 669 * possibly before we got around to adding the childpid. So we fill
669 * out its data manually */ 670 * out its data manually */
670 int i;
671 for (i = 0; i < svr_ses.childpidsize; i++) { 671 for (i = 0; i < svr_ses.childpidsize; i++) {
672 if (svr_ses.childpids[i].pid == svr_ses.lastexit.exitpid) { 672 if (svr_ses.childpids[i].pid == svr_ses.lastexit.exitpid) {
673 TRACE(("found match for lastexitpid")) 673 TRACE(("found match for lastexitpid"))
674 svr_ses.childpids[i].chansess->exit = svr_ses.lastexit; 674 svr_ses.childpids[i].chansess->exit = svr_ses.lastexit;
675 svr_ses.lastexit.exitpid = -1; 675 svr_ses.lastexit.exitpid = -1;