2011-01-29  Sergey Poznyakoff  <gray@gnu.org.ua>

	Update docs.  Add some more debugging.

2011-01-28  Sergey Poznyakoff  <gray@gnu.org.ua>

	Switch to deep directory structure, add a boilerplate for texi docs.

	Implement daemon mode and logging to syslog.

	* Makefile.am (EXTRA_DIST): New var.
	* daemon.c: New file.
	* configure.ac: Check for daemon.
	* error.c: Implement logging to syslog.
	* joh.h (prefix_severity_option, facility_option)
	(log_tag): New externs.
	(joh_initlog): New proto.
	* johd.c (pidfile): New global.
	(joh_check_pidfile, joh_remove_pidfile, joh_write_pidfile): New functions.
	(main): Implement new options: -D, -p, -F, -L, -P.
	Switch to background if requested.

	Configurable, per-socket TCP wrapper daemon names.

	* joh.h (joh_sockaddr) <srvname>: New member.
	(JOH_HINT_SRVNAME): New flag.
	(joh_sockaddr_hints) <srvname>: New member.
	(connection_allowed): Change signature.
	* johd.c: New option -S.
	The -c option affects the default port number (80 for HTTP).
	* netaddr.c (parse_unix): Set srvname to NULL.
	(parse_inet): Set srvname according to hints.
	* selloop.c (_netio_master): Print service (daemon) name in the
	blocked access diagnostics message.
	Set class and srvname of jsa to those of sa.
	* acl.c (connection_allowed): Take second argument, specifying the
	daemon name to use with TCP wrappers.
	(joh_daemon_name): Remove global.

	Implement direct HTTP support in daemon.

	* http.c: New file.
	* interp.c: New file.
	* util.c: New file.
	* Makefile.am (libjoh_a_SOURCES): Add util.c
	(johd_SOURCES): Add interp.c and http.c.

	* cbuf.c (copy_chars, joh_cbuf_append): Buffer is const char *.
	* conntab.c (client_class_str): New variable.
	(joh_connection_client_class): New function.
	* joh.h (joh_client_class): New enum.
	(joh_sockaddr) <class>: New member.
	(joh_sockaddr_hints) <class>: New member.
	(joh_cbuf_append): Change signature.
	(client_class_str): New extern.
	(joh_session) <decstate>: New member.
	(joh_pdu_decode): Change signature.
	(param_str): New extern.
	(joh_data_decode, joh_data_encode)
	(joh_http_decode, joh_http_encode)
	(store_param, unescape_query)
	(parse_http_query, parse_content): New protos.
	* johcgi.c (store_param, parse_content)
	(unescape_query): Move to the library. All uses changed.
	* johd.c: Implement -c option.
	* netaddr.c (parse_unix, parse_inet): Handle JOH_HINT_CLASS flag.
	* pdu.c (param_str): Remove static qualifier.
	(joh_pdu_decode): Change signature.
	(joh_pdu_decode_session): Remove.
	* selloop.c (_netio_master): Set joh_sockaddr class.
	(_netio_jabber): Improve packet dump format.
	(_netio_client): Likewise.
	Use joh_data_ functions.
	* sess.c (joh_session_destroy): Free decstate.
	* socket.c (new_jabber_connection): Remove AI_NUMERIC flags.

2011-01-27  Sergey Poznyakoff  <gray@gnu.org.ua>

	Minor fixes in manpage formatting.

	Minor change in README.

	Minor changes in error reporting.

	Configurable timeouts.

	* joh.h (joh_session_set_timeout): New proto.
	* johd.c: new option -t
	* sess.c (joh_session_set_timeout): New function.

	Minor fixes in URL parser.

	* johcgi.c (joh_connect): Don't use JOH_HINT_BIND.
	* netaddr.c (parse_inet): Allow NULL node.
	Unless family == AF_UNSPEC, select only those sockaddrs that match
	the family.

	Add manpages.

	* joh.cgi.8: New file.
	* johd.8: New file.
	* Makefile.am (dist_man_MANS): New var.

2011-01-26  Sergey Poznyakoff  <gray@gnu.org.ua>

	Redesign PDU.

	Bugfix.

	* netaddr.c (parse_inet): Fix parsing IPv6 addresses.

	Improve -l and -s option parsers.

	* error.c (source_info_option): New global.
	(debug_begin_out): New function.
	* joh.h (debug_begin_out): New proto.
	(source_info_option): New extern.
	(debug): Use debug_begin_out.
	(joh_add_fd,joh_rem_fd,joh_chg_fd): Void functions.
	* johcgi.c (fallback_jabber_data): Remove unused vars.
	* johd.c: New option -i.
	* netaddr.c: Include ctype.h
	(good_ipaddr,is_numstr): New functions.
	(parse_inet): Allow for single IP addresses or single port number
	as argument.
	* selloop.c, sess.c, socket.c: Minor fixes.

	Minor fix.

	* selloop.c (_netio_client): Report invalid keys and session ids
	back to the caller.

	Housekeeping: add bootstrap and add some generic docs.

2011-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>

	Implement a CGI interface.

	Minor fix.

	* selloop.c (_netio_client): Honor newkey.

	Include config.h in joh.h

	Update copylefts.

