~ubuntu-branches/ubuntu/trusty/vsftpd/trusty-proposed

« back to all changes in this revision

Viewing changes to readwrite.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-11-14 18:21:08 UTC
  • mto: (2.4.1 sid)
  • mto: This revision was merged to the branch mainline in revision 21.
  • Revision ID: james.westby@ubuntu.com-20091114182108-x8n9136us3wdyyrd
Tags: upstream-2.2.2~pre1
ImportĀ upstreamĀ versionĀ 2.2.2~pre1

Show diffs side-by-side

added added

removed removed

Lines of Context:
123
123
  }
124
124
}
125
125
 
126
 
void
 
126
int
127
127
ftp_getline(struct vsf_session* p_sess, struct mystr* p_str, char* p_buf)
128
128
{
129
129
  if (p_sess->control_use_ssl && p_sess->ssl_slave_active)
130
130
  {
 
131
    int ret;
131
132
    priv_sock_send_cmd(p_sess->ssl_consumer_fd, PRIV_SOCK_GET_USER_CMD);
132
 
    priv_sock_get_str(p_sess->ssl_consumer_fd, p_str);
 
133
    ret = priv_sock_get_int(p_sess->ssl_consumer_fd);
 
134
    if (ret >= 0)
 
135
    {
 
136
      priv_sock_get_str(p_sess->ssl_consumer_fd, p_str);
 
137
    }
 
138
    return ret;
133
139
  }
134
140
  else
135
141
  {
140
146
      p_peek = ssl_peek_adapter;
141
147
      p_read = ssl_read_adapter;
142
148
    }
143
 
    str_netfd_alloc(p_sess,
144
 
                    p_str,
145
 
                    '\n',
146
 
                    p_buf,
147
 
                    VSFTP_MAX_COMMAND_LINE,
148
 
                    p_peek,
149
 
                    p_read);
 
149
    return str_netfd_alloc(p_sess,
 
150
                           p_str,
 
151
                           '\n',
 
152
                           p_buf,
 
153
                           VSFTP_MAX_COMMAND_LINE,
 
154
                           p_peek,
 
155
                           p_read);
150
156
  }
151
157
}
152
158