Home | History | Annotate | Download | only in dropbear

Lines Matching refs:chansess

46 static int bindagent(int fd, struct ChanSess * chansess);
51 int agentreq(struct ChanSess * chansess) {
55 if (chansess->agentlistener != NULL) {
66 if (bindagent(fd, chansess) == DROPBEAR_FAILURE) {
79 chansess->agentlistener = new_listener( &fd, 1, 0, chansess,
82 if (chansess->agentlistener == NULL) {
90 agentcleanup(chansess);
116 void agentset(struct ChanSess * chansess) {
121 if (chansess->agentlistener == NULL) {
126 len = strlen(chansess->agentdir) + strlen(chansess->agentfile) + 2;
129 snprintf(path, len, "%s/%s", chansess->agentdir, chansess->agentfile);
135 void agentcleanup(struct ChanSess * chansess) {
142 if (chansess->agentlistener != NULL) {
143 remove_listener(chansess->agentlistener);
144 chansess->agentlistener = NULL;
147 if (chansess->agentfile != NULL && chansess->agentdir != NULL) {
159 len = strlen(chansess->agentdir) + strlen(chansess->agentfile) + 2;
162 snprintf(path, len, "%s/%s", chansess->agentdir, chansess->agentfile);
166 rmdir(chansess->agentdir);
173 m_free(chansess->agentfile);
174 m_free(chansess->agentdir);
202 static int bindagent(int fd, struct ChanSess * chansess) {
252 chansess->agentdir = m_strdup(path);
253 chansess->agentfile = m_strdup(sockfile);