Changes for W32
[gpgme.git] / assuan / ChangeLog
1 2007-07-12  Werner Koch  <wk@g10code.com>
2
3         * assuan-io.c (_assuan_simple_write, _assuan_simple_read): Map
4         ERROR_BROKEN_PIPE to EPIPE.
5
6 2007-07-08  Marcus Brinkmann  <marcus@g10code.de>
7
8         * assuan-defs.h (struct assuan_context_s): Have partial peercred
9         structure even if HAVE_W32_SYSTEM, and have full peercred
10         structure only if HAVE_SO_PEERCRED.
11         * assuan-connect.c (assuan_get_peercred) [!HAVE_SO_PEERCRED]: Do
12         not try to set PID, UID and GID.
13
14 2007-07-04  Marcus Brinkmann  <marcus@g10code.de>
15
16         Change _WIN32 to HAVE_W32_SYSTEM for consistency.
17
18         * assuan-defs.h (struct assuan_context_s): Have full peercred
19         structure even if not HAVE_SO_PEERCRED, but not if
20         HAVE_W32_SYSTEM.
21
22 2007-06-18  Werner Koch  <wk@g10code.com>
23
24         * assuan-logging.c (load_libgpg_error, _assuan_gpg_strerror_r) 
25         (_assuan_gpg_strsource): New.
26         * assuan-handler.c (process_request) [W32]: Use these new
27         functions for human understable error codes.
28
29 2007-06-12  Werner Koch  <wk@g10code.com>
30
31         * assuan-io.c (_assuan_simple_read): Hack to allow reading from a
32         socket.
33         (_assuan_simple_write): Likewise.
34
35 2007-06-11  Werner Koch  <wk@g10code.com>
36
37         * assuan-io-pth.c (_assuan_simple_read, _assuan_simple_write): Use
38         pth versions also for W32.
39
40 2007-05-29  Werner Koch  <wk@g10code.com>
41
42         * assuan-io-pth.c: Include sys/socket.h only if available.  Remove
43         double inclusion of sys/wait.h
44         
45         * assuan-pipe-connect.c (build_w32_commandline): Make ARGV const.
46
47         * assuan-pipe-server.c (is_valid_socket) [W32]: Do not define.
48
49         * assuan-socket-server.c [W32]: Include ws2tcpip.h to define
50         socklen_t.
51         * assuan-defs.h (struct assuan_context_s): Define most peercred
52         members only if we can really set them.
53         (_assuan_simple_sendmsg, _assuan_simple_recvmsg) [W32]: Use a
54         different prototype.
55         * assuan.h (assuan_get_peercred) [W32]: Do not define.
56         * assuan-io.c (_assuan_simple_sendmsg, _assuan_simple_recvmsg)
57         [w32]: Use another prototype.
58
59 2007-05-09  Werner Koch  <wk@g10code.com>
60
61         * libassuan.m4: Print found version on success.
62
63 2007-05-01  Werner Koch  <wk@g10code.com>
64
65         * assuan-uds.c (uds_reader): Cast void ptr for arithmetics.
66         Reported by Peter O'Gorman.
67
68 2006-12-03  Marcus Brinkmann  <marcus@g10code.de>
69
70         * assuan-handler.c (assuan_command_parse_fd): Also allow white
71         space after FD.
72
73 2006-12-02  Marcus Brinkmann  <marcus@g10code.de>
74
75         * assuan-uds.c (uds_reader): Return 0 if recvmsg returns 0.
76
77 2006-12-01  Marcus Brinkmann  <marcus@g10code.de>
78
79         * assuan-client.c (assuan_transact): Also translate some of the
80         legacy error codes.
81
82 2006-11-22  Werner Koch  <wk@g10code.com>
83
84         * assuan-handler.c (fun1_cookie_write, fun2_cookie_write): New.
85         (assuan_get_data_fp) [HAVE_FUNOPEN]: Use it.
86
87 2006-11-21  Werner Koch  <wk@g10code.com>
88
89         * Makefile.am (libassuan_pth_a_CFLAGS): New.
90
91         * assuan-pipe-server.c (_assuan_release_context): Free CMDTBL.
92
93 2006-11-14  Werner Koch  <wk@g10code.com>
94
95         * libassuan.m4 (AM_CHECK_LIBASSUAN): New.
96
97         * assuan-handler.c (assuan_register_post_cmd_notify) 
98         (assuan_register_post_cmd_notify): New.
99         * assuan-util.c (assuan_set_io_monitor): New.
100         * assuan-buffer.c (_assuan_read_line): Use it.
101         (_assuan_write_line): Ditto.
102         (_assuan_cookie_write_data): Ditto.
103         (_assuan_cookie_write_flush): Ditto.
104
105 2006-10-18  Werner Koch  <wk@g10code.com>
106
107         * libassuan.m4: Pass "pthread" to the common macro.  Reported by
108         Rex Dieter.
109
110 2006-10-16  Werner Koch  <wk@g10code.com>
111
112         * mkerrors: Map ASSUAN_Not_Confirmed.
113
114 2006-10-10  Werner Koch  <wk@g10code.com>
115
116         * libassuan.m4 (AM_PATH_LIBASSUAN_PTH)
117         (AM_PATH_LIBASSUAN_PTHREAD): Fixed.
118
119         * assuan-buffer.c (assuan_sendfd): Implement a runtime detection
120         of implemented descripotr passing.
121
122         * assuan-uds.c: Take care of USE_DESCRIPTOR_PASSING.
123
124         * assuan-defs.h: Add missing semicolon.
125
126 2006-10-09  Werner Koch  <wk@g10code.com>
127
128         * assuan-handler.c (process_request): Use weak pragma for the sake
129         of old gcc's.  Reported by Alain Guibert.
130
131         * assuan-io.c: Removed Pth support.
132         * assuan-io-pth.c: New. Based on assuan-io.c
133
134 2006-10-06  Werner Koch  <wk@g10code.com>
135
136         * libassuan-config.in: New options --api-version and --thread.
137
138 2006-10-04  Werner Koch  <wk@g10code.com>
139
140         * assuan-client.c (assuan_transact): Need to map old assuan status
141         codes so that for example CANCELED is correctly mapped.
142
143 2006-09-28  Marcus Brinkmann  <marcus@g10code.de>
144
145         * assuan-client.c (assuan_transact): Do not convert error on
146         status line, it is already a gpg-error.  Do convert
147         ASSUAN_Server_Fault.
148
149 2006-09-19  Marcus Brinkmann  <marcus@g10code.de>
150
151         * assuan.h (assuan_init_socket_server_ext)
152         [_ASSUAN_EXT_SYM_PREFIX]: Fix typo in macro.
153
154 2006-09-19  Werner Koch  <wk@g10code.com>
155
156         * assuan-defs.h (putc_unlocked): Add prototype.
157
158         * assuan-socket-server.c (accept_connection): Made LEN a socklen_t.
159
160         * assuan.h: Replaced assuan error code enum by simple defines and
161         made assuan_error_t an int.
162         * mkerrors: Changed parser accordingly.
163
164 2006-09-19  Marcus Brinkmann  <marcus@g10code.de>
165
166         * assuan-pipe-connect.c: Add hacks for Slowaris.
167         * assuan-socket.c: Likewise here.
168
169         * assuan.h (enum): Avoid trailing comma in enumerator list.  Ugh.
170
171         * mkerrors (_assuan_error): Change return type to assuan_error_t.
172         * assuan-buffer.c (_assuan_read_line): Change return type to
173         assuan_error_t.  Map returned value of -1.
174         (_assuan_write_line): Change type of RC to assuan_error_t.
175         * assuan-defs.h (_assuan_read_line, _assuan_error): Likewise for
176         prototypes.
177
178         * assuan-defs.h (unsetenv): Define correctly.
179
180 2006-09-14  Werner Koch  <wk@g10code.com>
181
182         * assuan-io.c (_assuan_waitpid): New.  Changed all waitpid calls
183         to this.
184
185         * assuan.h (_ASSUAN_DEPRECATED): New internal macro.
186         (assuan_pipe_connect2): Declare deprecated.
187         (assuan_init_connected_socket_server): Declare deprecated.
188
189         * assuan-connect.c (assuan_get_peercred): New.
190         * assuan-socket-server.c (accept_connection_bottom): Save uid and gid.
191
192 2006-09-13  Werner Koch  <wk@g10code.com>
193
194         * assuan-client.c (assuan_transact): Need to map the error code.
195         * mkerrors: Need to map ASSUAN_No_Secret_Key.
196
197         * assuan-pipe-server.c (is_valid_socket): New.
198         (assuan_init_pipe_server): Use UDS with the environmet variable is
199         set and a valid descriptor is given.  Ignore FILEDES in this case.
200
201         * assuan-socket-server.c (assuan_init_socket_server_ext): New.
202         Changed other init fucntions to make use of it.
203
204         * assuan-handler.c (assuan_command_parse_fd): Allow for lowercase
205         "fd".
206         (std_handler_reset): Close pending fds.
207         * assuan-uds.c (uds_receivefd): Fixed.
208         (_assuan_uds_close_fds): New.
209
210         * assuan-socket-connect.c (assuan_socket_connect_ext): New. Takes
211         all code of assuan_socket_connect plus an option to use sendmsg.
212         * assuan-pipe-connect.c (assuan_pipe_connect_ext): New arg FLAGS.
213
214 2006-09-12  Werner Koch  <wk@g10code.com>
215
216         * assuan-buffer.c (_assuan_write_line): Also log the prefix.
217
218         * assuan-defs.h (DIM, DIMof): New.
219
220         * assuan-domain-server.c: Removed.
221         * assuan-domain-connect.c: Renamed to ..
222         * assuan-uds.c: this.
223         (domain_reader, domain_writer, domain_sendfd, domain_receivefd) 
224         (assuan_domain_connect, _assuan_domain_init): Removed. 
225         (uds_reader, uds_writer, uds_sendfd, uds_receivefd) 
226         (_assuan_init_uds_io): New.
227         (_assuan_uds_deinit): New.
228
229         * assuan-io.c (_assuan_simple_sendmsg, _assuan_simple_recvmsg): New.
230         (my_pth_fdmode, my_pth_select): New.
231
232 2006-09-11  Werner Koch  <wk@g10code.com>
233
234         * assuan-pipe-server.c (assuan_init_pipe_server): Allow for
235         FILEDES to be NULL and try to start as a socketpair server in this
236         case.
237
238         * assuan-pipe-connect.c (assuan_pipe_connect2): Split up into two
239         functions (unix and w32) for clarity.
240         (pipe_connect_unix): This is the new fucntion.  Add USE_CMSG flag.
241         (pipe_connect_w32): Ditto.
242         (initial_handshake): Factored out code.
243         (socketpair_connect): New.
244         (assuan_pipe_connect_ext): New.
245         (do_finish): Handle case if outbound and inbound fd are the same.
246         This is to support socketpairs.
247
248 2006-09-10  Werner Koch  <wk@g10code.com>
249
250         * assuan-util.c (_assuan_log_print_buffer)
251         (_assuan_log_sanitized_string,assuan_set_log_stream): Moved to ..
252         * assuan-logging.c: .. here.
253         (_assuan_log_print_buffer): Only print the leading bytes in hex
254         log mode unless the new env variable ASSUAN_FULL_LOGGING has been
255         set.
256         (_assuan_set_default_log_stream): Test this env variable.
257
258 2006-09-06  Werner Koch  <wk@g10code.com>
259
260         * assuan.h (_ASSUAN_ONLY_GPG_ERRORS): New.
261
262         * assuan-handler.c (dispatch_command): Use Syntax_Error instead of
263         Invalid_Command.
264
265         * assuan-domain-connect.c: Changed alloc malloc/free/realloc to
266         xtrymalloc et al.
267         (read_int, write_int): Make args void pointers.
268         (domain_receivefd): Take care of realloc shrinking failure.
269
270         * assuan-buffer.c (_assuan_read_line, _assuan_write_line)
271         (assuan_write_line, _assuan_cookie_write_data)
272         (_assuan_cookie_write_flush): Print the inbound fd instead of the
273         address of the context when logging I/0.  This makes it more
274         readable.
275
276 2006-09-05  Werner Koch  <wk@g10code.com>
277
278         * assuan-defs.h (err_code, err_is_eof): New.
279
280         * mkerrors (_assuan_error): New.  Wrapped all error code
281         assignments in a call to this.
282         (assuan_strerror): Map gpg-style error codes back. Also print a
283         string for the old EOF code.
284         (assuan_set_assuan_err_source): New.
285
286         * assuan-logging.c (_assuan_log_printf): Do not change ERRNO and
287         print the pid.
288
289         * assuan-domain-connect.c (domain_reader): Replaced plain printf
290         by assuan_log function.
291
292 2005-10-24  Werner Koch  <wk@g10code.com>
293
294         * putc_unlocked.c, memrchr.c, isascii.c, funopen.c: Changed
295         distribution terms to LGPL.  This are small and trivial files so
296         there are no obstacles of doing so.
297         * assuan-socket.c: Likewise, the stated GPL was not intended.
298
299 2005-10-08  Marcus Brinkmann  <marcus@g10code.de>
300
301         * assuan-defs.h (setenv, unsetenv, clearenv) [!HAVE_SETENV]:
302         Define to _assuan_*.
303         * setenv.c: Include "assuan-defs.h".
304         (__add_to_environ): Make static.
305
306 2005-10-07  Marcus Brinkmann  <marcus@g10code.de>
307
308         * assuan-defs.h (memrchr) [!HAVE_MEMRCHR]: New prototype.
309         (stpcpy) [!HAVE_STPCPY]: Likewise.
310         * stpcpy.c: New LGPL'ed file from the GNU C Library.
311         * setenv.c: New file.
312         * assuan-domain-connect.c (read_int): New function.
313         (write_int): New function.
314         (domain_reader): Use read_int.
315         (domain_sendfd): Use write_int.
316
317 2005-10-01  Marcus Brinkmann  <marcus@g10code.de>
318
319         * assuan.h (assuan_pipe_connect, assuan_pipe_connect2): Make type
320         of ARGV parameter const in prototype.
321         * assuan-pipe-connect.c (assuan_pipe_connect,
322         assuan_pipe_connect2): Likewise in declaration.
323         (assuan_pipe_connect2): Add braindead cast to make execv happy.
324
325         * assuan-client.c (assuan_transact): Change LINE, S and D from
326         unsigned char * to char * to silence gcc warning.
327         * assuan-util.c (_assuan_log_sanitized_string): Add explicit cast
328         to silence gcc warning.
329         * assuan-inquire.c (assuan_inquire): Likewise.
330
331 2005-08-19  Werner Koch  <wk@g10code.com>
332
333         * funopen.c, assuan-socket.c: Copied from libassuan CVS.
334         * assuan-pipe-connect.c (assuan_pipe_connect2): Add missing
335         declaration of PID.
336
337 2005-08-09  Werner Koch  <wk@g10code.com>
338
339         * README.1st: Adjusted to cope with changes done in upstream Assuan.
340
341         Merged changes for W32 support from libassuan.
342         
343         * assuan.h [_ASSUAN_EXT_SYM_PREFIX]: New.
344         * assuan-io.c [_ASSUAN_NO_PTH]: New.
345         * assuan-pipe-connect.c (fix_signals) [_ASSUAN_NO_FIXED_SIGNALS]: New.
346         (assuan_pipe_connect2) [_ASSUAN_USE_DOUBLE_FORK]: Use double fork.
347         (fix_signals) [_ASSUAN_USE_DOUBLE_FORK]: Do not wait..
348         * assuan-logging.c, assuan-io.c: Include config.h
349         Replaced all usages of _WIN32 by the new HAVE_W32_SYSTEM because
350         there is nothing winning in this API.
351         * assuan-pipe-connect.c (assuan_pipe_connect2) [_WIN32]: Return
352         error Not Imlemented.
353         * assuan-logging.c (_assuan_w32_strerror): New. 
354         * assuan-defs.h (w32_strerror): new.
355         * assuan-pipe-connect.c (assuan_pipe_connect2, fix_signals):
356         Factored signal code out to new function.
357         (build_w32_commandline, create_inheritable_pipe): New.  Taken
358         from gnupg 1.9.
359         (assuan_pipe_connect2) [W32]: Implemented for W32.
360         * assuan-pipe-server.c (assuan_init_pipe_server) [W32]: Map file
361         descriptors using _get_osfhandle.
362         * assuan-socket-connect.c (assuan_socket_connect) [W32]: Allow for
363         a drive letter in the path.
364         * assuan-client.c (assuan_transact): Handle empty and comment
365         commands correctly.
366         * assuan-util.c (_assuan_calloc): Avoid integer overflow.
367         * assuan-util.c (assuan_set_flag, assuan_get_flag): New.
368         * assuan-defs.h (struct assuan_context_s): New field flags.
369         * assuan.h (assuan_flag_t): New with one flag value
370         ASSUAN_NO_WAITPID for now.
371         * assuan-pipe-connect.c (do_finish): Take care of the no_waitpid
372         flag.
373         * mkerrors: Include config.h into assuan-errors.c.  This is
374         required so that assuan.h knows about the W32 macro.
375
376 2005-08-09 Timo Schulz  <twoaday@g10code.com> (ported from libassuan by wk)
377         
378         * assuan-io.c (_assuan_simple_read, _assuan_simple_write): W32
379         support.
380         * assuan-socket.c (_assuan_close): New.
381         (_assuan_sock_new): New.
382         (_assuan_sock_bind): New.
383
384 2005-03-22  Werner Koch  <wk@g10code.com>
385
386         * assuan-defs.h (struct assuan_io): Renamed elements READ and
387         WRITE to READFNC and WRITEFNC to avoid problems with read defined
388         as macro.  Changed callers.  Noted by Ville Skyttä.
389
390 2004-12-16  Marcus Brinkmann  <marcus@g10code.de>
391
392         * assuan-pipe-connect.c (do_finish): Do not wait for child to finish.
393         (assuan_pipe_connect): Use double-fork approach.
394         * assuan-connect.c (assuan_disconnect): Do not write BYE to the
395         status line.
396
397 2004-12-07  Marcus Brinkmann  <marcus@g10code.de>
398
399         * README.1st: Add copyright notice.
400
401 2004-06-23  Marcus Brinkmann  <marcus@g10code.de>
402
403         * assuan-domain-connect.c [HAVE_SYS_UIO_H]: Include <sys/uio.h>.
404
405         * assuan-handler.c: Include <errno.h>.
406
407 2004-06-08  Marcus Brinkmann  <marcus@g10code.de>
408
409         * assuan-buffer.c (assuan_write_line): If the line is longer than
410         the maximum line length, bail out early.
411
412 2004-04-21  Werner Koch  <wk@gnupg.org>
413
414         * assuan-socket-server.c (accept_connection_bottom): Save the pid
415         of the peer if it is available.
416         * assuan-socket-connect.c (assuan_socket_connect): Do not save the
417         dummy SERVED_PID arg.
418         * assuan-pipe-connect.c (do_finish): Don't wait if the pid is 0.
419         (assuan_pipe_connect2): Store the parents pid in the environment
420         of the child.
421         * assuan-pipe-server.c (assuan_init_pipe_server): Initialize the
422         peer's pid from the environment.
423         * assuan-connect.c (assuan_get_pid): Do not return 0 as a PID.
424
425 2004-04-19  Werner Koch  <wk@gnupg.org>
426
427         * assuan-socket-server.c, assuan-socket-connect.c: Includes
428         sys/types.h.  Reported by Michael Nottebrock.
429         * assuan-domain-connect.c: Ditto.
430
431 2004-04-13  Werner Koch  <wk@gnupg.org>
432
433         * assuan-util.c (_assuan_log_print_buffer): Relaxed quoting.
434         (_assuan_log_sanitized_string): Ditto.
435
436 2004-03-14  Werner Koch  <wk@gnupg.org>
437
438         * assuan-handler.c: Include <errno.h>.  Reported by Bernd Kuhls.
439
440 2004-02-18  Werner Koch  <wk@gnupg.org>
441
442         * libassuan-config.in: Ignore setting of --prefix.
443
444         * assuan-handler.c (assuan_get_data_fp): Fail with ENOSYS if we
445         can't implement this.
446
447 2004-02-15  Werner Koch  <wk@gnupg.org>
448
449         * memrchr.c (memrchr): Fixed implementation. Taken from gpgme.
450
451 2004-02-13  Werner Koch  <wk@gnupg.org>
452
453         * assuan-domain-connect.c: Removed the unneeded alloca.h.
454
455 2004-01-24  Werner Koch  <wk@gnupg.org>
456
457         * assuan-pipe-connect.c (assuan_pipe_connect2): New as an
458         extension of assuan_pipe_connect. Made the latter call this one.
459
460 2004-01-14  Werner Koch  <wk@gnupg.org>
461
462         * assuan-buffer.c (_assuan_cookie_write_data): Return the
463         requested size to indicate successful operation.  Fixes a spurious
464         bug we previously fixed using fflush().
465
466 2003-12-22  Werner Koch  <wk@gnupg.org>
467
468         * assuan.h (ASSUAN_Locale_Problem): Added.
469         * assuan-errors.c (assuan_strerror): Ditto.
470
471 2003-12-18  Werner Koch  <wk@gnupg.org>
472
473         * assuan.h (AssuanCommand): Clarified that these are now
474         deprecated and actually useless.
475         (assuan_error_t): Clarified and added ASSUAN_USER_ERROR_FIRST,
476         ASSUAN_USER_ERROR_LAST.
477
478 2003-12-16  Werner Koch  <wk@gnupg.org>
479
480         * assuan-buffer.c: Changed formatting of the debug output prefix.
481         * assuan-util.c (assuan_set_log_stream): Set global log stream if
482         it has not been done yet.
483         * assuan-logging.c (_assuan_set_default_log_stream): New.
484         (assuan_set_assuan_log_prefix): New.
485
486 2003-12-11  Werner Koch  <wk@gnupg.org>
487
488         * funopen.c (_assuan_funopen): Renamed from funopen, to keep the
489         name space clean and avoid duplicate definitions if another
490         library uses the same replacement.
491         * assuan-defs.h (funopen): Renamed prototype and add a macro.
492
493 2003-12-08  Werner Koch  <wk@gnupg.org>
494
495         * TODO: Removed.
496
497 2003-11-12  Werner Koch  <wk@gnupg.org>
498
499         * assuan-handler.c (process_request): Kludge to print better error
500         messages for gpg-error enabled programs.
501
502 2003-11-06  Werner Koch  <wk@gnupg.org>
503
504         * assuan.h (assuan_context_t): New.  Should be used in favor of
505         ASSUAN_CONTEXT.
506         (assuan_error_t): New. To be used instead of AssuanError.
507
508 2003-11-11  Moritz Schulte  <mo@g10code.com>
509
510         * assuan-socket-connect.c (assuan_socket_connect): Fix computation
511         of socket address length.
512
513 2003-08-13  Werner Koch  <wk@gnupg.org>
514
515         * assuan-inquire.c (assuan_inquire): Increase length of cmdbuf to
516         the Assuan limit.
517
518 2003-06-24  Werner Koch  <wk@gnupg.org>
519
520         * mkerrors: Kludge to print libgpg-error values in an easier
521         readable way.
522
523 2003-04-29  Werner Koch  <wk@gnupg.org>
524
525         * libassuan.m4: New. Based on libgrypt.m4.
526         * Makefile.am (m4data_DATA): New.
527
528         * assuan.h (AssuanCommand): Removed.
529
530         * assuan-handler.c: Remove the cmd_id element,
531         (assuan_register_command): Likewise.  Note that semantics changed.
532         (_assuan_register_std_commands): Adjusted.
533
534 2003-02-22  Neal H. Walfield  <neal@g10code.de>
535
536         * Makefile.am (bin_SCRIPTS): Renamed from bin_PROGRAMS.
537
538 2003-02-18  Neal H. Walfield  <neal@g10code.de>
539
540         * Makefile.am (libassuan_a_LIBADD): New variable.
541         * funopen.c: Move from ../common.
542         * isascii.c: Likewise.
543         * memrchr.c: Likewise.
544         * putc_unlocked.c: Likewise.
545         
546 2003-02-18  Neal H. Walfield  <neal@g10code.de>
547
548         * assuan-handler.c (_IO_cookie_io_functions_t): Remove.
549         (cookie_io_functions_t): Remove.
550         (fopencookie): Remove prototype.
551         (assuan_get_data_fp): Use funopen, not fopencookie.
552
553 2003-02-18  Neal H. Walfield  <neal@g10code.de>
554
555         * libassuan-config.in: New file.
556         * Makefile.am (bin_PROGRAMS): New variable.
557
558 2003-02-17  Neal H. Walfield  <neal@g10code.de>
559
560         * .cvsignore: New file.
561
562 2003-02-17  Neal H. Walfield  <neal@g10code.de>
563
564         * Makefile.am (lib_LIBRARIES): Use this instead of . . .
565         (noinst_LIBRARIES): . . . this.
566         (include_HEADERS): New variable.
567         (libassuan_a_SOURCES): Remove assuan.h, add assuan-logging.c.
568
569         * assuan.h (assuan_set_assuan_log_stream): New prototype.
570         (assuan_get_assuan_log_stream): Likewise.
571         (assuan_get_assuan_log_prefix): Likewise.
572         * assuan-logging.c: New file.
573
574         * assuan-buffer.c [HAVE_JNLIB_LOGGIN]: Do not include
575         "../jnlib/logging.h".
576         (my_log_prefix): Remove function.
577         (_assuan_read_line): Use assuan_get_assuan_log_prefix in lieu of
578         my_log_prefix.
579         (assuan_write_line): Likewise.
580         (_assuan_cookie_write_data): Likewise.
581         (_assuan_cookie_write_flush): Likewise.
582         * assuan-domain-connect.c (LOGERROR, LOGERROR1, LOGERROR2,
583         LOGERRORX):  Remove.
584         (LOG): New macro.
585         (domain_reader): Use it.
586         (domain_writer): Likewise.
587         (domain_sendfd): Likewise.
588         (domain_receivefd): Likewise.
589         (_assuan_domain_init): Likewise.
590         (assuan_domain_connect): Likewise.
591         * assuan-pipe-connect.c [HAVE_JNLIB_LOGGIN]: Do not include
592         "../jnlib/logging.h".
593         (LOGERROR, LOGERROR1, LOGERROR2, LOGERRORX):  Remove.
594         (LOG): New macro.
595         (assuan_pipe_connect): Use it.
596         * assuan-socket-connect.c [HAVE_JNLIB_LOGGIN]: Do not include
597         "../jnlib/logging.h".
598         (LOGERROR, LOGERROR1, LOGERROR2, LOGERRORX):  Remove.
599         (LOG): New macro.
600         (assuan_socket_connect): Use it.
601         (socket_reader): Remove dead code.
602         (socket_writer): Likewise.
603         * assuan-util.c [HAVE_JNLIB_LOGGIN]: Do not include
604         "../jnlib/logging.h".
605         (_assuan_log_sanitized_string): Use assuan_get_assuan_log_stream,
606         not jnlib.
607
608 2002-11-24  Neal H. Walfield  <neal@g10code.de>
609
610         * assuan.h (assuan_command_parse_fd): New prototype.
611         * assuan-handler.c (assuan_command_parse_fd): Rename from
612         parse_cmd_input_output.  Export.
613         (std_handler_input): Update to use assuan_command_parse_fd.
614         (std_handler_output): Likewise.
615
616 2002-11-24  Neal H. Walfield  <neal@g10code.de>
617
618         * assuan.h (assuan_sendfd): New prototype.
619         (assuan_receivefd): New prototype.
620         * assuan-buffer.c (assuan_sendfd): New function.
621         (assuan_receivefd): New function.
622         * assuan-handler.c (parse_cmd_input_output): Recognize incoming
623         file descriptors and act appropriately.
624         * assuan-defs.h (struct assuan_io): Add fields sendfd and
625         receivefd.
626         (struct assuan_context_s): Add fields pendingfds and
627         pendingfdscount.
628         * assuan-pipe-server.c (_assuan_new_context): Update IO to reflect
629         new features.
630         * assuan-domain-connect.c (do_deinit): Cleanup any unreceived file
631         descriptors.
632         (domain_reader): Receive file descriptors.
633         (domain_sendfd): New function.
634         (domain_receivefd): New function.
635         (_assuan_domain_init): Update initialization code to reflect new
636         features.
637
638 2002-11-24  Neal H. Walfield  <neal@g10code.de>
639
640         * assuan-domain-connect.c (do_finish): Remove.
641         (_assuan_domain_init): Use default handlers where possible.
642         Add an assert and update comments.
643         * assuan-domain-server.c (accept_connection): Remove.
644         (assuan_init_domain_server): Use default handlers where possible.
645         Put the server in pipe mode: it can only be used by a single
646         client.
647
648 2002-11-24  Neal H. Walfield  <neal@g10code.de>
649
650         * assuan.h: Add prototype for assuan_domain_connect and
651         assuan_init_domain_server.
652         * assuan-defs.h: Include <unistd.h>.
653         Add prototype for _assuan_domain_init.
654         * assuan-domain-connect.c: New file.
655         * assuan-domain-server.c: New file.
656         * Makefile.am (libassuan_a_SOURCES): Add assuan-domain-connect.c
657         and assuan-domain-server.c
658
659 2002-11-23  Neal H. Walfield  <neal@g10code.de>
660
661         * Makefile.am (libassuan_a_SOURCES): Add assuan-io.c.
662         * assuan-io.c: Restore.
663         (_assuan_simple_read): Rename from _assuan_read.
664         (_assuan_simple_write): Rename from _assuan_write.
665         * assuan-defs.h (_assuan_simple_read): New prototype.
666         (_assuan_simple_write): Likewise.
667         * assuan-pipe-server.c (pipe_reader): Remove.
668         (pipe_writer): Remove.
669         (_assuan_new_context): Initialize IO is with _assuan_simple_read
670         and _assuan_simple_write.
671         * assuan-socket-connect.c (socket_reader): Remove.
672         (socket_writer): Remove.
673         (assuan_socket_connect): Initialize IO is with _assuan_simple_read
674         and _assuan_simple_write.
675         * assuan-socket-server.c (io): New local variable.
676         (assuan_init_socket_server): Initialize CTX->io.
677         (assuan_init_connected_socket_server): Likewise.
678
679 2002-11-23  Neal H. Walfield  <neal@g10code.de>
680
681         * assuan-buffer.c (readline): Use memrchr.
682         (_assuan_read_line): Rewritten to use the string functions.
683
684 2002-11-20  Neal H. Walfield  <neal@g10code.de>
685
686         * assuan-socket-connect.c (assuan_socket_connect): Pass PF_LOCAL
687         to socket(), not AF_UNIX: it expects a PF_* macro and the former
688         is more portable.
689         (assuan_socket_connect): Use AF_LOCAL, not AF_UNIX which is more
690         POSIXy.
691
692 2002-11-20  Neal H. Walfield  <neal@g10code.de>
693
694         * assuan-defs.h (struct assuan_io): New structure.
695         (struct assuan_context_s): New field, io.
696         (_assuan_read): Depreciated.
697         (_assuan_write): Likewise.
698         * assuan-pipe-server.c: Include <unistd.h>.
699         (pipe_reader): New function.
700         (pipe_writer): Likewise.
701         (_assuan_new_context.IO): New local static.  Set to pipe_reader
702         and pipe_writer.  Use it to initialize new context.
703         * assuan-socket-connect.c (socket_reader): New function.
704         (socket_writer): New function.
705         (assuan_socket_connect.IO): New local static.  Set to socket_reader
706         and socket_writer.  Use it to initialize new context.
707         * assuan-buffer.c (writen): Take an ASSUAN_CONTEXT rather than a
708         file descriptor.  Do not use _assuan_write but the write method
709         in the supplied context.
710         (readline): Likewise for _assuan_read.
711         (assuan_write_line): When calling writen, pass CTX; not the file
712         descriptor directly.
713         (_assuan_cookie_write_data): Likewise.
714         (_assuan_cookie_write_flush): Likewise.
715         (_assuan_read_line): Likewise for readline.
716         * Makefile.am (libassuan_a_SOURCES): Remove assuan-io.c.
717         * assuan-io.c: Removed.
718
719 2002-11-10  Werner Koch  <wk@gnupg.org>
720
721         * assuan-pipe-connect.c (assuan_pipe_connect): Changed the order
722         of the dups to handle cases where we have already used fd 2 for
723         other things.
724
725 2002-10-31  Neal H. Walfield  <neal@g10code.de>
726
727         * assuan-util.c: Include <ctype.h>.
728         (_assuan_log_print_buffer): Elide the magic numbers preferring the
729         standard isfoo functions.  Use putc_unlocked where possible.
730         (_assuan_log_sanitized_string): Rewrite to use putc_unlocked and
731         the isfoo functions.
732
733 2002-09-05  Neal H. Walfield  <neal@g10code.de>
734
735         * assuan-defs.h (_assuan_read_wrapper): Depreciated.
736         * assuan-util.c (_assuan_read_wrapper): Removed.
737         * assuan-defs.h (_assuan_write_wrapper): Depreciated.
738         * assuan-util.c (_assuan_write_wrapper): Removed.
739         * assuan.h (assuan_set_io_fun): Depreciated.
740         * assuan-util.c (assuan_set_io_fun): Removed.
741
742         * assuan-defs.h (_assuan_read): New function.
743         (_assuan_write): Likewise.
744         * assuan-io.c: New file.
745
746         * assuan-buffer.c (writen): Use _assuan_write rather than doing
747         the work here.
748         (readline): Likewise for _assuan_read.
749
750         * Makefile.am (libassuan_a_SOURCES): Add assuan-io.c.
751
752 2002-08-16  Werner Koch  <wk@gnupg.org>
753
754         * assuan.h: Renamed Bad_Certificate_Path to Bad_Certificate_Chain.
755
756 2002-07-30  Werner Koch  <wk@gnupg.org>
757
758         Changed the license from GPL to LGPL.
759
760 2002-07-23  Werner Koch  <wk@gnupg.org>
761
762         * assuan-handler.c (_IO_cookie_io_functions_t): Define it here if
763         it does not exists.
764
765 2002-06-27  Werner Koch  <wk@gnupg.org>
766
767         * assuan-pipe-connect.c (assuan_pipe_connect): No special handling
768         for the log_fd and stderr.  Connect stderr to /dev/null if it
769         should not be retained.
770
771 2002-06-26  Werner Koch  <wk@gnupg.org>
772
773         * assuan-buffer.c (assuan_write_line): Make sure we never
774         accidently print an extra LF.
775
776 2002-05-23  Werner Koch  <wk@gnupg.org>
777
778         * assuan-util.c (assuan_set_io_func): New.
779         * assuan-buffer.c (writen, readline): Use the new functions
780         instead of pth.
781         * assuan-socket-server.c (accept_connection): Don't use the
782         pth_accept - using the assuan included accept code would be a bad
783         idea within Pth so we don't need a replacement function.
784
785 2002-05-22  Werner Koch  <wk@gnupg.org>
786
787         * assuan-socket-server.c (assuan_init_connected_socket_server): New.
788         (accept_connection): Factored most code out to..
789         (accept_connection_bottom): .. new function.
790
791 2002-04-04  Werner Koch  <wk@gnupg.org>
792
793         * assuan-buffer.c (my_log_prefix): New.  Use it for all i/o debug
794         output.
795
796 2002-03-06  Werner Koch  <wk@gnupg.org>
797
798         * assuan-client.c (_assuan_read_from_server): Detect END.
799         (assuan_transact): Pass it to the data callback.
800
801 2002-02-27  Werner Koch  <wk@gnupg.org>
802
803         * assuan-client.c (assuan_transact): Add 2 more arguments to
804         support status lines. Passing NULL yields the old behaviour.
805
806         * assuan-handler.c (process_request): Flush data lines send
807         without using the data fp.
808
809 2002-02-14  Werner Koch  <wk@gnupg.org>
810
811         * assuan-inquire.c (assuan_inquire): Check for a cancel command
812         and return ASSUAN_Canceled.  Allow for non-data inquiry.
813
814         * assuan.h: Add a few token specific error codes.
815
816 2002-02-13  Werner Koch  <wk@gnupg.org>
817
818         * assuan-defs.h (assuan_context_s): New var CLIENT_PID.
819         * assuan-pipe-server.c (_assuan_new_context): set default value.
820         * assuan-socket-server.c (accept_connection): get the actual pid.
821
822 2002-02-12  Werner Koch  <wk@gnupg.org>
823
824         * assuan-buffer.c (writen,readline) [USE_GNU_PT]: Use pth_read/write.
825         * assuan-socket-server.c (accept_connection) [USE_GNU_PTH]: Ditto.
826
827 2002-02-01  Marcus Brinkmann  <marcus@g10code.de>
828
829         * Makefile.am (MOSTLYCLEANFILES): New variable.
830
831 2002-01-23  Werner Koch  <wk@gnupg.org>
832
833         * assuan-socket-connect.c (LOGERRORX): and removed typo.
834
835 2002-01-22  Marcus Brinkmann  <marcus@g10code.de>
836
837         * assuan-socket-connect.c (LOGERRORX): Reverse arguments to fputs.
838
839 2002-01-21  Werner Koch  <wk@gnupg.org>
840
841         * assuan-connect.c: Move all except assuan_get_pid to...
842         * assuan-pipe-connect.c: this.
843         (assuan_pipe_disconnect): Removed.
844         (do_finish, do_deinit): New 
845         (assuan_pipe_connect): and set them into the context.
846         * assuan-socket-connect.c: New.
847         
848         * assuan-util.c (_assuan_log_sanitized_string): New.
849
850         * assuan-pipe-server.c (assuan_init_pipe_server): Factored most
851         code out to ...
852         (_assuan_new_context): new func.
853         (_assuan_release_context): New
854         * assuan-connect.c (assuan_pipe_connect): Use the new functions.
855
856 2002-01-20  Werner Koch  <wk@gnupg.org>
857
858         * assuan.h: Added Invalid Option error code.
859
860         * assuan-handler.c (std_handler_option): New.
861         (std_cmd_tbl): Add OPTION as standard command.
862         (assuan_register_option_handler): New.
863         (dispatch_command): Use case insensitive matching as a fallback.
864         (my_strcasecmp): New.
865
866 2002-01-19  Werner Koch  <wk@gnupg.org>
867
868         * assuan-buffer.c (_assuan_read_line): Add output logging.
869         (assuan_write_line): Ditto.
870         (_assuan_cookie_write_data): Ditto.
871         (_assuan_cookie_write_flush): Ditto.
872         * assuan-util.c (_assuan_log_print_buffer): New.
873         (assuan_set_log_stream): New.
874         (assuan_begin_confidential): New.
875         (assuan_end_confidential): New.
876
877         * assuan-defs.h: Add a few handler variables.
878         * assuan-pipe-server.c (assuan_deinit_pipe_server): Removed.
879         (deinit_pipe_server): New.
880         (assuan_deinit_server): New.  Changed all callers to use this.
881         * assuan-listen.c (assuan_accept): Use the accept handler.
882         * assuan-handler.c (process_request): Use the close Handler.
883         * assuan-socket-server.c: New.
884
885 2002-01-14  Werner Koch  <wk@gnupg.org>
886
887         * assuan-client.c (_assuan_read_from_server): Skip spaces after
888         the keyword.
889
890 2002-01-03  Werner Koch  <wk@gnupg.org>
891
892         * assuan-handler.c (assuan_set_okay_line): New.
893         (process_request): And use it here.
894
895 2002-01-02  Werner Koch  <wk@gnupg.org>
896
897         * assuan-inquire.c (init_membuf,put_membuf,get_membuf): Apply a
898         hidden 0 behind the buffer so that the buffer can be used as a
899         string in certain contexts.
900
901 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
902
903         * assuan-connect.c (assuan_pipe_connect): New argument
904         FD_CHILD_LIST.  Don't close those fds.
905         * assuan.h: Likewise for prototype.
906
907 2001-12-14  Werner Koch  <wk@gnupg.org>
908
909         * assuan-listen.c (assuan_close_input_fd): New.
910         (assuan_close_output_fd): New.
911         * assuan-handler.c (std_handler_reset): Always close them after a
912         reset command.
913         (std_handler_bye): Likewise.
914
915 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
916
917         * assuan-buffer.c (_assuan_read_line): New variable ATTICLEN, use
918         it to save the length of the attic line.
919         Rediddle the code a bit to make it more clear what happens.
920
921 2001-12-14  Marcus Brinkmann  <marcus@g10code.de>
922
923         * assuan-defs.h (LINELENGTH): Define as ASSUAN_LINELENGTH.
924         assuan.h: Define ASSUAN_LINELENGTH.
925
926 2001-12-13  Marcus Brinkmann  <marcus@g10code.de>
927
928         * assuan-buffer.c (assuan_read_line): Fix order of execution to
929         get correct return values.
930
931 2001-12-13  Werner Koch  <wk@gnupg.org>
932
933         * assuan-handler.c (assuan_get_active_fds): Fixed silly bug,
934         pretty obvious that nobody ever tested this function.
935
936 2001-12-12  Werner Koch  <wk@gnupg.org>
937
938         * assuan-connect.c (assuan_pipe_connect): Implemented the inital
939         handshake.
940         * assuan-client.c (read_from_server): Renamed to  
941         (_assuan_read_from_server): this and made external.
942
943         * assuan-listen.c (assuan_set_hello_line): New.
944         (assuan_accept): Use a custom hello line is available.
945
946         * assuan-buffer.c (assuan_read_line): New.
947         (assuan_pending_line): New.
948         (_assuan_write_line): Renamed to ..
949         (assuan_write_line): this, made public and changed all callers.
950
951 2001-12-04  Werner Koch  <wk@gnupg.org>
952
953         * assuan-connect.c (assuan_pipe_connect): Add more error reporting.
954         * assuan-client.c: New.
955
956         * assuan-inquire.c: New.
957         * assuan-handler.c (process_request): Check for nested invocations.
958
959 2001-11-27  Werner Koch  <wk@gnupg.org>
960
961         * assuan-handler.c (assuan_register_input_notify): New.
962         (assuan_register_output_notify): New.
963
964 2001-11-26  Werner Koch  <wk@gnupg.org>
965
966         * assuan.h: Added more status codes.
967
968 2001-11-25  Werner Koch  <wk@gnupg.org>
969
970         * assuan-handler.c (assuan_register_bye_notify)
971         (assuan_register_reset_notify)
972         (assuan_register_cancel_notify): New and call them from the
973         standard handlers.
974         (assuan_process): Moved bulk of function to ..
975         (process_request): .. new.
976         (assuan_process_next): One shot version of above.
977         (assuan_get_active_fds): New.
978
979 2001-11-24  Werner Koch  <wk@gnupg.org>
980
981         * assuan-connect.c (assuan_get_pid): New.
982
983         * assuan-buffer.c (_assuan_read_line): Deal with reads of more
984         than a line.
985         * assuan-defs.h: Add space in the context for this.
986
987         
988  Copyright 2001, 2002, 2006 Free Software Foundation, Inc.
989
990  This file is free software; as a special exception the author gives
991  unlimited permission to copy and/or distribute it, with or without
992  modifications, as long as this notice is preserved.
993
994  This file is distributed in the hope that it will be useful, but
995  WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
996  implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.