2011-01-24  Sergey Poznyakoff  <gray@gnu.org.ua>

	Autoconfiscate.

	Optimize

	* conntab.c (connection) <next,prev,inset>: New members.
	(conntab_head, conntab_tail): New variables.
	(joh_connection_inset): New function.
	(joh_connection_register): Keep a doubly-lined list of active descriptors.
	(joh_connection_iterate): Iterate over the list, ignoring fds with inset=0.
	* joh.h (FDSET_RD, FDSET_WR, FDSET_EX): New constants
	(FDMASK): New macro
	(IOBUFSIZE): New constant.
	(joh_connection_inset): New proto.
	(joh_session_state): Remove. All uses updated.
	(joh_connect_set): Remove.
	(joh_fd_set): New global.
	(joh_listen_socket_setup): Change signature.
	All uses updated.
	* selloop.c: Update joh_fd_set as needed.
	* sess.c: Likewise.
	* socket.c (joh_connect_set): Remove.
	(joh_add_fd): Take second argument.
	(joh_rem_fd): Update.
	(joh_chg_fd): New function.

	Finish initial implementation.

	* key.c: New file.
	* Makefile (SRCS): Add key.c
	* cbuf.c (joh_cbuf_create): Initialize .free.
	* client.c (client_decode): update.
	(client_encode): New function.
	* joh.h (joh_param): Rename to joh_param_key.
	(joh_param, joh_obuf): New structs.
	(joh_session) <cbuf>: Remove.
	<ibuf,obuf>: New members.
	<param>: Change data type.
	(client_encode, joh_validate_key): New prototypes.
	* selloop.c (_netio_jabber): Implement.
	(_netio_client): Various fixes.
	(set_signals): Bugfix.
	* sess.c, sessid.c, socket.c: Update.

	Read and decode incoming client packs.

	* client.c: New file.
	* Makefile (SRCS): Add client.c
	* conntab.c (conn_type_str): New global.
	(joh_connection_iterate): Ignore unused sockets.
	* error.c (joh_format_vbuf, joh_logdump): New functions.
	* joh.h: Add missing includes,
	(JOH_VBUFSIZE): New define.
	(joh_format_vbuf, joh_logdump): New protos.
	(conn_type_str): New extern.
	(joh_session_state,joh_param): New enums.
	(joh_session) <state.peer,param>: New members.
	<id,key>: Remove.
	(joh_session_lookup): Change signature.
	(new_jabber_connection): Change signature.
	(client_decode): New proto.
	* johd.c (main): Call joh_loop.
	* selloop.c (_netio_client): Initial implementation.
	(joh_loop): Handle common signals.

	* sess.c (joh_session_promote): Fix call to time.
	(joh_session_create): Likewise.
	(joh_session_destroy): Update
	(joh_session_lookup): Take a pointer to struct joh_session as argument.
	* socket.c (new_jabber_connection): Take 2 args.
	Use "server" and "port" parameters, if present.

	Further development of the session support.

	* Makefile (SRCS): Add acl.c and selloop.c
	* acl.c: New file.
	* selloop.c: New file.
	* conntab.c (getmaxfd): New function.
	(joh_connection_iterate): New function.
	* joh.h (joh_sockaddr) <sess>: New  member.
	(joh_sockaddr_new): Change signature.
	(joh_sockaddr_copy): New proto.
	(sockaddr_str): New proto.
	(joh_connection_iterate): New proto.
	(joh_session) <type>: New member.
	(joh_session_create): Change signature.
	(joh_connect_set,joh_max_fd): New externs.
	(joh_add_fd, joh_rem_fd, new_jabber_connection): New protos.
	(connection_allowed): New proto.
	(jabber_addr): New extern.
	* netaddr.c (joh_sockaddr_new): Change signature.
	(joh_sockaddr_copy): New function.
	(sockaddr_str): New function.
	* sess.c (joh_session_timeout_table): New variable.
	(joh_session_create): Rewrite.
	(joh_session_destroy): Unregister the fd.
	(joh_session_timeout): New function.
	* socket.c (joh_max_fd): New global.
	(joh_add_fd, joh_rem_fd): New functions.
	(setup_listen_socket): Register the fd.
	(new_jabber_connection): New function.

2011-01-23  Sergey Poznyakoff  <gray@gnu.org.ua>

	Add new functionality

	* conntab.c: New file.
	* socket.c: New file.
	* Makefile (SRCS): Add conntab.c & socket.c.
	* joh.h: Add more includes.
	(getmaxfd): New define.
	(joh_sockaddr) <str>: New member.
	(joh_sockaddr_str): New function.
	(joh_conntype): New struct.
	(joh_conntab_init, joh_connection_type)
	(joh_connection_address, joh_connection_register): New protos.
	(joh_listen_socket_setup,joh_listen_socket_cleanup): New protos.
	* johd.c (main): Open and close sockets.
	* mem.c (xstrdup): Bugfix. Wrong value was returned.
	* netaddr.c (joh_sockaddr_append): Likewise.
	(joh_sockaddr_free): Free str.
	(joh_sockaddr_str): New function.

	Add base64, sha1 and session support.

2011-01-22  Sergey Poznyakoff  <gray@gnu.org.ua>

	Initial commit

Local Variables:
mode: change-log
version-control: never
buffer-read-only: t
End:
