opts.c 481 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Part of Very Secure FTPd
  3. * Licence: GPL v2
  4. * Author: Chris Evans
  5. * opts.c
  6. *
  7. * Routines to handle OPTS.
  8. */
  9. #include "ftpcodes.h"
  10. #include "ftpcmdio.h"
  11. #include "session.h"
  12. void
  13. handle_opts(struct vsf_session* p_sess)
  14. {
  15. str_upper(&p_sess->ftp_arg_str);
  16. if (str_equal_text(&p_sess->ftp_arg_str, "UTF8 ON"))
  17. {
  18. vsf_cmdio_write(p_sess, FTP_OPTSOK, "Always in UTF8 mode.");
  19. }
  20. else
  21. {
  22. vsf_cmdio_write(p_sess, FTP_BADOPTS, "Option not understood.");
  23. }
  24. }