2003-11-02 Thomas Klausner * configure.ac: bump to 0.4. 2003-10-29 Thomas Klausner * dccsend.c (send_file): after sending the file, read from network until remote closes connection. Fixes sending files to a MIRC DCC server. * dccsend.c (main): add undocumented -d flag which spews some debugging output. 2003-10-28 Thomas Klausner * dccsend.c (main_loop): if remotenick has not been specified, fill in the variable with the nick remote sent. 2003-10-26 Thomas Klausner * child.c (read_file): close connection when exactly the expected number of bytes has been received. * dccsend.c (main_loop): report errors when closing network connection. 2003-08-04 Thomas Klausner * contrib/dccsend.pl: Add script from David Oftedal for xchat using dccsend instead of /dcc send for firewall protected hosts. * dccsend.c: add prototypes. * config.guess, config.sub, depcomp, install-sh: update from automake 1.7.6. 2003-05-25 Thomas Klausner * dccsend.mdoc: remove -r note from BUGS. * dccsend.man: regen. * dccsend.c: use more code from libdcc. (main_loop): verify remote nick vs. command line argument. * lib/Makefile.am: rename to libdcc. * Makefile.am: adapt to rename. * child.c: replace parse_get_line with new parse_reply from libdcc. * lib/dcc.c: add parse_reply. * lib/dcc.h: add parse_reply. 2003-05-22 Thomas Klausner * child.c (get_line_from_client): move from here... * lib/dcc.c: ... to here * lib/dcc.h: new file. 2003-05-14 Thomas Klausner * child.c (get_line_from_client): restructure a bit for easier generalisation. (child_loop): adapt. * dccserver.h: only have minimal includes here. * child.c: add includes. * dccserver.c: add includes. * child.c (fdgets, findnl, read_some, tell_client, write_complete): move from here... * lib/io.c (fdgets, findnl, read_some, tell_client, write_complete): ... to here. * Makefile.am (AM_CPPFLAGS): look for header files in lib/. * lib/Makefile.am (libcompat_a_SOURCES): add io.c and util.c. * child.c (strip_path): move from here... * lib/util.c: ... to here. * lib/util.h: new file. * child.c (data_available): move from here... * lib/io.c: ... to here. * lib/io.h: new file. 2003-05-13 Thomas Klausner * lib/getaddrinfo.c (getaddrinfo): use unsigned short instead of less portable u_short. * child.c (display_remote_line): fix signedness warnings from Tru64. * configure.ac: fix getaddrinfo test for Tru64. 2003-05-12 Thomas Klausner * README.Darwin: removed, unneeded now. * compile: needed for dccsend_CPPFLAGS. * configure.ac: use #-comments instead of dnl. Looks nicer. * COPYING: add copyright for lib/poll.[ch]. * configure.ac, Makefile.am, lib/: moved replacement functions to lib/ subdir, added poll replacement function from Brian M Clapper for building on Darwin. * dccserver.mdoc: document "close" command. * dccserver.man: regen. * dccserver.c: add sigint variable. (sig_handle): handle SIGINT. (handle_input): add "close" command, which closes particular client connections (by killing the child). (main): install signal handler for SIGINT. (main): exit gracefully on SIGINT. (main): mention port to which client is connected. * dccserver.h: add sigint variable. * child.c (cleanup_read_file): fix return value. (get_line_from_client): fix return value. (child_loop): exit gracefully on SIGINT. 2003-05-11 Thomas Klausner * configure.ac: 0.3b test release. * child.c (child_loop): handle SIGINFO for CHAT. * dccserver.mdoc: document timeouts. bump date. * dccserver.man: regen. * child.c (child_loop): readd CHAT support. * dccserver.c (main): kill children when quitting. (kill_children): new function. (collect_child): handle sigchild. * dccserver.c (main): use sigaction instead of signal, for better portability. * child.c: rewrite to not use stdio, to get sane timeout handling. * dccserver.h: new header file for common definitions. * dccserver.c, child.c: moved the child code to child.c. 2003-05-06 Thomas Klausner * dccserver.c (sig_handle): rename variable to avoid shadowing. (main): remove variable to avoid shadowing. 2003-05-02 Thomas Klausner * configure.ac: 0.3a test release. * dccserver.c: warn if neither poll.h nor sys/poll.h are found. * configure.ac: one of poll.h and sys/poll.h is enough; break if poll.h is found. * Makefile.am (EXTRA_DIST): distribute README.Darwin. * README.Darwin: add instructions for Darwin. * configure.ac: check for poll.h and sys/poll.h. (USE_LIBPOLL): detect poll library (if any), and point to poll emulation lib if no poll() is found. * dccserver.c: conditionally include poll.h or sys/poll.h. * dccsend.c: include ; noted missing by Jeremy Gore. 2003-04-15 Thomas Klausner * strlcpy.c: sync license with original (less strict). * COPYING: sync license with strlcpy.c. * dccserver.c (get_file): add warning in an error case. 2003-04-12 Thomas Klausner * dccsend.c (send_file): remove two unused variables. (parse_send_line): remove unused variable. (main): remove three unused variables. (global): remove unused variable. * dccserver.c (get_file): show time taken by transfer and transfer rate. (converse_with_client): remove unused variable. (handle_input): remove unused variable. (create_and_bind_socket): fix format string. 2003-04-11 Thomas Klausner * dccserver.c: allow listening on multiple ports. (main): fix -v error message. * dccserver.mdoc: document that listening on multiple ports works now. * dccserver.man: regen. * dccserver.c (main): do chroot after option parsing, should be early enough and avoid an error message in case of -h or -v. 2003-04-07 Thomas Klausner * dccserver.mdoc: document "quit". * dccserver.man: regen. * NEWS: 0.3 RELEASED * configure.ac: Bump to 0.3. * Makefile.am, configure.ac: add and install dccsend man pages. * dccsend.mdoc: add man page for dccsend. * dccsend.man: generate. * dccsend.c (main): fix -v output. * dccserver.c (main): fix -v output. * dccsend.c (usage): fix usage. (main): change default nickname to "dccsend". * dccserver.mdoc: add -e to SYNOPSIS. * dccserver.man: regen. 2003-04-05 Thomas Klausner * dccserver.c (get_file): For consistency, don't insist on O_EXCL when creating new files. Noted by Rudolf Polzer. * dccserver.mdoc: remove a paragraph from BUGS that's no longer true. Noted by Rudolf Polzer. * dccserver.man: regen. * dccsend.c (send_file): fix fseek return value check. * dccserver.c (get_file): don't append to file, but seek to offset to avoid problems with two or more writers to the same file. Idea from Rudolf Polzer. * dccserver.c (tell_client): add fflush; seems to help at least on Solaris. * dccserver.c (handle_input): return -1 if stdin closed, or user entered "quit". (main): exit if -1 returned by handle_input. Idea from Rudolf Polzer. 2003-04-04 Thomas Klausner * getaddrinfo.h: new file, from Dieter Baron. * getaddrinfo.c: new file, from Dieter Baron. * configure.ac: use getaddrinfo.c, if needed. * dccsend.c: include getaddrinfo.h, if needed. * Makefile.am (EXTRA_DIST): add getaddrinfo.[ch]. * COPYING: add license for getaddrinfo.[ch]. * dccserver.c (handle_connection): add fflush(stderr). (converse_with_client): here too. * dccserver.c (get_file): add more verbose error messages in case we already have the complete file, or more bytes than client is willing to send. * configure.ac: use errx if needed. * errx.c (errx): new file. * COPYING: mention errx.c. * Makefile.am (EXTRA_DIST): add errx.c. * warnx.c (warnx): use fputs instead of fprintf. * dccserver.c (get_file): allow files of size 0 to be resumed. (get_file): fix two messages. 2003-04-03 Thomas Klausner * dccserver.c (main): add minimal port verification. * dccserver.c (get_file, display_remote_line) (converse_with_client, communicate_with_client): sprinkle child IDs in more output messages. Mostly from Rudolf Polzer. * dccserver.c (get_file): correct output of new bytes in one case. * dccserver.mdoc: mention how to run dccserver in an irssi window. From Rudolf Polzer. * dccserver.man: regen. 2003-04-02 Thomas Klausner * dccserver.c (parse_get_line): use strip_path to remove path components from filename. Requested by Athanasius. (strip_path): new function. * THANKS: new file. * Makefile.am (EXTRA_DIST): remove README; should be included automatically. 2003-04-01 Thomas Klausner * dccserver.c (main): remove seteuid call, it was unnecessary. Noted by Athanasius. * configure.ac: do not check for seteuid. 2003-03-29 Thomas Klausner * dccserver.mdoc: document -e. * dccserver.man: regen. * dccserver.c (main): add option (-e) to echo input. (usage): mention -e. (handle_input): echo input if flag set. Idea for -e from Robert Polzer. * dccserver.c (main): add fflush(stdout). (display_remote_line): Here too. From Rudolf Polzer. * dccserver.mdoc: document -i option. * dccserver.man: regen. * dccserver.c (main): add option (-i) to not filter out control characters. (converse_with_client): move display code to ... (display_remote_line): new function, and honor option to display control characters. (usage): mention -i here too. Idea for -i from Rudolf Polzer. 2003-01-28 Thomas Klausner * dccserver.c (get_file): only warn if we really get more than expected, not if we just get all the bytes. * dccserver.mdoc: remove a superfluous word. * dccserver.man: regen. 2003-01-23 Thomas Klausner * dccserver.c (communicate_with_client): remove unused variable. * config.guess: update to 2003-01-10, prompted by Aubin Paul. * config.sub: update to 2003-01-22, prompted by Aubin Paul. 2003-01-22 Thomas Klausner * configure.ac: Bump version to 0.2. * configure.ac: check for seteuid. * dccserver.c: add more prototypes for replacement functions. (main): ifdef out seteuid if not existing. * dccserver.mdoc: update for using chroot and setuid. * dccserver.man: regen. * dccserver.c: allow receiving more than expected number of bytes, but show a warning. From Per von Zweigbergk . (main): chdir to "/" in chroot. * configure.ac: use autoconf 2.57. * Makefile.am (install-exec-hook): allow installation to succeed if chown/chmod for installing dccserver setuid root fail. * dccserver.c: add prototype for strlcpy if needed. Suggestion by Per von Zweigbergk . (get_file): add " got" in closing-connection-string. From Per von Zweigbergk . (main): install signal handlers later. * Makefile.am (install-exec-hook): install dccserver setuid root. * dccserver.c: chroot(2) to current dir; drop setuid bits after opening the DCC port. Suggestion by Per von Zweigbergk . * COPYING, dccserver.c: update copyright year. * COPYING: remove paragraph about snprintf.c. * configure.ac, Makefile.am (EXTRA_DIST): remove snprintf.c. * snprintf.c: removed. * dccserver.c: use fputs/puts/strlcpy instead of fprintf and snprintf. 2002-11-15 Thomas Klausner * mkinstalldirs: update to automake 1.7.1 version. * configure.ac: update to autoconf 2.56. 2002-10-17 Thomas Klausner * Makefile.am, NEWS, debian/*: add Debian package support provided by Aubin Paul .