Patch from Jon Trowbridge <trow@ximian.com>:
[platform/upstream/dbus.git] / ChangeLog
1 2004-05-20  Kristian Høgsberg  <krh@redhat.com>
2
3         Patch from Jon Trowbridge <trow@ximian.com>:
4  
5         * bus/main.c (setup_reload_pipe): Added.  Creates a pipe and sets
6         up a watch that triggers a config reload when one end of the pipe
7         becomes readable.
8         (signal_handler): Instead of doing the config reload in our SIGHUP
9         handler, just write to the reload pipe and let the associated
10         watch handle the reload when control returns to the main loop.
11  
12         * bus/driver.c (bus_driver_handle_reload_config): Added.
13         Implements a ReloadConfig method for requesting a configuration
14         file reload via the bus driver.
15  
16 2004-05-19  Owen Fraser-Green  <owen@discobabe.net>
17
18         * HACKING: Updated release instructions concerning the wiki page.
19
20 2004-05-18  Kristian Høgsberg  <krh@redhat.com>
21
22         * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
23         filter against auth->allowed_mechs; we only add allowed mechs in
24         record_mechanisms().
25  
26         * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
27         ALLOWED_MECHS to auth-script format so we can set the list of
28         allowed mechanisms.
29  
30         * data/auth/client-out-of-mechanisms.auth-script: New test to
31         check client disconnects when it is out of mechanisms to try.
32  
33         * dbus/dbus-auth.c (process_command): Remove check for lines
34         longer that 1 MB; we only buffer up maximum 16 kB.
35  
36         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
37         dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
38         Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
39         assume there might be unused bytes.
40  
41         * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
42         client-out-of-mechs, it is handled in process_reject(). Move check
43         for max failures to send_rejected(), as it's a server-only thing.
44
45         * dbus/dbus-auth.c: Factor out protocol reply code into functions
46         send_auth(), send_data(), send_rejected(), send_error(),
47         send_ok(), send_begin() and send_cancel().
48
49 2004-05-17  Kristian Høgsberg  <krh@redhat.com>
50
51         Remove base64 encoding, replace with hex encoding. Original patch
52         from trow@ximian.com, added error handling.
53
54         * dbus/dbus-string.c (_dbus_string_base64_encode)
55         (_dbus_string_base64_decode): Remove.
56         (_dbus_string_hex_decode): Add end_return argument so we can
57         distinguish between OOM and invalid hex encoding.
58         (_dbus_string_test): Remove base64 tests and add test case for
59         invalid hex.
60
61         * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
62         Replace base64 with hex.
63
64         * test/data/auth/invalid-hex-encoding.auth-script: New test case
65         for invalid hex encoded data in auth protocol.
66
67 2004-05-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
68
69         * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
70         leak.
71
72 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
73
74         * mono/dbus-sharp.dll.config.in: Added for GAC
75         * mono/dbus-sharp.snk: Added for GAC
76         * mono/Assembly.cs.in: Added for GAC
77         * mono/Makefile.am: Changes for GAC installation        
78         * configure.in: Added refs for dbus-sharp.dll.config.in and
79         Assembly.cs.in. More fixes for mono testing
80         * mono/example/Makefile.am: Changed var to CSC
81         * Makefile.am: Changed flag name to DBUS_USE_CSC
82
83 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
84
85         * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
86         * mono/doc/*: Added documentation framework
87         * configure.in: Added monodoc check
88         * README: Added description of mono configure flags
89
90 2004-05-11  John (J5) Palmieri  <johnp@redhat.com>:
91
92         * doc/dbus-specification.xml: Added a "Required" column to the 
93         header fields table and changed the "zero or more" verbage in
94         the above paragraph to read "The header must contain the required 
95         named header fields and zero or more of the optional named header 
96         fields".
97         * test/data/invalid-messages/*.message: Added the required PATH 
98         named header field to the tests so that they don't fail on 
99         'Missing path field'
100
101 2004-05-07  John (J5) Palmieri  <johnp@redhat.com>
102
103         * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
104         the stack by implicitly defining variable and parameter types and
105         removing the hack of defining C pointers as python objects and later
106         casting them.
107
108 2004-05-02  Owen Fraser-Green  <owen@discobabe.net>
109
110         * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
111
112 2004-05-01  Owen Fraser-Green  <owen@discobabe.net>
113
114         * mono/DBusType/Dict.cs: Handle empty dicts
115         * mono/DBusType/Array.cs: Handle empty arrays
116         * mono/Arguments.cs: Handle empty arguments
117
118 2004-04-30  Owen Fraser-Green  <owen@discobabe.net>
119
120         * dbus-sharp.pc.in: Modified to include include Libs and Requires
121         field
122
123 2004-04-25  Kristian Høgsberg  <krh@redhat.com>
124
125         * test/data/valid-messages/standard-*.message: Update message
126         test scripts to new header field names.
127
128 2004-04-22  John (J5) Palmieri  <johnp@redhat.com>
129
130         * test/break-loader.c (randomly_do_n_things): tracked down buffer
131         overflow to times_we_did_each_thing array which would chop off the
132         first character of the failure_dir string. Increased the size of
133         the array to 7 to reflect the number of random mutation functions
134         we have.
135
136 2004-04-21  Kristian Høgsberg  <krh@redhat.com>
137
138         * dbus/dbus-server-unix.c (unix_finalize): Don't unref
139         unix_server->watch here, it is unreffed in disconnect.
140         (_dbus_server_new_for_tcp_socket): convert NULL host to
141         "localhost" here so we don't append NULL to address.
142         
143         * dbus/dbus-server.c (_dbus_server_test): Add test case for
144         various addresses, including tcp with no explicit host.
145
146 2004-04-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
147
148         * dbus/dbus-message.c (decode_header_data, decode_string_field):
149         fix incorrect setting of .name_offset in the HeaderField (it was
150         off by two bytes, positioned right after the name and typecode)
151
152         * bus/bus.c (bus_context_new, bus_context_unref): test before
153         calling dbus_server_free_data_slot and _dbus_user_database_unref
154         in case of an error.
155
156         * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
157         by libdbus-gtool.
158
159 2004-04-19  Kristian Høgsberg  <krh@redhat.com>
160
161         * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
162         _dbus_poll() instead of select().
163
164 2004-04-15  Jon Trowbridge  <trow@ximian.com>
165
166         * bus/main.c (signal_handler): Reload the configuration files
167         on SIGHUP.
168         (main): Set up our SIGHUP handler.
169
170         * bus/bus.c (struct BusContext): Store the config file, user and
171         fork flag in the BusContext.
172         (process_config_first_time_only): Added.  Contains the code
173         (previously in bus_context_new) for setting up the BusContext from
174         the BusConfigParser that should only be run the first time the
175         config files are read.
176         (process_config_every_time): Added.  Contains the code (previously
177         in bus_context_new) for setting up the BusContext from the
178         BusConfigParser that should be run every time the config files are
179         read.
180         (load_config): Added.  Builds a BusConfigParser from the config
181         files and passes the resulting structure off to
182         process_config_first_time_only (assuming this is the first time)
183         and process_config_every_time.
184         (bus_context_new): All of the config-related code has been moved
185         to process_config_first_time_only and process_config_every_time.
186         Now this function just does the non-config-related initializations
187         and calls load_config.
188         (bus_context_reload_config): Added.
189
190 2004-04-15  Olivier Andrieu  <oliv__a@users.sourceforge.net>
191
192         * bus/driver.c (bus_driver_handle_get_service_owner):
193         implement a GetServiceOwner method.
194         * doc/dbus-specification.xml: document it.
195         * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
196         
197         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
198         implement, using the bus GetServiceOwner method.
199
200         * test/glib/test-dbus-glib.c:
201         use dbus_gproxy_new_for_service_owner so that we can receive the
202         signal. 
203
204 2004-04-15  John (J5) Palmieri  <johnp@redhat.com>
205
206         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
207         dbus/dbus-message.c, dbus/dbus-protocol.h
208         (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
209
210         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
211         dbus/dbus-message.c, dbus/dbus-protocol.h
212         (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
213
214         * dbus/dbus-internals.c (_dbus_header_field_to_string):
215         DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
216         DBUS_HEADER_FIELD_SENDER resolves to "sender"
217
218         * doc/dbus-specification.xml (Header Fields Table):
219         s/SERVICE/DESTINATION
220         s/SENDER_SERVICE/SENDER
221
222
223 2004-04-14  Olivier Andrieu  <oliv__a@users.sourceforge.net>
224
225         * test/glib/test-dbus-glib.c (timed_exit): fail the test after
226         a few seconds.
227
228 2004-04-13  Michael Meeks  <michael@ximian.com>
229
230         * glib/dbus-gobject.c (handle_introspect): split out
231         (introspect_properties): this.
232         (handle_introspect): implement this.
233
234         * test/glib/Makefile.am: use the absolute path so the bus
235         daemon's chdir ("/") doesn't kill us dead.
236
237         * configure.in: subst ABSOLUTE_TOP_BUILDDIR
238
239 2004-04-12  Jon Trowbridge  <trow@ximian.com>
240
241         * bus/config-parser.c (struct BusConfigParser): Added
242         included_files field.
243         (seen_include): Added.  Checks whether or not a file has already
244         been included by any parent BusConfigParser.
245         (bus_config_parser_new): Copy the parent's included_files.
246         (include_file): Track which files have been included, and fail on
247         circular inclusions.
248         (process_test_valid_subdir): Changed printf to report if we are
249         testing valid or invalid conf files.
250         (all_are_equiv): Changed printf to be a bit clearer about
251         what we are actually doing.
252         (bus_config_parser_test): Test invalid configuration files.
253
254 2004-04-09  Jon Trowbridge  <trow@ximian.com>
255
256         * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
257         argument.  If non-null, the newly-constructed BusConfigParser will
258         be initialized with the parent's BusLimits instead of the default
259         values.
260         (include_file): When including a config file, pass in
261         the current parser as the parent and then copy the BusLimits
262         from the included BusConfigParser pack to the current parser.
263         (process_test_valid_subdir): Renamed from process_test_subdir.
264         (process_test_equiv_subdir): Added.  Walks through a directory,
265         descending into each subdirectory and loading the config files
266         it finds there.  If any subdirectory contains two config files
267         that don't produce identical BusConfigParser structs, fail.
268         For now, the BusConfigParser's BusPolicies are not compared.
269         (bus_config_parser_test): Call both process_test_valid_subdir and
270         process_test_equiv_subdir.
271
272         * bus/config-loader-libxml.c (bus_config_load): Take a parent
273         argument and pass it along to the call to bus_config_parser_new.
274         Also made a few small changes to allow this code to compile.
275
276         * bus/config-loader-expat.c (bus_config_load): Take a parent
277         argument and pass it along to the call to bus_config_parser_new.
278
279         * bus/bus.c (bus_context_new): Load the config file
280         with a NULL parent argument.
281
282 2004-03-29  Michael Meeks  <michael@ximian.com>
283
284         * glib/dbus-gobject.c (introspect_properties): split
285         out, fix mangled 'while' flow control.
286         (introspect_signals): implement.
287         (handle_introspect): update.
288
289 2004-03-29  Michael Meeks  <michael@ximian.com>
290
291         * glib/dbus-gobject.c (set_object_property): split out / 
292         re-work, use the property type, and not the message type(!)
293         (get_object_property): ditto.
294
295         * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
296         (dbus_gvalue_marshal): make this code re-usable, needed
297         for signals too, also on both proxy and server side.
298         Re-write for more efficiency / readability.
299
300 2004-03-29  Michael Meeks  <michael@ximian.com>
301
302         * dbus/dbus-message.c
303         (dbus_message_new_error_printf): impl.
304
305         * dbus/dbus-connection.c
306         (dbus_connection_unregister_object_path): fix warning.
307
308         * configure.in: fix no-mono-installed situation.
309
310 2004-03-27  Havoc Pennington  <hp@redhat.com>
311
312         Patch from Timo Teräs:
313         
314         * tools/dbus-send.c (main): if --print-reply, assume type is
315         method call; support boolean type args
316         
317         * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
318         bunch of memleak and logic bugs
319         
320 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
321
322         * mono/Arguments.cs:
323         * mono/Introspector.cs:
324         * mono/Handler.cs:
325         * mono/InterfaceProxy.cs:
326         * mono/Message.cs
327         * mono/ProxyBuilder.cs:
328         * mono/Service.cs:
329         Added InterfaceProxy class to avoid building proxies for every
330         object.
331
332         * dbus-message.h:
333         * dbus-message.c (dbus_message_append_args_valist)
334         (dbus_message_iter_get_object_path)
335         (dbus_message_iter_get_object_path_array)
336         (dbus_message_iter_append_object_path)
337         (dbus_message_iter_append_object_path_array):
338         Added object_path iter functions to handle OBJECT_PATH arguments
339         
340 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
341
342         First checkin of mono bindings.
343         * configure.in:
344         * Makefile.am:
345         Build stuff for the bindings
346         * dbus-sharp.pc.in: Added for pkgconfig
347         
348 2004-03-21  Havoc Pennington  <hp@redhat.com>
349
350         * test/test-service.c (main): remove debug spew
351
352 2004-03-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
353
354         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
355         arrays
356
357         * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
358         (dbus_message_iter_init_array_iterator)
359         (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
360         indicate whether the iterator is empty
361
362         * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
363         warnings
364
365 2004-03-19  Havoc Pennington  <hp@redhat.com>
366
367         * NEWS: 0.21 updates
368
369         * configure.in: 0.21
370
371         * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
372         
373         * python/Makefile.am: change to avoid dist of dbus_bindings.c so
374         you don't need pyrex to make dist
375
376         * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
377         sources; run moc
378         
379 2004-03-18  Richard Hult  <richard@imendio.com>
380
381         * dbus/dbus-message.c (dbus_message_get_auto_activation) 
382         (dbus_message_set_auto_activation): Add doxygen docs.
383
384 2004-03-16  Richard Hult  <richard@imendio.com>
385
386         * bus/activation.c: (bus_activation_service_created),
387         (bus_activation_send_pending_auto_activation_messages),
388         (bus_activation_activate_service):
389         * bus/activation.h:
390         * bus/dispatch.c: (bus_dispatch),
391         (check_nonexistent_service_auto_activation),
392         (check_service_auto_activated),
393         (check_segfault_service_auto_activation),
394         (check_existent_service_auto_activation), (bus_dispatch_test):
395         * bus/driver.c: (bus_driver_handle_activate_service):
396         * bus/services.c: (bus_registry_acquire_service):
397         * dbus/dbus-message.c: (dbus_message_set_auto_activation),
398         (dbus_message_get_auto_activation):
399         * dbus/dbus-message.h:
400         * dbus/dbus-protocol.h: Implement auto-activation.
401         
402         * doc/dbus-specification.xml: Add auto-activation to the spec.
403
404 2004-03-12  Olivier Andrieu  <oliv__a@users.sourceforge.net>
405
406         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
407         fix a bug with CUSTOM types.
408
409         * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
410         a unit test for this bug (used to fail).
411
412 2004-03-12  Mikael Hallendal  <micke@imendio.com>
413
414         * bus/activation.c:
415         (babysitter_watch_callback): notify all pending activations waiting for
416           the same exec that the activation failed.
417         (bus_activation_activate_service): shortcut the activation if we 
418           already waiting for the same executable to start up.
419
420 2004-03-12  Mikael Hallendal  <micke@imendio.com>
421
422         * bus/activation.c: 
423         - Added service file reloading. 
424           Each service files directory is kept in an hash table in 
425           BusActivation and each BusActivationEntry knows what .service-file it
426           was read from. So when you try to activate a service the bus will 
427           check if it's been updated, removed or if new .service-files has 
428           been installed.
429         - Test code at the bottom for the service file reloading.
430         * bus/test-main.c: (main):
431         * bus/test.h:
432         - added service reloading test.
433         * dbus/dbus-sysdeps.c: 
434         * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
435
436 2004-03-08  Michael Meeks  <michael@ximian.com>
437
438         * dbus/dbus-connection.c (_dbus_connection_block_for_reply): 
439         bail immediately if disconnected, to avoid busy loop.
440
441         * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
442         cleanup cut/paste/inefficiency.
443
444 2004-03-01  David Zeuthen  <david@fubar.dk>
445
446         * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
447         bug where args were used twice. This bug resulted in a segfault
448         on a Debian/PPC system when starting the messagebus daemon. Include
449         dbus-sysdeps.h for DBUS_VA_COPY
450
451         * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
452
453         * configure.in: Check for va_copy; define DBUS_VA_COPY to the
454         appropriate va_copy implementation. From GLib
455         
456 2004-02-24  Joe Shaw  <joe@ximian.com>
457
458         * bus/services.c (bus_registry_acquire_service): We need to pass
459         in the service name to dbus_set_error() to prevent a crash.
460
461 2003-12-26  Anders Carlsson  <andersca@gnome.org>
462
463         * AUTHORS: Reveal my True identity.
464
465 2003-12-17  Mikael Hallendal  <micke@imendio.com>
466
467         * dbus/dbus-message.c: (dbus_message_append_args_valist): 
468         - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
469
470 2003-12-13  Mikael Hallendal  <micke@imendio.com>
471
472         * doc/TODO: Added not about better error check of configuration files.
473
474 2003-12-02  Richard Hult  <richard@imendio.com>
475
476         * Update AFL version to 2.0 throughout the source files to reflect
477         the update that was done a while ago.
478
479 2003-12-02  Richard Hult  <richard@imendio.com>
480
481         * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
482         wrote_dict_key to FALSE on the iter that the dict is appended to,
483         just like when appending other types. Fixes a bug where a dict
484         couldn't be put inside a dict.
485         (dbus_message_iter_append_dict_key): Fix typo in warning message.
486         (message_iter_test, _dbus_message_test): Add test case for dict
487         inside dict.
488
489 2003-12-01  David Zeuthen  <david@fubar.dk>
490
491         * python/dbus.py: Add the actual message when calling the reciever
492         of a signal such that parameters can be inspected. Add the method
493         remove_signal_receiver
494         
495 2003-11-26  Mikael Hallendal  <micke@imendio.com>
496
497         * bus/*.[ch]:
498         * dbus/*.[ch]:
499         * glib/*.[ch]: Made ref functions return the pointer
500
501 2003-11-25  Zack Rusin  <zack@kde.org>
502
503         * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
504
505         * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer 
506         wrappers,
507
508         * qt/connection.h, qt/connection.cpp: Adjusting to changes in 
509         the Integrator and to better fit with the server,
510
511 2003-11-24  Zack Rusin  <zack@kde.org>
512
513         * qt/connection.h, qt/connection.cpp: removing initDbus method since
514         the integrator handles it now
515
516         * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
517         since QTimer wasn't really meant to be used the way DBusTimeout is
518
519 2003-11-24  Zack Rusin  <zack@kde.org>
520
521         * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding 
522         Integrator class which integrates D-BUS with the Qt event loop,
523
524         * qt/connection.h, qt/connection.cpp: Move all the code which
525         was dealing with D-BUS integration to the Integrator class,
526         and start using Integrator,
527
528 2003-11-23  Zack Rusin  <zack@kde.org>
529
530         * qt/connection.h, qt/connection.cpp: Adding the DBusConnection 
531         wrapper
532
533         * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
534         switching namespaces to DBusQt, reworking the class,
535
536         * Makefile.cvs: switching dependencies so that it matches KDE 
537         schematics,
538         
539         * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to 
540         the library
541
542 2003-11-19  Havoc Pennington  <hp@redhat.com>
543
544         * NEWS: update
545
546         * configure.in: bump version to 0.20
547
548         * configure.in (have_qt): add yet another place to look for qt
549         (someone hand trolltech a .pc file...)
550
551 2003-11-01  Havoc Pennington  <hp@redhat.com>
552
553         * doc/dbus-specification.xml: add state machine docs on the auth
554         protocol; just a first draft, I'm sure it's wrong.      
555
556 2003-10-28  David Zeuthen  <david@fubar.dk>
557
558         * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
559         return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
560         
561 2003-10-28  Havoc Pennington  <hp@redhat.com>
562
563         * dbus/dbus-message.c (get_next_field): delete unused function
564
565 2003-10-28  Havoc Pennington  <hp@redhat.com>
566
567         * bus/expirelist.c (do_expiration_with_current_time): detect
568         failure of the expire_func due to OOM
569
570         * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
571
572         * bus/dispatch.c (check_send_exit_to_service): fix to handle the
573         NoReply error that's now created by the bus when the service exits
574
575 2003-10-28  Havoc Pennington  <hp@redhat.com>
576
577         * dbus/dbus-message.c (_dbus_message_test): enable and fix the
578         tests for set_path, set_interface, set_member, etc.
579
580         * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
581
582         * dbus/dbus-message.c (set_string_field): always just delete and
583         re-append the field; accept NULL for deletion
584         (re_align_fields_recurse): reimplement
585         
586 2003-10-26  Havoc Pennington  <hp@redhat.com>
587
588         * dbus/dbus-connection.c: fix docs to properly describe the
589         disconnected message
590         (_dbus_connection_notify_disconnected): remove this function; 
591         we can't synchronously add the disconnected message, we have to 
592         do it after we've queued any remaining real messages
593         (_dbus_connection_get_dispatch_status_unlocked): queue the
594         disconnect message only if the transport has finished queueing all
595         its real messages and is disconnected.
596         (dbus_connection_disconnect): update the dispatch status here
597
598 2003-10-22  Havoc Pennington  <hp@redhat.com>
599
600         * bus/bus.c (bus_context_check_security_policy): fix up assertion
601
602         * bus/connection.c (bus_transaction_send_from_driver): set the
603         destination to the connection's base service
604
605 2003-10-20  Havoc Pennington  <hp@redhat.com>
606
607         hmm, make check is currently not passing.
608         
609         * doc/dbus-specification.xml: add requirement that custom type
610         names follow the same rules as interface names.
611
612         * dbus/dbus-protocol.h: change some of the byte codes, to avoid
613         duplication and allow 'c' to be 'custom'; dict is now 'm' for
614         'map'
615
616         * doc/dbus-specification.xml: update type codes to match
617         dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
618         CUSTOM. Add type OBJECT_PATH to the spec.
619
620 2003-10-17  Havoc Pennington  <hp@redhat.com>
621
622         * bus/driver.c (create_unique_client_name): use "." as separator
623         in base service names instead of '-'
624
625         * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
626         byte at the end of the string
627
628         * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
629         optimization macros since string validation seems to be a slow
630         point.
631         
632         * doc/dbus-specification.xml: restrict valid
633         service/interface/member/error names. Add test suite code for the
634         name validation.
635
636         * dbus/dbus-string.c: limit service/interface/member/error names 
637         to [0-9][A-Z][a-z]_
638
639         * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
640         format arg to verbose spew
641
642         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
643         memory, return instead of g_error
644
645         * test/test-service.c (path_message_func): support emitting a
646         signal on request
647
648         * dbus/dbus-bus.c (init_connections_unlocked): only fill in
649         activation bus type if DBUS_BUS_ACTIVATION was set; default to
650         assuming the activation bus was the session bus so that services
651         started manually will still register.
652         (init_connections_unlocked): fix so that in OOM situation we get
653         the same semantics when retrying the function
654         
655         * test/test-service.c (main): change to use path registration, to
656         test those codepaths; register with DBUS_BUS_ACTIVATION rather
657         than DBUS_BUS_SESSION
658
659 2003-10-16  Havoc Pennington  <hp@redhat.com>
660
661         * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
662
663         * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
664         coverage of the tests
665         (coverage-report.txt): don't move the .da and .bbg files around
666
667 2003-10-16  Havoc Pennington  <hp@redhat.com>
668
669         * bus/bus.c (struct BusContext): remove struct field I didn't mean
670         to put there
671
672 2003-10-16  Havoc Pennington  <hp@redhat.com>
673
674         * bus/connection.c (bus_pending_reply_expired): either cancel or
675         execute, not both
676         (bus_connections_check_reply): use unlink, not remove_link, as we
677         don't want to free the link; fixes double free mess
678
679         * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
680         where no reply was received
681
682         * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
683         fix a refcount leak
684
685         * bus/signals.c (match_rule_matches): add special cases for the
686         bus driver, so you can match on sender/destination for it.
687
688         * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
689         DBUS_PRINT_BACKTRACE is set
690
691         * dbus/dbus-internals.c: add pid to assertion failure messages
692
693         * dbus/dbus-connection.c: add message type code to the debug spew
694
695         * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
696         sender=foo not service=foo
697
698         * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
699         session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use 
700         DBUS_ACTIVATION_ADDRESS instead
701
702         * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
703         DBUS_SYSTEM_BUS_ADDRESS if appropriate
704
705         * bus/bus.c (bus_context_new): handle OOM copying bus type into
706         context struct
707
708         * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
709         (dbus_message_iter_get_object_path_array): new function (half
710         finished, disabled for the moment)
711         
712         * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
713         DBUS_MESSAGE_TYPE_ERROR
714
715         * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
716         avoid redirecting stderr to /dev/null
717         (babysit): close stdin if not doing the "exit_with_session" thing
718
719         * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
720         debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
721         stdout/stdin, so things don't get confused
722         
723         * bus/system.conf.in: fix to allow replies, I modified .conf
724         instead of .conf.in again.
725
726 2003-10-14  David Zeuthen  <david@fubar.dk>
727
728         * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
729         argtype to arg_type when raising unknown arg type exception.
730         Changed type list to reflect the changes in dbus-protocol.h so 
731         the bindings actually work.
732
733 2003-10-14  Havoc Pennington  <hp@redhat.com>
734
735         * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
736         to have a bug keeping it from outputting the .da files sometimes
737         (string_get_string): don't append garbage nul bytes to the string.
738
739 2003-10-15  Seth Nickell  <seth@gnome.org>
740
741         * python/Makefile.am:
742
743         Include dbus_h_wrapper.h in the dist tarball.
744
745 2003-10-14  Havoc Pennington  <hp@redhat.com>
746
747         * bus/bus.c (bus_context_check_security_policy): revamp this to
748         work more sanely with new policy-based requested reply setup
749
750         * bus/connection.c (bus_transaction_send_from_driver): set bus
751         driver messages as no reply
752
753         * bus/policy.c (bus_client_policy_check_can_receive): handle a
754         requested_reply attribute on allow/deny rules
755
756         * bus/system.conf: add <allow requested_reply="true"/>
757
758         * bus/driver.c (bus_driver_handle_message): fix check for replies
759         sent to the bus driver, which was backward. How did this ever work
760         at all though? I think I'm missing something.
761
762         * dbus/dbus-message.c (decode_header_data): require error and
763         method return messages to have a reply serial field to be valid
764         (_dbus_message_loader_queue_messages): break up this function;
765         validate that reply serial and plain serial are nonzero; 
766         clean up the OOM/error handling.
767         (get_uint_field): don't return -1 from this
768         (dbus_message_create_header): fix signed/unsigned bug
769
770         * bus/connection.c (bus_connections_expect_reply): save serial of
771         the incoming message, not reply serial
772
773 2003-10-14  Havoc Pennington  <hp@redhat.com>
774
775         * bus/connection.c: implement pending reply tracking using
776         BusExpireList
777
778         * bus/bus.c (bus_context_check_security_policy): verify that a
779         reply is pending in order to allow a reply to be sent. Deny 
780         messages of unknown type.
781
782         * bus/dbus-daemon-1.1.in: update to mention new resource limits
783
784         * bus/bus.c (bus_context_get_max_replies_per_connection): new
785         (bus_context_get_reply_timeout): new
786
787 2003-10-13  Seth Nickell  <seth@gnome.org>
788
789         * python/Makefile.am:
790
791         Pass "make distcheck": remove a couple files from DIST_FILES
792         that weren't included in the final version.
793
794 2003-10-12  Havoc Pennington  <hp@pobox.com>
795
796         Added test code that 1) starts an actual bus daemon and 2) uses
797         DBusGProxy; fixed bugs that were revealed by the test. Lots 
798         more testing possible, but this is the basic framework.
799         
800         * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
801         empty proxy lists from the proxy list hash
802
803         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
804         couple of return_if_fail checks
805
806         * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
807         to allocate, so everything is cleared to NULL as it should be.
808
809         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
810         source as data to dbus_connection_set_timeout_functions() as the 
811         timeout functions expected
812
813         * test/glib/run-test.sh: add a little script to start up a message
814         bus and run tests using it
815
816         * tools/dbus-launch.1: updates
817
818         * tools/dbus-launch.c (main): add --config-file option
819
820         * tools/dbus-launch.c (main): remove confusing else if (runprog)
821         that could never be reached.
822
823         * dbus/dbus-message.c (dbus_message_new_method_return) 
824         (dbus_message_new_error, dbus_message_new_signal): set the
825         no-reply-expected flag on all these. Redundant, but may
826         as well be consistent.
827
828 2003-10-11  Havoc Pennington  <hp@pobox.com>
829
830         * test/decode-gcov.c (function_solve_graph): make broken block
831         graph a nonfatal error since it seems to be broken. Need to debug
832         this.
833
834         * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
835         can't just check type > INVALID < LAST anymore
836
837         * dbus/dbus-message.c (dbus_message_get_signature): new function
838         (dbus_message_has_signature): new function
839         (struct DBusMessage): add signature field (right now it isn't sent
840         over the wire, just generated on the fly)
841         (dbus_message_copy): copy the signature, and init strings to
842         proper length to avoid some reallocs
843         (dbus_message_iter_init_array_iterator): return void, since it
844         can't fail
845         (dbus_message_iter_init_dict_iterator): return void since it can't fail
846         (_dbus_message_loader_queue_messages): add silly temporary hack to
847         fill in message->signature on load
848
849         * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
850         characters, so they are relatively human-readable.
851
852 2003-10-11  Havoc Pennington  <hp@pobox.com>
853
854         * dbus/dbus-message.c (_dbus_message_test): add more test
855         coverage, but #if 0 for now since they uncover a bug 
856         not fixed yet; I think in re_align_field_recurse()
857         (re_align_field_recurse): add FIXME about broken assertion
858
859         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
860
861         * bus/connection.c: share a couple code bits with expirelist.c
862
863         * bus/expirelist.h, bus/expirelist.c: implement a generic
864         expire-items-after-N-seconds facility, was going to share between
865         expiring connections and replies, decided not to use for expiring
866         connections for now.
867
868         * COPYING: include AFL 2.0 (still need to change all the file headers)
869
870 2003-10-09  Havoc Pennington  <hp@redhat.com>
871
872         * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
873         gcc 3.3. Not that we do anything about it yet.
874
875         * bus/signals.c (bus_match_rule_parse): impose max length on the
876         match rule text
877
878         * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
879
880 2003-10-09  Havoc Pennington  <hp@redhat.com>
881
882         Make matching rules theoretically work (add parser).
883         
884         * bus/bus.c (bus_context_check_security_policy): fix up to handle
885         the case where destination is explicitly specified as bus driver
886         and someone else is eavesdropping.
887         
888         * bus/policy.c (bus_client_policy_check_can_receive): fix up
889         definition of eavesdropping and assertion
890
891         * tools/dbus-send.c (main): use dbus_message_type_from_string
892
893         * bus/signals.c (bus_match_rule_parse): implement
894
895         * dbus/dbus-message.c (dbus_message_type_from_string): new
896
897         * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
898
899 2003-10-02  Havoc Pennington  <hp@pobox.com>
900
901         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
902         dbus_gproxy_oneway_call
903
904         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main) 
905         (dbus_server_setup_with_g_main): fix to allow calling them more
906         than once on the same args
907         (dbus_bus_get_with_g_main): new function
908
909 2003-10-02  Havoc Pennington  <hp@redhat.com>
910
911         * doc/dbus-tutorial.xml: write some stuff
912
913 2003-09-29  Havoc Pennington  <hp@pobox.com>
914
915         * configure.in: split checks for Doxygen from XML docs, check for
916         xmlto
917
918         * doc/Makefile.am: XML-ify all the docs, and add a blank
919         dbus-tutorial.xml
920
921 2003-09-29  Havoc Pennington  <hp@pobox.com>
922
923         * Merge dbus-object-names branch. To see the entire patch 
924         do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
925         it's huuuuge though.
926         To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
927         
928 2003-09-28  Havoc Pennington  <hp@pobox.com>
929
930         * HACKING: update to reflect new server
931
932 2003-09-26  Seth Nickell  <seth@gnome.org>
933
934         * python/dbus.py:
935         * python/examples/example-signals.py:
936
937         Start implementing some notions of signals. The API
938         is really terrible, but they sort of work (with the
939         exception of being able to filter by service, and to
940         transmit signals *as* a particular service). Need to
941         figure out how to make messages come from the service
942         we registered :-(
943         
944         * python/dbus_bindings.pyx.in:
945
946         Removed duplicate message_handler callbacks.
947         
948 2003-09-25  Havoc Pennington  <hp@redhat.com>
949
950         * bus/session.conf.in: fix my mess
951
952 2003-09-25  Havoc Pennington  <hp@pobox.com>
953
954         * bus/session.conf.in: fix security policy, reported by Seth Nickell
955
956 2003-09-25  Seth Nickell  <seth@gnome.org>
957
958         * python/examples/example-service.py:
959
960         Johan notices complete wrong code in example-service, but
961         completely wrong in a way that works exactly the same (!).
962         Johan is confused, how could this possibly work? Example
963         code fails to serve purpose of making things clear.
964         Seth fixes.
965
966 2003-09-25  Mark McLoughlin  <mark@skynet.ie>
967
968         * doc/dbus-specification.sgml: don't require header fields
969         to be 4-byte aligned and specify that fields should be
970         distinguished from padding by the fact that zero is not
971         a valid field name.
972         
973         * doc/TODO: remove re-alignment item and add item to doc
974         the OBJECT_PATH type.
975         
976         * dbus/dbus-message.c:
977         (HeaderField): rename the original member to value_offset
978         and introduce a name_offset member to keep track of where
979         the field actually begins.
980         (adjust_field_offsets): remove.
981         (append_int_field), (append_uint_field),
982         (append_string_field): don't align the start of the header
983         field to a 4-byte boundary.
984         (get_next_field): impl finding the next marhsalled field
985         after a given field.
986         (re_align_field_recurse): impl re-aligning a number of
987         already marshalled fields.
988         (delete_field): impl deleting a field of any type and
989         re-aligning any following fields.
990         (delete_int_or_uint_field), (delete_string_field): remove.
991         (set_int_field), (set_uint_field): no need to re-check
992         that we have the correct type for the field.
993         (set_string_field): ditto and impl re-aligning any
994         following fields.
995         (decode_header_data): update to take into account that
996         the fields aren't 4-byte aligned any more and the new
997         way to distinguish padding from header fields. Also,
998         don't exit when there is too much header padding.
999         (process_test_subdir): print the directory.
1000         (_dbus_message_test): add test to make sure a following
1001         field is re-aligned correctly after field deletion.
1002         
1003         * dbus/dbus-string.[ch]:
1004         (_dbus_string_insert_bytes): rename from insert_byte and
1005         allow the insert of multiple bytes.
1006         (_dbus_string_test): test inserting multiple bytes.
1007
1008         * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
1009         warning note to docs about having to re-align any
1010         marshalled values following the string.
1011         
1012         * dbus/dbus-message-builder.c:
1013         (append_string_field), (_dbus_message_data_load):
1014         don't align the header field.
1015         
1016         * dbus/dbus-auth.c: (process_test_subdir): print the
1017         directory.
1018         
1019         * test/break-loader.c: (randomly_add_one_byte): upd. for
1020         insert_byte change.
1021         
1022         * test/data/invalid-messages/bad-header-field-alignment.message:
1023         new test case.
1024         
1025         * test/data/valid-messages/unknown-header-field.message: shove
1026         a dict in the unknown field.
1027
1028 2003-09-25  Seth Nickell  <seth@gnome.org>
1029
1030         * python/dbus.py:
1031         * python/dbus_bindings.pyx.in:
1032
1033         Handle return values.
1034         
1035         * python/examples/example-client.py:
1036         * python/examples/example-service.py:
1037
1038         Pass back return values from the service to the client.
1039         
1040 2003-09-24  Seth Nickell  <seth@gnome.org>
1041
1042         * python/dbus.py:
1043
1044         Connect Object methods (when you are sharing an object) up... pass
1045         in a list of methods to be shared. Sharing all the methods just
1046         worked out too weird. You can now create nice Services over the
1047         DBus in Python. :-)
1048         
1049         * python/dbus_bindings.pyx.in:
1050
1051         Keep references to user_data tuples passed into C functions so 
1052         Python doesn't garbage collect on us.
1053
1054         Implement MethodReturn and Error subclasses of Message for creating
1055         DBusMessage's of those types.
1056         
1057         * python/examples/example-client.py:
1058         * python/examples/example-service.py:
1059
1060         Simple example code showing both how create DBus services and objects,
1061         and how to use them.
1062
1063 2003-09-23  Havoc Pennington  <hp@pobox.com>
1064
1065         * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
1066
1067 2003-09-23  Havoc Pennington  <hp@redhat.com>
1068
1069         * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
1070         (dbus_gproxy_disconnect_signal): implement
1071         (dbus_gproxy_manager_remove_signal_match): implement
1072         (dbus_gproxy_manager_add_signal_match): implement
1073         (dbus_gproxy_oneway_call): implement
1074
1075 2003-09-23  Havoc Pennington  <hp@pobox.com>
1076
1077         * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
1078         subclass. This means dropping the transparent thread safety of the
1079         proxy; you now need a separate proxy per-thread, or your own
1080         locking on the proxy. Probably right anyway.
1081         (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
1082
1083 2003-09-22  Havoc Pennington  <hp@redhat.com>
1084
1085         * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
1086
1087 2003-09-21  Seth Nickell  <seth@gnome.org>
1088
1089         First checkin of the Python bindings.
1090         
1091         * python/.cvsignore:
1092         * python/Makefile.am:
1093         * python/dbus_bindings.pyx.in:
1094         * python/dbus_h_wrapper.h:
1095
1096         Pieces for Pyrex to operate on, building a dbus_bindings.so
1097         python module for low-level access to the DBus APIs.
1098         
1099         * python/dbus.py:
1100
1101         High-level Python module for accessing DBus objects.
1102
1103         * configure.in:
1104         * Makefile.am:
1105
1106         Build stuff for the python bindings.
1107
1108         * acinclude.m4:
1109
1110         Extra macro needed for finding the Python C header files.
1111
1112 2003-09-21  Havoc Pennington  <hp@pobox.com>
1113
1114         * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
1115         implementing the proxy manager, didn't get very far.
1116
1117         * dbus/dbus-bus.c (dbus_bus_add_match): new
1118         (dbus_bus_remove_match): new
1119
1120         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
1121         path_name argument; adjust the other not-yet-implemented 
1122         gproxy constructors to be what I think they should be.
1123
1124 2003-09-21  Havoc Pennington  <hp@pobox.com>
1125
1126         * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
1127         by default for message bus connections.
1128
1129         * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
1130         exit_on_disconnect flag is set and we process the disconnected
1131         signal.
1132         (dbus_connection_set_exit_on_disconnect): new function
1133
1134 2003-09-21  Havoc Pennington  <hp@pobox.com>
1135
1136         Get matching rules mostly working in the bus; only actually
1137         parsing the rule text remains. However, the client side of
1138         "signal connections" hasn't been started, this patch is only the
1139         bus side.
1140         
1141         * dbus/dispatch.c: fix for the matching rules changes
1142         
1143         * bus/driver.c (bus_driver_handle_remove_match)
1144         (bus_driver_handle_add_match): send an ack reply from these
1145         method calls
1146
1147         * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
1148         arguments, reported by Seth Nickell
1149
1150         * bus/config-parser.c (append_rule_from_element): support
1151         eavesdrop=true|false attribute on policies so match rules 
1152         can be prevented from snooping on the system bus.
1153
1154         * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
1155         and "destination" in attribute names; fix some docs bugs; 
1156         add eavesdrop=true|false attribute
1157
1158         * bus/driver.c (bus_driver_handle_add_match)
1159         (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
1160         messages
1161
1162         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
1163         rid of broadcast service concept, signals are just always broadcast
1164
1165         * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
1166         mostly implement matching rules stuff (currently only exposed as signal
1167         connections)
1168
1169 2003-09-21  Mark McLoughlin  <mark@skynet.ie>
1170
1171         * doc/dbus-specification.sgml: Change the header field name
1172         to be an enum and update the rest of the spec to reference
1173         the fields using the conventinal name.
1174
1175         * dbus/dbus-protocol.h: update to reflect the spec.
1176
1177         * doc/TODO: add item to remove the 4 byte alignment requirement.
1178         
1179         * dbus/dbus-message.c: Remove the code to generalise the
1180         header/body length and serial number header fields as named
1181         header fields so we can reference field names using the 
1182         protocol values.
1183         (append_int_field), (append_uint_field), (append_string_field):
1184         Append the field name as a byte rather than four chars.
1185         (delete_int_or_uint_field), (delete_string_field): reflect the
1186         fact that the field name and typecode now occupy 4 bytes instead
1187         of 8.
1188         (decode_string_field), (decode_header_data): update to reflect
1189         protocol changes and move the field specific encoding from
1190         decode_string_field() back into decode_header_data().
1191         
1192         * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
1193         Add utility to aid debugging.
1194         
1195         * dbus/dbus-message-builder.c:
1196         (append_string_field), (_dbus_message_data_load): Update to
1197         reflect protocol changes; Change the FIELD_NAME directive
1198         to HEADER_FIELD and allow it to take the field's conventional
1199         name rather than the actual value.
1200         
1201         * test/data/*/*.message: Update to use HEADER_FIELD instead
1202         of FIELD_NAME; Always align the header on an 8 byte boundary
1203         *before* updating the header length.
1204
1205 2003-09-15  Havoc Pennington  <hp@pobox.com>
1206
1207         * dbus/dbus-pending-call.c: add the get/set object data
1208         boilerplate as for DBusConnection, etc. Use generic object data
1209         for the notify callback.
1210
1211         * glib/dbus-gparser.c (parse_node): parse child nodes
1212
1213         * tools/dbus-viewer.c: more hacking on the dbus-viewer
1214         
1215         * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
1216         contain functions shared between the convenience lib and the
1217         installed lib
1218
1219         * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
1220         -export-symbols-regex to the GLib library
1221
1222         * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
1223         fix the locking in here, and add a default handler for
1224         Introspect() that just returns sub-nodes.
1225
1226 2003-09-14  Havoc Pennington  <hp@pobox.com>
1227
1228         * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
1229         rather than gfoo consistent
1230
1231         * glib/dbus-gproxy.h: delete for now, move contents to
1232         dbus-glib.h, because the include files don't work right since we
1233         aren't in the dbus/ subdir.
1234         
1235         * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
1236         (dbus_gproxy_end_call): finish
1237         (dbus_gproxy_begin_call): finish
1238
1239         * glib/dbus-gmain.c (dbus_set_g_error): new
1240
1241         * glib/dbus-gobject.c (handle_introspect): include information
1242         about child nodes in the introspection
1243
1244         * dbus/dbus-connection.c (dbus_connection_list_registered): new
1245         function to help in implementation of introspection
1246
1247         * dbus/dbus-object-tree.c
1248         (_dbus_object_tree_list_registered_and_unlock): new function
1249
1250 2003-09-12  Havoc Pennington  <hp@pobox.com>
1251
1252         * glib/dbus-gidl.h: add common base class for all the foo_info
1253         types
1254
1255         * tools/dbus-viewer.c: add GTK-based introspection UI thingy
1256         similar to kdcop
1257
1258         * test/Makefile.am: try test srcdir -ef . in addition to test
1259         srcdir = ., one of them should work (yeah lame)
1260         
1261         * glib/Makefile.am: build the "idl" parser stuff as a convenience
1262         library
1263         
1264         * glib/dbus-gparser.h: make description_load routines return
1265         NodeInfo* not Parser*
1266
1267         * Makefile.am (SUBDIRS): build test dir after all library dirs
1268
1269         * configure.in: add GTK+ detection
1270
1271 2003-09-07  Havoc Pennington  <hp@pobox.com>
1272
1273         * Make Doxygen contented.
1274
1275 2003-09-07  Havoc Pennington  <hp@pobox.com>
1276
1277         * doc/dbus-specification.sgml: more updates
1278
1279 2003-09-06  Havoc Pennington  <hp@pobox.com>
1280
1281         * doc/dbus-specification.sgml: partial updates
1282
1283         * bus/dbus-daemon-1.1.in: fix the config file docs for the
1284         zillionth time; hopefully I edited the right file this time.
1285
1286         * bus/config-parser.c (append_rule_from_element): support
1287         send_type, send_path, receive_type, receive_path
1288
1289         * bus/policy.c: add message type and path to the list of things
1290         that can be "firewalled"
1291
1292 2003-09-06  Havoc Pennington  <hp@pobox.com>
1293
1294         * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
1295         (dbus_connection_register_object_path): make this not handle
1296         messages to paths below the given path
1297
1298 2003-09-03  Havoc Pennington  <hp@pobox.com>
1299
1300         * test/glib/Makefile.am: add this with random glib-linked test
1301         programs
1302
1303         * glib/Makefile.am: remove the random test programs from here,
1304         leave only the unit tests
1305
1306         * glib/dbus-gobject.c (_dbus_gobject_test): add test for 
1307         uscore/javacaps conversion, and fix     
1308         (get_object_property, set_object_property): change to .NET
1309         convention for mapping props to methods, set_FooBar/get_FooBar, 
1310         since one language has such a convention we may as well copy it. 
1311         Plus real methods in either getFooBar or get_foo_bar style won't 
1312         collide with this convention.
1313
1314 2003-09-01  Havoc Pennington  <hp@pobox.com>
1315
1316         * glib/dbus-gparser.c: implement
1317
1318         * glib/dbus-gobject.c: start implementing skeletons support
1319
1320         * configure.in: when disabling checks/assert, also define
1321         G_DISABLE_ASSERT and G_DISABLE_CHECKS
1322
1323 2003-09-01  Havoc Pennington  <hp@pobox.com>
1324
1325         * glib/Makefile.am: rearrange a bunch of files and get "make
1326         check" framework set up
1327
1328 2003-08-31  Havoc Pennington  <hp@pobox.com>
1329
1330         * fix build with --disable-tests
1331
1332 2003-08-30  Havoc Pennington  <hp@pobox.com>
1333
1334         * dbus/dbus-connection.c: purge DBusMessageHandler
1335
1336         * dbus/dbus-message-handler.c: remove DBusMessageHandler, just 
1337         use callbacks everywhere
1338
1339 2003-08-30  Havoc Pennington  <hp@pobox.com>
1340
1341         * test/data/valid-config-files/system.d/test.conf: change to 
1342         root for the user so warnings don't get printed
1343
1344         * dbus/dbus-message.c: add dbus_message_get_path,
1345         dbus_message_set_path
1346         
1347         * dbus/dbus-object-tree.c (do_test_dispatch): add test of
1348         dispatching to a path
1349
1350         * dbus/dbus-string.c (_dbus_string_validate_path): add
1351
1352         * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
1353         (_dbus_marshal_object_path): implement
1354
1355         * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field 
1356         to contain the path to the target object
1357         (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
1358         DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
1359
1360 2003-08-30  Havoc Pennington  <hp@pobox.com>
1361
1362         * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
1363
1364 2003-08-29  Havoc Pennington  <hp@pobox.com>
1365
1366         * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
1367         registered
1368         (struct DBusObjectSubtree): shrink this
1369         a lot, since we may have a lot of them
1370         (_dbus_object_tree_free_all_unlocked): implement
1371         (_dbus_object_tree_dispatch_and_unlock): implement
1372
1373 2003-08-29  Havoc Pennington  <hp@pobox.com>
1374
1375         * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
1376
1377 2003-08-28  Havoc Pennington  <hp@pobox.com>
1378
1379         purge DBusObjectID
1380         
1381         * dbus/dbus-connection.c: port to no ObjectID, create a
1382         DBusObjectTree, rename ObjectTree to ObjectPath in public API
1383
1384         * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete 
1385         everything except UnregisterFunction and MessageFunction
1386         
1387         * dbus/dbus-marshal.c: port away from DBusObjectID, 
1388         add DBUS_TYPE_OBJECT_PATH
1389         
1390         * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc], 
1391         dbus/dbus-objectid.[hc]: remove these, we are moving to 
1392         path-based object IDs
1393
1394 2003-08-25  Havoc Pennington  <hp@pobox.com>
1395
1396         Just noticed that dbus_message_test is hosed, I wonder when I
1397         broke that. I thought make check was passing earlier...
1398         
1399         * dbus/dbus-object-tree.c: add new "object tree" to match DCOP 
1400         container tree, will replace most of dbus-object-registry
1401
1402         * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
1403         screwup
1404
1405 2003-08-19  Havoc Pennington  <hp@pobox.com>
1406
1407         * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
1408         (dbus_message_is_error): fix this function
1409
1410         * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
1411         match
1412
1413         * bus/policy.c (bus_client_policy_check_can_receive): fix code to
1414         reflect clarified man page
1415         (bus_client_policy_check_can_send): ditto
1416         
1417         * bus/session.conf.in: fixup
1418
1419         * bus/system.conf.in: fixup
1420
1421 2003-08-18  Havoc Pennington  <hp@redhat.com>
1422
1423         * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
1424
1425         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
1426         dumb bug created earlier (wrong order of args to
1427         decode_header_data())
1428         
1429         * tools/dbus-send.c: port
1430
1431         * tools/dbus-print-message.c (print_message): port
1432
1433         * test/data/*messages: port all messages over
1434         
1435         * dbus/dbus-message-builder.c: support including 
1436         message type
1437         
1438         * bus/driver.c: port over
1439         
1440         * bus/dispatch.c: port over to new stuff
1441
1442         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1443         rename disconnect signal to "Disconnected"
1444
1445 2003-08-17  Havoc Pennington  <hp@pobox.com>
1446
1447         This doesn't compile yet, but syncing up so I can hack on it from
1448         work. What are branches for if not broken code? ;-)
1449         
1450         * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
1451         DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
1452         DBUS_HEADER_FIELD_ERROR_NAME
1453         
1454         * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
1455         for the interface+member pairs
1456         (string_hash): change to use g_str_hash algorithm
1457         (find_direct_function, find_string_function): refactor these to
1458         share most code.
1459         
1460         * dbus/dbus-message.c: port all of this over to support 
1461         interface/member fields instead of name field
1462
1463         * dbus/dbus-object-registry.c: port over
1464         
1465         * dbus/dbus-string.c (_dbus_string_validate_interface): rename
1466         from _dbus_string_validate_name
1467
1468         * bus/dbus-daemon-1.1: change file format for the 
1469         <deny>/<allow> stuff to match new message naming scheme
1470
1471         * bus/policy.c: port over
1472
1473         * bus/config-parser.c: parse new format
1474         
1475 2003-08-16  Havoc Pennington  <hp@pobox.com>
1476
1477         * dbus/dbus-object-registry.c (add_and_remove_objects): remove
1478         broken assertion
1479
1480         * glib/dbus-gproxy.c: some hacking
1481
1482 2003-08-15  Havoc Pennington  <hp@redhat.com>
1483
1484         * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
1485
1486         * dbus/dbus-connection.c
1487         (dbus_connection_send_with_reply_and_block): factor out internals;
1488         change to convert any error replies to DBusError instead of 
1489         returning them as a message
1490
1491 2003-08-15  Havoc Pennington  <hp@pobox.com>
1492
1493         * dbus/dbus-connection.c, 
1494         dbus/dbus-pending-call.c: Finish the pending call stuff
1495
1496 2003-08-14  Havoc Pennington  <hp@redhat.com>
1497
1498         * dbus/dbus-pending-call.c: start on new object that will replace
1499         DBusMessageHandler and ReplyHandlerData for tracking outstanding
1500         replies
1501
1502         * dbus/dbus-gproxy.c: start on proxy object used to communicate
1503         with remote interfaces
1504
1505         * dbus/dbus-gidl.c: do the boring boilerplate in here
1506         
1507 2003-08-12  Havoc Pennington  <hp@pobox.com>
1508
1509         * bus/dispatch.c (bus_dispatch): make this return proper 
1510         DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
1511
1512         * dbus/dbus-errors.c (dbus_set_error): use
1513         _dbus_string_append_printf_valist
1514
1515         * dbus/dbus-string.c (_dbus_string_append_printf_valist)
1516         (_dbus_string_append_printf): new
1517
1518         * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
1519         UNKNOWN_METHOD
1520
1521         * dbus/dbus-connection.c (dbus_connection_dispatch): handle
1522         DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
1523         message is unhandled.
1524
1525 2003-08-11  Havoc Pennington  <hp@pobox.com>
1526
1527         * bus/test.c (client_disconnect_handler): change to return
1528         HANDLED (would have been REMOVE_MESSAGE)
1529
1530         * dbus/dbus-object.h (enum DBusHandlerResult): rename to
1531         HANDLED/NOT_YET_HANDLED instead of
1532         REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it 
1533         should be used.
1534
1535 2003-08-10  Havoc Pennington  <hp@pobox.com>
1536
1537         * tools/dbus-send.c (main): add --type argument, for now
1538         supporting only method_call and signal types.
1539
1540         * tools/dbus-print-message.c: print message type
1541
1542         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
1543         init connection->objects
1544
1545         * doc/dbus-specification.sgml: fix sgml
1546
1547         * bus/*.c: port over to object-instance API changes
1548
1549         * test/test-service.c: ditto
1550         
1551         * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
1552         name, we will have to fix up the rest of the code to also handle
1553         this
1554         (dbus_message_new): generic message-creation call
1555         (set_string_field): allow appending name field
1556
1557 2003-08-06  Havoc Pennington  <hp@pobox.com>
1558
1559         * dbus/dbus-object-registry.c: implement signal connection 
1560         and dispatch
1561
1562         * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
1563
1564         * dbus/dbus-internals.c (_dbus_memdup): new function
1565
1566 2003-08-02  Havoc Pennington  <hp@pobox.com>
1567
1568         * dbus/dbus-message.c (dbus_message_get_no_reply)
1569         (dbus_message_set_no_reply): add these and remove
1570         set_is_error/get_is_error
1571
1572         * dbus/dbus-protocol.h, doc/dbus-specification.sgml: 
1573         remove the ERROR flag, since there's now an ERROR type
1574
1575 2003-08-01  Havoc Pennington  <hp@pobox.com>
1576
1577         * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
1578         implement
1579
1580         * dbus/dbus-message.c (dbus_message_get_type): new function
1581
1582         * doc/dbus-specification.sgml: add "type" byte to messages
1583
1584 2003-08-01  Havoc Pennington  <hp@pobox.com>
1585
1586         * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
1587         a message type enum to distinguish kinds of message
1588         (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message 
1589         that need not be replied to
1590
1591 2003-08-01  Havoc Pennington  <hp@pobox.com>
1592
1593         * dbus/dbus-marshal.c: adapt to DBusObjectID changes
1594         (unpack_8_octets): fix no-64-bit-int bug
1595
1596         * dbus/dbus-object-registry.c (validate_id): validate the 
1597         connection ID bits, not just the instance ID.
1598
1599         * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
1600         the connection-global 33 bits of the object ID
1601
1602         * dbus/dbus-object-registry.c (info_from_entry): fill in 
1603         object ID in the new way
1604
1605         * dbus/dbus-objectid.h: rather than high/low bits, specifically 
1606         define server/client/instance bits.
1607
1608 2003-07-30  Havoc Pennington  <hp@pobox.com>
1609
1610         * dbus/dbus-connection.c (dbus_connection_register_object): fix
1611         build
1612
1613 2003-07-13  Havoc Pennington  <hp@pobox.com>
1614
1615         * dbus/dbus-object.h (struct DBusObjectVTable): add padding
1616         fields to DBusObjectVTable and DBusObjectInfo
1617
1618 2003-07-12  Havoc Pennington  <hp@pobox.com>
1619
1620         * dbus/dbus-object-registry.c: implement unit test,
1621         fix bugs discovered in process
1622
1623         * dbus/dbus-connection.c: remove handler_table and
1624         register_handler(), add DBusObjectRegistry usage
1625
1626         * dbus/dbus-objectid.c (dbus_object_id_is_null)
1627         (dbus_object_id_set_null): new functions
1628
1629 2003-07-08  Havoc Pennington  <hp@pobox.com>
1630
1631         * dbus/dbus-object.c: implement some of this
1632
1633         * dbus/dbus-object-registry.c
1634         (_dbus_object_registry_add_and_unlock): fill in the object_id out
1635         param
1636         (_dbus_object_registry_new): handle OOM
1637
1638 2003-07-08  Havoc Pennington  <hp@pobox.com>
1639
1640         * dbus/dbus-object.h: sketch out an API for registering objects
1641         with a connection, that allows us to use as little as 24 bytes
1642         per object and lets application code represent an object in 
1643         any conceivable way.
1644
1645         * dbus/dbus-object-registry.c: implement the hard bits of the
1646         DBusConnection aspect of object API. Not yet wired up.
1647         
1648 2003-07-06  Havoc Pennington  <hp@pobox.com>
1649
1650         * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
1651         (_dbus_marshal_object_id): new
1652         (_dbus_demarshal_object_id): new
1653         (_dbus_marshal_get_arg_end_pos): support object ID type, and
1654         consolidate identical switch cases. Don't conditionalize handling
1655         of DBUS_TYPE_UINT64, need to handle the type always.
1656         (_dbus_marshal_validate_arg): consolidate identical cases, and
1657         handle DBUS_TYPE_OBJECT_ID
1658
1659         * dbus/dbus-objectid.c: new file with DBusObjectID data type.
1660
1661         * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
1662
1663 2003-09-28  Havoc Pennington  <hp@pobox.com>
1664
1665         * real 0.13 release
1666
1667 2003-09-28  Havoc Pennington  <hp@pobox.com>
1668
1669         * doc/Makefile.am (dbus-specification.html): testing a funky hack
1670         to work with Debian db2html
1671
1672 2003-09-28  Havoc Pennington  <hp@pobox.com>
1673
1674         * configure.in: 0.13
1675
1676         * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
1677         stylesheet-images for benefit of Debian
1678         
1679         Change back to using filesystem-linked sockets for the system
1680         bus, so only root can create the default system bus address.
1681         
1682         * bus/system.conf.in: change to use
1683         DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1684
1685         * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
1686         from here.
1687
1688         * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
1689         here, and AC_DEFINE DBUS_SYSTEM_PATH
1690
1691 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
1692
1693         * doc/TODO:
1694         * doc/busconfig.dtd:
1695         Add busconfig DTD.
1696         
1697 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
1698
1699         * doc/dbus-specification.sgml:
1700         Add activation reply values.
1701         
1702 2003-08-05  Havoc Pennington  <hp@redhat.com>
1703
1704         * configure.in: 0.12
1705
1706 2003-08-05  Anders Carlsson  <andersca@codefactory.se>
1707
1708         * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
1709         (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
1710         (add_watch), (remove_watch), (create_source):
1711         Refcount fds, fixes some reentrancy issues.
1712         
1713 2003-07-30  Havoc Pennington  <hp@redhat.com>
1714
1715         * dbus/dbus-bus.c (init_connections_unlocked): fix default system
1716         bus address to be abstract if we have abstract sockets
1717
1718         * NEWS: update
1719
1720 2003-07-28  Havoc Pennington  <hp@redhat.com>
1721
1722         * bus/messagebus.in: fix to avoid processname/servicename 
1723         confusion, from Michael Kearey
1724         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
1725         
1726 2003-07-23  Havoc Pennington  <hp@pobox.com>
1727
1728         * dbus/dbus-message.c (dbus_message_iter_get_named): 
1729         fix from Andy Hanton to remove broken "+1"
1730
1731 2003-07-16  Havoc Pennington  <hp@pobox.com>
1732
1733         * tools/dbus-launch.c (babysit): close stdout/stderr in the
1734         babysitter process, as suggested by Thomas Leonard, so 
1735         an "eval `dbus-launch --exit-with-session`" will actually 
1736         return
1737
1738 2003-07-16  Havoc Pennington  <hp@pobox.com>
1739
1740         * configure.in: print out EXPANDED_* variables in the summary at
1741         the end; clean up the code that computes EXPANDED_ variables and
1742         get the ones using exec_prefix right. Should make things work
1743         when you build without --prefix
1744
1745 2003-06-29  Havoc Pennington  <hp@pobox.com>
1746
1747         * mono/Test.cs (class Test): fire up a main loop and run it
1748
1749         * mono/DBus.cs (DBus): don't g_thread_init since it can only be
1750         done once, the app has to do it
1751
1752 2003-06-26  Havoc Pennington  <hp@pobox.com>
1753
1754         * mono/Connection.cs: set up connection with the glib main loop
1755
1756 2003-07-01  Havoc Pennington  <hp@redhat.com>
1757
1758         * doc/dbus-specification.sgml: clarify the format of a type code,
1759         change suggested by Jim Blandy
1760
1761 2003-06-29  Miloslav Trmac  <mitr@volny.cz>
1762
1763         * doc/Makefile.am:
1764         * tools/Makefile.am: Don't assume srcdir == builddir.
1765
1766         * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
1767         the allocated block.
1768         (_dbus_memory_test): New function.
1769         * dbus/dbus-test.h: Add _dbus_memory_test ().
1770         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
1771
1772         * dbus/dbus-message.c (decode_header_data): Use %.4s instead
1773         of %c%c%c%c.
1774         (dbus_message_new): Remove obsolete @todo.
1775
1776         * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
1777         (_dbus_marshal_set_uint64): Fix comment.
1778
1779         * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
1780         hardcode FIELD_REPLY_SERIAL.
1781
1782         * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
1783         (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
1784
1785         * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
1786         and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
1787
1788 2003-06-24  Havoc Pennington  <hp@pobox.com>
1789
1790         * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
1791
1792 2003-06-23  Anders Carlsson  <andersca@codefactory.se>
1793
1794         * configure.in:
1795         * gcj/.cvsignore:
1796         * gcj/Hello.java:
1797         * gcj/Makefile.am:
1798         * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
1799         * gcj/org/.cvsignore:
1800         * gcj/org/Makefile.am:
1801         * gcj/org/freedesktop/.cvsignore:
1802         * gcj/org/freedesktop/Makefile.am:
1803         * gcj/org/freedesktop/dbus/.cvsignore:
1804         * gcj/org/freedesktop/dbus/Makefile.am:
1805         * gcj/org/freedesktop/dbus/Message.java: (Message),
1806         (Message.Message):
1807         * gcj/org/freedesktop/dbus/natMessage.cc:
1808         Fix the build system.
1809
1810 2003-06-22  Havoc Pennington  <hp@pobox.com>
1811
1812         * mono/Connection.cs: add more bindings
1813
1814         * dbus/dbus-threads.c (dbus_threads_init): allow calling this
1815         more than once.
1816
1817 2003-06-22  Havoc Pennington  <hp@pobox.com>
1818
1819         * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
1820         Start wrapping more stuff.
1821
1822 2003-06-22  Havoc Pennington  <hp@pobox.com>
1823
1824         * mono/Message.cs: implement Message.Wrap() that ensures we only
1825         have a single C# wrapper per DBusMessage, assuming it works which
1826         it probably doesn't.
1827
1828         * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
1829         (dbus_message_free_data_slot): new
1830         (dbus_message_set_data): new
1831         (dbus_message_get_data): new
1832
1833 2003-06-22  Havoc Pennington  <hp@pobox.com>
1834
1835         * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
1836         (_dbus_data_slot_allocator_alloc): rework these to keep a
1837         reference count on each slot and automatically manage a global
1838         slot ID variable passed in by address
1839
1840         * bus/bus.c: convert to new dataslot API
1841
1842         * dbus/dbus-bus.c: convert to new dataslot API
1843
1844         * dbus/dbus-connection.c: convert to new dataslot API
1845
1846         * dbus/dbus-server.c: convert to new dataslot API
1847
1848         * glib/dbus-gmain.c: ditto
1849
1850         * bus/test.c: ditto
1851
1852         * bus/connection.c: ditto
1853
1854 2003-06-22  Anders Carlsson  <andersca@codefactory.se>
1855
1856         * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
1857         after the gcj checks so that the correct configuration tags
1858         will be added to libtool.
1859
1860         * dbus-glib-1.pc.in: No need to specify any includes since
1861         dbus-1.pc.in has those.
1862
1863 2003-06-22  Havoc Pennington  <hp@pobox.com>
1864
1865         * mono/*, gcj/*, configure.in, Makefile.am:
1866         Check in makefiles and subdirs for mono and gcj bindings.
1867         Neither binding actually exists, just trying to get through
1868         all the build and other boring bits.
1869
1870 2003-06-21  Philip Blundell  <philb@gnu.org>
1871
1872         * tools/dbus-monitor.1: Updated.
1873
1874         * tools/dbus-send.1: Likewise.
1875
1876 2003-06-20  Anders Carlsson  <andersca@codefactory.se>
1877
1878         * dbus/dbus-transport-unix.c (unix_handle_watch): Check
1879         for hangup and error after checking read so we won't discard
1880         pending data if both hangup and read are set.
1881
1882 2003-06-19  Philip Blundell  <philb@gnu.org>
1883
1884         * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
1885
1886         * tools/dbus-send.c: Accept both --system and --session.
1887
1888         * tools/dbus-monitor.c: Same here.
1889
1890 2003-06-19  Anders Carlsson  <andersca@codefactory.se>
1891
1892         * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
1893         from C++ (Patch by Miloslav Trmac).
1894
1895 2003-06-15  Joe Shaw  <joe@assbarn.com>
1896
1897         * configure.in: Check for socklen_t.
1898
1899         * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
1900
1901         * test/test-segfault.c: Add #include <sys/time.h>
1902
1903         * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
1904         dbus-launch needs it.
1905
1906 2003-06-09  Havoc Pennington  <hp@redhat.com>
1907
1908         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
1909         SUN_LEN, it breaks abstract socket usage
1910
1911         * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
1912         starts of lines.
1913
1914 2003-06-04  Havoc Pennington  <hp@pobox.com>
1915
1916         * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
1917         using unix:abstract=/foo, and when listening in a tmpdir
1918         i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
1919
1920         * dbus/dbus-transport.c (_dbus_transport_open): support
1921         unix:abstract=/foo
1922
1923         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
1924         support abstract sockets
1925
1926         * dbus/dbus-transport-unix.c
1927         (_dbus_transport_new_for_domain_socket): support abstract sockets
1928
1929         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
1930         toggle as an argument, implement abstract namespace support
1931         (_dbus_listen_unix_socket): ditto
1932
1933         * configure.in: add --enable-abstract-sockets and implement
1934         a configure check for autodetection of the right value.
1935
1936 2003-06-01  Havoc Pennington  <hp@pobox.com>
1937
1938         * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
1939         in /tmp (though on Linux this will end up being useless,
1940         when we add abstract namespace support)
1941
1942         * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
1943         subst'ing it
1944
1945 2003-05-28  Colin Walters  <walters@verbum.org>
1946
1947         * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
1948
1949 2003-05-18  Anders Carlsson  <andersca@codefactory.se>
1950
1951         * dbus/dbus-message.c (dbus_message_new): Remove @todo.
1952
1953 2003-05-17  Colin Walters  <walters@gnu.org>
1954
1955         * tools/dbus-send.c: Don't exit with an error code if --help was
1956         passed.  Default to using the session bus instead of the system
1957         one.
1958
1959         * tools/dbus-launch.c: Ditto.
1960
1961         * tools/dbus-monitor.c: Ditto.
1962
1963         * tools/dbus-send.1: Update with new arguments.
1964
1965         * tools/dbus-launch.c: Emit code to export variables.  New
1966         arguments -s and -c to specify shell syntax, and a bit of code to
1967         autodetect syntax.  Also, allow specifying a program to run.
1968
1969         * tools/dbus-launch.1: Update with new arguments.
1970
1971         * tools/dbus-send.1: Ditto.
1972
1973         * tools/dbus-monitor.1: Ditto.
1974
1975 2003-05-17  Havoc Pennington  <hp@pobox.com>
1976
1977         * bus/config-parser.c (merge_included): merge in policies from
1978         child configuration file.
1979
1980         * bus/policy.c (bus_policy_merge): function to merge two policies
1981         together
1982
1983 2003-05-16  Havoc Pennington  <hp@redhat.com>
1984
1985         * dbus/dbus-connection.c: disable verbose lock spew
1986
1987         * tools/dbus-send.c: add --print-reply command line option
1988
1989         * tools/dbus-print-message.h (print_message): new util function
1990         shared by dbus-send and dbus-monitor
1991
1992         * tools/dbus-monitor.c (handler_func): exit on disconnect
1993
1994         * dbus/dbus-transport-unix.c (do_reading): if the transport is
1995         disconnected, don't try to use the read_watch
1996
1997         * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
1998         so we can find this bug more easily
1999
2000 2003-05-16  Havoc Pennington  <hp@redhat.com>
2001
2002         * bus/policy.c (free_rule_list_func): avoid a crash when passed
2003         NULL as DBusHashTable is annoyingly likely to do.
2004
2005 2003-05-16  Colin Walters  <walters@verbum.org>
2006
2007         * tools/dbus-monitor.c: Add --session argument and usage()
2008         function.
2009
2010         * tools/dbus-monitor.1: Update with new --session arg.
2011
2012         * bus/Makefile.am (install-data-hook): Create
2013         $(libdir)/dbus-1.0/services so that the session bus is happy.
2014
2015 2003-05-15  Havoc Pennington  <hp@redhat.com>
2016
2017         * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
2018         on non-x86. ifdef's are evil.
2019
2020 2003-05-15  Havoc Pennington  <hp@redhat.com>
2021
2022         * configure.in: 0.11
2023
2024         * NEWS: update
2025
2026         * bus/Makefile.am (initddir): apparently we are supposed to put
2027         init scripts in /etc/rc.d/init.d not /etc/init.d
2028
2029         * bus/Makefile.am: remove the "you must --enable-tests to make
2030         check" as it broke distcheck
2031
2032         * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
2033
2034 2003-05-13  James Willcox  <jwillcox@gnome.org>
2035
2036         * configure.in:
2037         * bus/activation.c: (bus_activation_service_created),
2038         (bus_activation_activate_service):
2039         * bus/driver.c: (bus_driver_send_service_deleted),
2040         (bus_driver_send_service_created), (bus_driver_send_service_lost),
2041         (bus_driver_send_service_acquired),
2042         (bus_driver_send_welcome_message),
2043         (bus_driver_handle_list_services):
2044         * bus/session.conf.in:
2045         * dbus/dbus-bus.c: (dbus_bus_acquire_service),
2046         (dbus_bus_service_exists), (dbus_bus_activate_service):
2047         * dbus/dbus-bus.h:
2048
2049         Add some convenience API which lets you activate a service, and did a
2050         bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
2051         and dbus_message_get_args()
2052
2053 2003-05-11  Havoc Pennington  <hp@pobox.com>
2054
2055         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
2056         calling _dbus_marshal_validate_arg() for every byte in a byte
2057         array, etc.
2058
2059         * dbus/dbus-message-handler.c: use atomic reference counting to
2060         reduce number of locks slightly; the global lock in here sucks
2061
2062         * dbus/dbus-connection.c
2063         (_dbus_connection_update_dispatch_status_and_unlock): variant of
2064         update_dispatch_status that can be called with lock held; then use
2065         in a couple places to reduce locking/unlocking
2066         (dbus_connection_send): hold the lock over the whole function
2067         instead of acquiring it twice.
2068
2069         * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
2070
2071         * bus/connection.c (bus_connections_setup_connection): fix access
2072         to already-freed memory.
2073
2074         * dbus/dbus-connection.c: keep a little cache of linked list
2075         nodes, to avoid using the global linked list alloc lock in the
2076         normal send-message case. Instead we just use the connection lock
2077         that we already have to take.
2078
2079         * dbus/dbus-list.c (_dbus_list_find_last): new function
2080
2081         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
2082         change to use a struct for the atomic type; fix docs,
2083         they return value before increment, not after increment.
2084
2085         * dbus/dbus-string.c (_dbus_string_append_4_aligned)
2086         (_dbus_string_append_8_aligned): new functions to try to
2087         microoptimize this operation.
2088         (reallocate_for_length): break this out of set_length(), to
2089         improve profile info, and also so we can consider inlining the
2090         set_length() part.
2091
2092         * dbus/dbus-message.c (dbus_message_new_empty_header): init data
2093         strings with some preallocation, cuts down on our calls to realloc
2094         a fair bit. Though if we can get the "move entire string to empty
2095         string" optimization below to kick in here, it would be better.
2096
2097         * dbus/dbus-string.c (_dbus_string_move): just call
2098         _dbus_string_move_len
2099         (_dbus_string_move_len): add a special case for moving
2100         an entire string into an empty string; we can just
2101         swap the string data instead of doing any reallocs.
2102         (_dbus_string_init_preallocated): new function
2103
2104 2003-05-11  Havoc Pennington  <hp@pobox.com>
2105
2106         Write a "test-profile" that does echo client-server with threads;
2107         profile reveals lock contention, memcpy/realloc of buffers, and
2108         UTF-8 validation as hot spots. 20% of lock contention eliminated
2109         with dbus_atomic_inc/dec implementation on x86.  Much remaining
2110         contention is global mempool locks for GList and DBusList.
2111
2112         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
2113         x86 implementation
2114
2115         * dbus/dbus-connection.c (struct DBusConnection): use
2116         dbus_atomic_t for the reference count
2117
2118         * dbus/dbus-message.c (struct DBusMessage): declare
2119         dbus_atomic_t values as volatile
2120
2121         * configure.in: code to detect ability to use atomic integer
2122         operations in assembly, from GLib patch
2123
2124         * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
2125         time, tired of it being wrong in threads and forked processes
2126
2127         * glib/test-profile.c: a little program to bounce messages back
2128         and forth between threads and eat CPU
2129
2130         * dbus/dbus-connection.c: add debug spew macros for debugging
2131         thread locks; include config.h at top; fix deadlock in
2132         dbus_connection_flush()
2133
2134 2003-05-08  Havoc Pennington  <hp@pobox.com>
2135
2136         * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
2137         data from getting written, and there wasn't a good reason to
2138         use _exit really.
2139
2140         * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
2141         dbus_verbose lines in test coverage
2142         (main): add list of functions sorted by # of untested blocks
2143         to the coverage report
2144
2145         * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
2146
2147         * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
2148
2149         * dbus/dbus-message-handler.c (_dbus_message_handler_test):
2150         extend test coverage
2151
2152         * test/data/auth/cancel.auth-script: test canceling an
2153         authentication
2154
2155         * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
2156         aren't used. in CVS history if we end up needing them.
2157
2158 2003-05-04  Havoc Pennington  <hp@pobox.com>
2159
2160         * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
2161         unit test
2162
2163         * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
2164         function, which assumed length was in # of strings, not bytes
2165
2166         * dbus/dbus-message.c (_dbus_message_test): add tests for some
2167         missing coverage
2168
2169         * dbus/dbus-connection.c
2170         (_dbus_connection_queue_received_message): disable function for
2171         now, we are only using it in test mode
2172
2173         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
2174         remove a mistaken FIXME
2175
2176 2003-05-04  Havoc Pennington  <hp@pobox.com>
2177
2178         * dbus/dbus-connection.c (dbus_connection_preallocate_send):
2179         unlock mutex on successful return, patch from Anders Gustafsson
2180
2181 2003-05-04  Havoc Pennington  <hp@pobox.com>
2182
2183         * dbus-glib-1.pc.in (Requires): fix dependencies, from
2184         Anders Gustafsson
2185
2186 2003-05-04  Havoc Pennington  <hp@pobox.com>
2187
2188         * tools/dbus-launch.c: implement
2189
2190         * bus/main.c (main), bus/bus.c (bus_context_new):
2191         implement --print-pid and --fork
2192
2193 2003-05-03  Havoc Pennington  <hp@redhat.com>
2194
2195         * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
2196         the address had no value, and add to test suite. Fix and
2197         regression test from Miloslav Trmac
2198
2199 2003-05-03  Havoc Pennington  <hp@pobox.com>
2200
2201         * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
2202         watch is invalid when handled
2203
2204         * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
2205         dbus-launch utility to launch the bus from a shell script.  Didn't
2206         actually implement dbus-launch yet, it's just a placeholder still.
2207
2208 2003-05-03  Havoc Pennington  <hp@pobox.com>
2209
2210         * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
2211         daemon; also documents daemon config file, so replaces
2212         doc/config-file.txt. Corrected some stuff from config-file.txt in
2213         the process of moving it.
2214
2215 2003-05-03  Havoc Pennington  <hp@pobox.com>
2216
2217         * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
2218         add some man pages
2219
2220 2003-05-03  Colin Walters  <walters@verbum.org>
2221
2222         * dbus/dbus-sysdeps.c (fill_user_info): Test against
2223         DBUS_UID_UNSET to determine whether to do a uid lookup or not.
2224
2225         * Makefile.am: Update to use new .pc versioning scheme.
2226
2227 2003-05-02  Havoc Pennington  <hp@redhat.com>
2228
2229         * bus/system.conf.in: allow send/receive to/from message bus
2230         service
2231
2232 2003-04-30  Havoc Pennington  <hp@redhat.com>
2233
2234         * configure.in: print a note when building with unit tests and
2235         without assertions
2236
2237 2003-04-30  Havoc Pennington  <hp@redhat.com>
2238
2239         * Makefile.am: add a check-local that complains if you didn't
2240         configure with --enable-tests
2241
2242 2003-04-29  Havoc Pennington  <hp@redhat.com>
2243
2244         * glib/dbus-gmain.c: docs cleanups
2245
2246         * dbus/dbus-types.h: add docs on int64 types
2247
2248         * dbus/dbus-memory.c: fix docs to avoid putting private API in
2249         public API docs section
2250
2251 2003-04-29  Havoc Pennington  <hp@redhat.com>
2252
2253         * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
2254         dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
2255         parallel install API version, not with the D-BUS package version.
2256
2257         * HACKING: move some of README over here
2258
2259         * README: updates, and document API/ABI policy
2260
2261         * configure.in: reindentation
2262
2263 2003-04-29  Havoc Pennington  <hp@redhat.com>
2264
2265         * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
2266         to use this library" to be sure people have the right
2267         expectations.
2268
2269 2003-04-28  Havoc Pennington  <hp@redhat.com>
2270
2271         * configure.in: add --enable-docs which by default is auto yes if
2272         doxygen and db2html found, no otherwise; but can be forced on/off
2273
2274         * doc/Makefile.am: conditionalize whether to build docs on
2275         --enable-docs
2276
2277 2003-04-28  Havoc Pennington  <hp@redhat.com>
2278
2279         * configure.in: 0.10
2280
2281         * NEWS: update
2282
2283         * bus/system.conf.in: add <includedir>system.d</includedir>
2284
2285         * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
2286         username was provided but not uid
2287
2288         * bus/config-parser.c (struct BusConfigParser): keep track of
2289         whether the parser is toplevel or was included; change some
2290         of the error handling if it's included.
2291
2292 2003-04-27  Havoc Pennington  <hp@pobox.com>
2293
2294         Unbreak my code...
2295
2296         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2297         report correct status if we finish processing authentication
2298         inside this function.
2299
2300         * bus/activation.c (try_send_activation_failure): use
2301         bus_transaction_send_error_reply
2302
2303         * bus/connection.c (bus_connection_get_groups): return an error
2304         explaining the problem
2305
2306         * bus/bus.c (bus_context_check_security_policy): implement
2307         restriction here that inactive connections can only send the
2308         hello message. Also, allow bus driver to send anything to
2309         any recipient.
2310
2311         * bus/connection.c (bus_connection_complete): create the
2312         BusClientPolicy here instead of on-demand.
2313         (bus_connection_get_policy): don't return an error
2314
2315         * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
2316         sender field in message being replied to
2317
2318         * bus/bus.c (bus_context_check_security_policy): fix silly typo
2319         causing it to return FALSE always
2320
2321         * bus/policy.c (bus_client_policy_check_can_send): fix bug where
2322         we checked sender rather than destination
2323
2324 2003-04-25  Havoc Pennington  <hp@redhat.com>
2325
2326         test suite is slightly hosed at the moment, will fix soon
2327
2328         * bus/connection.c (bus_connections_expire_incomplete): fix to
2329         properly disable the timeout when required
2330         (bus_connection_set_name): check whether we can remove incomplete
2331         connections timeout after we complete each connection.
2332
2333         * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
2334         probably still broken.
2335
2336         * bus/services.c (bus_registry_acquire_service): implement max
2337         number of services owned, and honor allow/deny rules on which
2338         services a connection can own.
2339
2340         * bus/connection.c (bus_connection_get_policy): report errors here
2341
2342         * bus/activation.c: implement limit on number of pending
2343         activations
2344
2345 2003-04-25  Havoc Pennington  <hp@redhat.com>
2346
2347         * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
2348         where we used >= 0 instead of != DBUS_UID_UNSET.
2349
2350 2003-04-25  Havoc Pennington  <hp@redhat.com>
2351
2352         * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
2353         were toggled without add/remove, fix from Anders Gustafsson
2354
2355 2003-04-24  Havoc Pennington  <hp@redhat.com>
2356
2357         * test/data/valid-config-files/basic.conf: add <limit> tags to
2358         this test
2359
2360         * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
2361         <limit> tag in configuration file.
2362
2363 2003-04-24  Havoc Pennington  <hp@redhat.com>
2364
2365         * bus/dispatch.c: somehow missed some name_is
2366
2367         * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
2368         (_dbus_timeout_set_interval): new
2369
2370         * bus/connection.c (bus_connections_setup_connection): record time
2371         when each connection is first set up, and expire them after the
2372         auth timeout passes.
2373
2374 2003-04-24  Havoc Pennington  <hp@redhat.com>
2375
2376         * dbus/dbus-message.c (dbus_message_name_is): rename
2377         (dbus_message_service_is): rename
2378         (dbus_message_sender_is): rename
2379         (dbus_message_get_service): rename
2380
2381 2003-04-24  Havoc Pennington  <hp@redhat.com>
2382
2383         * configure.in: add --enable-checks
2384
2385         * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
2386
2387         * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
2388         to use thread locks.
2389         (_dbus_connection_handler_destroyed_locked): move some private
2390         functions into proper docs group
2391
2392         * dbus/dbus-internals.h: add _dbus_return_if_fail,
2393         _dbus_return_val_if_fail
2394
2395         Throughout: use dbus_return_if_fail
2396
2397 2003-04-23  James Willcox  <jwillcox@gnome.org>
2398
2399         * glib/dbus-glib.h:
2400         * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
2401         (dbus_connection_setup_with_g_main),
2402         (dbus_server_setup_with_g_main):
2403         * glib/test-dbus-glib.c: (main):
2404         * glib/test-thread-client.c: (main):
2405         * glib/test-thread-server.c: (new_connection_callback), (main):
2406         * tools/dbus-monitor.c: (main):
2407
2408         Added a GMainContext argument to dbus_connection_setup_with_g_main()
2409         and dbus_server_setup_with_g_main().
2410
2411 2003-04-20  Havoc Pennington  <hp@pobox.com>
2412
2413         * doc/dbus-specification.sgml: document the restrictions on
2414         message and service names
2415
2416 2003-04-22  Havoc Pennington  <hp@redhat.com>
2417
2418         * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
2419         support, and do some code cleanups to share more code and
2420         speed up array marshal/demarshal.
2421
2422         * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
2423
2424         * configure.in: generate dbus-arch-deps.h
2425
2426         * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
2427         64-bit typecodes
2428
2429 2003-04-22  Havoc Pennington  <hp@redhat.com>
2430
2431         * test/data/valid-messages/opposite-endian.message: fix test
2432         to use proper type for rply field
2433
2434         * test/data/invalid-messages: add tests for below validation
2435
2436         * dbus/dbus-message.c (decode_header_data): validate field types,
2437         and validate that named fields are valid names
2438         (decode_name_field): consider messages in the
2439         org.freedesktop.Local. namespace to be invalid.
2440
2441         * dbus/dbus-string.c (_dbus_string_validate_name): new
2442
2443 2003-04-19  Havoc Pennington  <hp@pobox.com>
2444
2445         * bus/driver.c (bus_driver_handle_hello): check limits and
2446         return an error if they are exceeded.
2447
2448         * bus/connection.c: maintain separate lists of active and inactive
2449         connections, and a count of each. Maintain count of completed
2450         connections per user. Implement code to check connection limits.
2451
2452         * dbus/dbus-list.c (_dbus_list_unlink): export
2453
2454         * bus/bus.c (bus_context_check_security_policy): enforce a maximum
2455         number of bytes in the message queue for a connection
2456
2457 2003-04-18  Havoc Pennington  <hp@pobox.com>
2458
2459         * dbus/dbus-auth.c (record_mechanisms): memleak fixes
2460
2461         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
2462         memleaks
2463
2464         * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
2465         on realloc be sure to update the pointer in the keyring
2466
2467         * dbus/dbus-string.c (_dbus_string_zero): compensate for align
2468         offset to avoid writing to unallocated memory
2469
2470         * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
2471         try the next mechanism, so we properly handle OOM
2472
2473         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
2474         on OOM.
2475         (_dbus_keyring_new): fix OOM bug
2476         (_dbus_keyring_new_homedir): always set error; impose a maximum
2477         number of keys we'll load from the file, mostly to speed up the
2478         test suite and make its OOM checks more useful, but also for
2479         general sanity.
2480
2481         * dbus/dbus-auth.c (process_error_server): reject authentication
2482         if we get an error from the client
2483         (process_cancel): on cancel, send REJECTED, per the spec
2484         (process_error_client): send CANCEL if we get an error from the
2485         server.
2486
2487 2003-04-18  Havoc Pennington  <hp@pobox.com>
2488
2489         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
2490         debug spew
2491
2492         * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
2493         handling problem
2494
2495         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
2496         about DBUS_TEST_HOMEDIR once
2497
2498         * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
2499         the environment
2500
2501         * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
2502         config file so we test the right thing
2503
2504         Throughout: assorted docs improvements
2505
2506 2003-04-18  Havoc Pennington  <hp@pobox.com>
2507
2508         * glib/dbus-gmain.c: adapt to watch changes
2509
2510         * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
2511
2512         * dbus/dbus-server.h: remove dbus_server_handle_watch
2513
2514         * dbus/dbus-connection.h: remove dbus_connection_handle_watch
2515
2516         * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
2517         like DBusTimeout, so we don't need dbus_connection_handle_watch
2518         etc.
2519
2520 2003-04-17  Havoc Pennington  <hp@redhat.com>
2521
2522         * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
2523         database usage so it all goes via the DBusUserDatabase cache.
2524
2525 2003-04-17  Havoc Pennington  <hp@redhat.com>
2526
2527         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
2528         there was an OOM watch we skipped, we always return TRUE so we
2529         iterate again to have a look at it again. Fixes test suite hang.
2530         Code rearrangement also lets us lose some memset and only iterate
2531         over callbacks once.
2532
2533         * bus/driver.c (bus_driver_handle_message): sense of test for
2534         reply was backward
2535
2536 2003-04-16  Havoc Pennington  <hp@pobox.com>
2537
2538         * doc/dbus-specification.sgml: make spec say serials are unsigned
2539
2540         * dbus/dbus-message.h: change message serials to unsigned
2541
2542         * dbus/dbus-connection.c: adapt to message serials being unsigned
2543
2544 2003-04-15  Havoc Pennington  <hp@pobox.com>
2545
2546         * bus/bus.c: create and keep around a shared DBusUserDatabase
2547         object.
2548
2549         * bus/connection.c (bus_connection_get_groups): don't cache
2550         groups for user in the connection object, since user database
2551         object now does that.
2552
2553 2003-04-16  Havoc Pennington  <hp@redhat.com>
2554
2555         * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
2556         list of size counters
2557         (_dbus_message_loader_putback_message_link): put back a popped link
2558
2559         * dbus/dbus-connection.c
2560         (dbus_connection_set_max_live_messages_size): rename
2561         max_received_size
2562         (dbus_connection_get_outgoing_size): get size of outgoing
2563         queue
2564         (_dbus_connection_set_connection_counter): remove this cruft
2565
2566 2003-04-14  Havoc Pennington  <hp@redhat.com>
2567
2568         * dbus/dbus-userdb.c: user database abstraction, mostly to get
2569         caching, but at some point we might want to be able to use a
2570         different database.
2571
2572         * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
2573         SHA1 conf file to test the sha1 auth mechanism, since the regular
2574         test always uses EXTERNAL when available.
2575
2576         * configure.in,
2577         test/data/valid-config-files/debug-allow-all-sha1.conf.in:
2578         add conf file that requires use of sha1 auth
2579
2580 2003-04-13  Havoc Pennington  <hp@pobox.com>
2581
2582         * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
2583         from Philip Blundell to send messages and monitor them.
2584
2585 2003-04-13  Havoc Pennington  <hp@pobox.com>
2586
2587         * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
2588         callbacks
2589
2590         * test/data/valid-config-files/debug-allow-all.conf.in: allow all
2591         users
2592
2593         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
2594         fix to only recover unused bytes if we're already authenticated
2595         (_dbus_transport_get_is_authenticated): fix to still mark us
2596         authenticated if there are unused bytes.
2597
2598         * bus/dispatch.c: implement security policy checking
2599
2600         * bus/connection.c (bus_transaction_send_from_driver): new
2601
2602         * bus/bus.c (bus_context_check_security_policy): new
2603
2604         * bus/dispatch.c (send_service_nonexistent_error): delete this,
2605         now we just set the DBusError and it gets converted to an error
2606         reply.
2607
2608         * bus/connection.c (allow_user_function): enable code using actual
2609         data from the config file
2610
2611         * bus/policy.c (list_allows_user): handle wildcard rules for
2612         user/group connection perms
2613
2614 2003-04-13  Havoc Pennington  <hp@pobox.com>
2615
2616         * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
2617
2618         * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
2619
2620         * bus/policy.c (bus_policy_append_mandatory_rule)
2621         (bus_policy_append_default_rule, bus_policy_append_user_rule)
2622         (bus_policy_append_group_rule): new functions
2623
2624 2003-04-12  Havoc Pennington  <hp@pobox.com>
2625
2626         * bus/config-parser.c (bus_config_parser_new): fix a memleak
2627
2628         * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
2629         the pid/gid/uid, just for paranoia.
2630
2631         * test/break-loader.c (randomly_do_n_things): find a byte
2632         containing a type code, and randomly change it to a different
2633         type code.
2634
2635 2003-04-12  Havoc Pennington  <hp@pobox.com>
2636
2637         * bus/policy.h: change BusPolicy to be the thing from the config
2638         file, and rename old BusPolicy to BusClientPolicy
2639
2640         * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
2641         match change in how policy works
2642
2643         * dbus/dbus-internals.h: mark assert_not_reached as
2644         __attribute((noreturn))__
2645
2646 2003-04-11  Havoc Pennington  <hp@redhat.com>
2647
2648         * doc/dbus-specification.sgml: fix a spot with the wrong name for
2649         the broadcast service. Use boolean return for ServiceExists.
2650
2651 2003-04-11  Havoc Pennington  <hp@redhat.com>
2652
2653         * configure.in: add another directory to look for qt in.
2654
2655 2003-04-11  Havoc Pennington  <hp@redhat.com>
2656
2657         * AUTHORS: add Colin Walters
2658
2659 2003-04-11  Havoc Pennington  <hp@redhat.com>
2660
2661         * NEWS: update
2662
2663         * configure.in: 0.9
2664
2665 2003-04-11  Havoc Pennington  <hp@redhat.com>
2666
2667         * bus/messagebus.in: remove pid file when stopping the
2668         message bus, since the bus won't have privileges to remove it
2669         itself.
2670
2671 2003-04-11  Havoc Pennington  <hp@redhat.com>
2672
2673         * bus/bus.c (bus_context_new): move credentials change after
2674         creating pidfile
2675
2676 2003-04-11  Havoc Pennington  <hp@pobox.com>
2677
2678         * test/decode-gcov.c: add "below average functions" to the
2679         coverage report, and change how some of the code works.
2680
2681         * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
2682         not in the coverage stats.
2683
2684         * test/test-service.c (main): use _dbus_verbose not fprintf in a
2685         couple places so running the test suite doesn't result in megaspam.
2686
2687 2003-04-11  Havoc Pennington  <hp@pobox.com>
2688
2689         * bus/dispatch.c (check_existent_service_activation): accept a no
2690         memory error in a place we didn't before
2691
2692         * bus/test.c (bus_test_run_everything): remove hacky "do it twice
2693         in case the first one failed," since the test suite is less
2694         broken now.
2695
2696 2003-04-10  Havoc Pennington  <hp@pobox.com>
2697
2698         * bus/dispatch.c (check_segfault_service_activation): add test
2699         for launching an executable that just crashes.
2700
2701         * test/test-segfault.c (main): try setting coredumpsize to 0 so we
2702         don't leave a million cores. We'll see how portable this is.
2703
2704 2003-04-10  Havoc Pennington  <hp@pobox.com>
2705
2706         * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
2707         the possible parent failures before we fork, so that we don't
2708         fail to create a babysitter after creating the child.
2709
2710         * bus/activation.c (bus_activation_activate_service): kill child
2711         if we don't successfully complete the activation.
2712
2713 2003-04-10  Havoc Pennington  <hp@redhat.com>
2714
2715         * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
2716         the connection if it's disconnected
2717
2718         * bus/activation.c (bus_activation_service_created): use new
2719         transaction features to roll back removal of pending activation if
2720         we don't successfully create the service after all. Don't remove
2721         pending activation if the function fails.
2722
2723         * dbus/dbus-list.c (_dbus_list_insert_before_link)
2724         (_dbus_list_insert_after_link): new code to facilitate
2725         services.c fixes
2726
2727         * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
2728         new functionality, so we can preallocate the ability to insert
2729         into a hash table.
2730
2731         * bus/connection.c (bus_transaction_add_cancel_hook): new function
2732         allowing us to put custom hooks in a transaction to be used for
2733         cancelling said transaction
2734
2735         * doc/dbus-specification.sgml: add some discussion of secondary
2736         service owners, and disallow zero-length service names
2737
2738         * bus/services.c (bus_registry_acquire_service): new function,
2739         splits out part of bus_driver_handle_acquire_service() and fixes
2740         a bug where we didn't remove the service doing the acquiring
2741         from the secondary queue if we failed to remove the current owner
2742         from the front of the queue.
2743
2744 2003-04-10  Alexander Larsson  <alexl@redhat.com>
2745
2746         * doc/dbus-specification.sgml:
2747         s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
2748
2749 2003-04-10  Alexander Larsson  <alexl@redhat.com>
2750
2751         * bus/.cvsignore:
2752         * glib/.cvsignore:
2753         * test/.cvsignore:
2754         Added files to cvsignore
2755
2756         * dbus/dbus-message.h:
2757         * dbus/dbus-message.c: (dbus_message_iter_get_named):
2758         Make get_named() take two out argument and return a boolean.
2759         (dbus_message_iter_get_args_valist):
2760         Update usage of get_named().
2761         (dbus_message_iter_append_byte):
2762         Fix typo
2763         (dbus_message_iter_append_named)
2764         Fix typo
2765         (message_iter_test), (check_message_handling_type), (_dbus_message_test):
2766         More tests.
2767
2768 2003-04-10  Alexander Larsson  <alexl@redhat.com>
2769
2770         * dbus/dbus-marshal.[ch]:
2771         Add array_type_pos argument to _dbus_marshal_validate_arg.
2772         Let you pass a NULL end_pos to _dbus_marshal_validate_type.
2773
2774         * dbus/dbus-message.[ch]:
2775         Multi-dimensional arrays have full type specification in the
2776         outermost array. Iter code re-arranged to handle this.
2777         Added some more iter tests.
2778
2779         * doc/dbus-specification.sgml:
2780         Add me to authors.
2781         Remove old FIXME.
2782         Update new array encoding description.
2783         Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
2784
2785         * test/data/invalid-messages/array-with-mixed-types.message:
2786         * test/data/valid-messages/array-of-array-of-uint32.message:
2787         Change to the new array format.
2788
2789         * test/data/invalid-messages/too-short-dict.message:
2790         Fix bug in test.
2791
2792         * test/data/valid-messages/recursive-types.message:
2793         Fix up and extend test.
2794
2795 2003-04-10  Havoc Pennington  <hp@pobox.com>
2796
2797         * bus/dispatch.c: lots of fixes
2798
2799         * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
2800         (_dbus_loop_iterate): remove old "quit if no callbacks" code,
2801         that was crack, broke the test service.
2802
2803         * dbus/dbus-transport.c (_dbus_transport_open): fix error
2804         handling to avoid piling up errors if we get a failure on the
2805         first address.
2806
2807         * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
2808         pid in assertion failures.
2809
2810         * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
2811         to some fixed size of file descriptor array. Don't return TRUE
2812         anytime a timeout exists, that led to lots of busy loop silliness
2813         in the tests.
2814
2815 2003-04-09  Havoc Pennington  <hp@redhat.com>
2816
2817         * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
2818         I'd checked this in earlier but hadn't.
2819
2820 2003-04-09  Havoc Pennington  <hp@redhat.com>
2821
2822         * bus/dispatch.c (bus_dispatch_test): get a bit further through
2823         the activation test (man this is getting old!)
2824
2825 2003-04-09  Havoc Pennington  <hp@redhat.com>
2826
2827         * test/test-utils.c: use dispatch status function to fix this up
2828
2829         * bus/connection.c (connection_watch_callback): don't dispatch
2830         from here
2831         (connection_timeout_callback): don't dispatch from here
2832         (bus_connections_setup_connection): set the dispatch status function
2833         (bus_connection_disconnected): unset it
2834
2835         * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
2836         used to add a connection to be dispatched
2837         (_dbus_loop_iterate): do the dispatching at the end of each
2838         iteration
2839
2840         * dbus/dbus-connection.c
2841         (dbus_connection_set_dispatch_status_function): new function
2842         allowing us to fix up main loop usage
2843         (_dbus_connection_last_unref): free all the various function
2844         user data
2845         (dbus_connection_dispatch): call the DispatchStatusFunction
2846         whenever this function returns
2847         (dbus_connection_handle_watch): call DispatchStatusFunction
2848         (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
2849         (reply_handler_timeout): call DispatchStatusFunction
2850         (dbus_connection_flush): call DispatchStatusFunction
2851
2852 2003-04-09  Havoc Pennington  <hp@redhat.com>
2853
2854         * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
2855         a memory leak
2856
2857         * bus/dispatch.c (check_service_activated): fix bug in test
2858
2859         * dbus/dbus-mainloop.c (check_timeout): fix this up
2860
2861         * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
2862         verbose output so we can sort out output from different processes,
2863         e.g. in the activation case.
2864
2865 2003-04-08  Colin Walters  <walters@gnu.org>
2866
2867         * bus/bus.c (struct BusContext) [pidfile]: New member, to store
2868         the pid file.
2869         (bus_context_new): Set it.
2870         (bus_context_unref): Use it to delete the pid file.
2871
2872 2003-04-08  Havoc Pennington  <hp@redhat.com>
2873
2874         * test/data/invalid-messages/array-with-mixed-types.message:
2875         regression test that fails for the moment
2876
2877         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
2878         tests for convenience
2879
2880         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
2881         array of nil, it broke things.
2882
2883         * test/data/invalid-messages/array-of-nil.message: regression test
2884
2885         * test/data/valid-messages/array-of-array-of-uint32.message:
2886         happened to write this so added it to suite
2887
2888 2003-04-08  Havoc Pennington  <hp@redhat.com>
2889
2890         * bus/driver.c (bus_driver_handle_acquire_service): init
2891         retval/reply before checking name
2892
2893         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
2894         recursion depth argument
2895
2896         * dbus/dbus-message.h (struct DBusMessageIter): put some padding
2897         in the public struct for future extension
2898
2899         * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
2900         typo
2901
2902         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
2903         message
2904
2905         * doc/dbus-specification.sgml: fix typo
2906
2907 2003-04-08  Alexander Larsson  <alexl@redhat.com>
2908
2909         Implemented recursive types, named types and new-style iters
2910
2911         * bus/driver.c:
2912         * glib/test-thread-client.c: (thread_func):
2913         * glib/test-thread-server.c: (handle_test_message):
2914         * test/test-service.c: (handle_echo):
2915         Update to new api
2916
2917         * dbus/Makefile.am:
2918         * dbus/dbus-dict.c:
2919         * dbus/dbus-dict.h:
2920         * dbus/dbus.h
2921         Remove DBusDict
2922
2923         * dbus/dbus-internals.c: (_dbus_type_to_string):
2924         Update for new types.
2925
2926         * dbus/dbus-marshal.[ch]:
2927         Implement recursive types and the new marshalling format.
2928         Remove hardcoded dict marshalling.
2929         Marshal named types.
2930
2931         * dbus/dbus-message-builder.c:
2932         Add BYTE_ARRAY.
2933         Remove references to old types
2934
2935         * dbus/dbus-message.[ch]:
2936         New non-refcounted iter API that supports recursive iters.
2937         Use iters for appending, including support for recursive
2938         iters.
2939         Add byte and named type support.
2940         Update everything to new marshalling formats.
2941         Add tests for new API.
2942
2943         * dbus/dbus-protocol.h:
2944         Remove old array types.
2945         Add types: BYTE, ARRAY, DICT, NAMED
2946
2947         * dbus/dbus-string.c:
2948         * dbus/dbus-sysdeps.c:
2949         Make parse_double locale safe.
2950
2951         * dbus/dbus-test-main.c:
2952         Call setlocale.
2953
2954         * dbus/dbus-test.c:
2955         Kill dict test
2956
2957         * doc/dbus-specification.sgml:
2958         Update spec
2959
2960         * test/data/incomplete-messages/missing-body.message:
2961         * test/data/invalid-messages/bad-boolean.message:
2962         * test/data/invalid-messages/bad-boolean-array.message:
2963         * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
2964         * test/data/invalid-messages/boolean-has-no-value.message-raw:
2965         * test/data/invalid-messages/too-short-dict.message:
2966         * test/data/valid-messages/dict-simple.message:
2967         * test/data/valid-messages/dict.message:
2968         * test/data/valid-messages/emptiness.message:
2969         * test/data/valid-messages/lots-of-arguments.message:
2970         * test/data/valid-messages/no-padding.message:
2971         * test/data/valid-messages/recursive-types.message:
2972         Add missing NAME fields
2973         Fix up dicts & arrays
2974
2975         * test/data/invalid-messages/dict-with-nil-value.message:
2976         Removed, this is not invalid anymore.
2977
2978         * test/data/valid-messages/recursive-types.message:
2979         Add new test for deeply recursive types.
2980
2981 2003-04-07  Havoc Pennington  <hp@pobox.com>
2982
2983         * bus/driver.c (bus_driver_handle_acquire_service): return an
2984         error if you try to acquire a service that starts with ':'
2985
2986 2003-04-07  Havoc Pennington  <hp@redhat.com>
2987
2988         * doc/dbus-specification.sgml: require that base service names
2989         start with ':' and that the base service is created/deleted
2990         as first and last things a connection does on the bus
2991
2992         * bus/dispatch.c (check_existent_service_activation): lots more
2993         work on the activation test; it doesn't fully pass yet...
2994
2995         * test/test-service.c (main): fix so we don't memleak the
2996         connection to the message bus
2997         (filter_func): accept a message asking us to exit
2998
2999 2003-04-06  Havoc Pennington  <hp@pobox.com>
3000
3001         * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
3002         from Colin Walters
3003
3004         * configure.in: fixes to Qt detection from Colin Walters
3005
3006         * doc/Makefile.am: Only remove generated docbook dirs if they
3007         exist, from Colin Walters
3008
3009         * dbus/dbus-bus.c: change how we set well-known connections to
3010         NULL, so that it works if a single connection is stored in
3011         two well-known array slots.
3012
3013         * test/Makefile.am: remove a lot of stuff that isn't immediately
3014         useful, it's in CVS history if we want it.
3015
3016         * test/test-service.c: use dbus-mainloop instead of that
3017         watch.[hc] crack
3018
3019 2003-04-06  Havoc Pennington  <hp@pobox.com>
3020
3021         * dbus/Makefile.am: split lists of sources into stuff that goes in
3022         the library, util functions that go in the lib and are also used
3023         elsewhere, and util functions that are used in tests/daemon but
3024         don't go in the lib.
3025
3026         * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
3027         here so it can be used in test binaries also
3028
3029 2003-04-06  Havoc Pennington  <hp@pobox.com>
3030
3031         * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
3032         here in the parent process, so we can return an error if it
3033         fails. Also, move some of the code into the child so the parent
3034         is less hosed if we fail midway through.
3035
3036         * bus/bus.c (bus_context_new): move pidfile detection further up
3037         in the function, before we start overwriting sockets and such.
3038
3039         * bus/messagebus.in: adjust this a bit, not sure if it will work.
3040
3041         * configure.in: add --with-system-pid-file and --with-system-socket
3042
3043 2003-04-06  Colin Walters  <walters@verbum.org>
3044
3045         * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
3046
3047         * bus/system.conf.in: Declare a pidfile.
3048
3049         * bus/bus.c (bus_context_new): Test for an existing pid file, and
3050         create one (if appropriate).
3051
3052         * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
3053         (struct BusConfigParser) [pidfile]: New.
3054         (element_type_to_name, merge_included, start_busconfig_child)
3055         (bus_config_parser_end_element, bus_config_parser_content): Handle it.
3056         (bus_config_parser_unref): Free it.
3057         (bus_config_parser_get_pidfile): New function.
3058
3059         * bus/config-parser.h (_dbus_write_pid_file): Prototype.
3060
3061         * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
3062
3063         * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
3064
3065         * dbus/dbus-sysdeps.h: Prototype it.
3066
3067 2003-04-06  Havoc Pennington  <hp@pobox.com>
3068
3069         * bus/bus.c (bus_context_new): print the address in here, rather
3070         than in main(), because we need to do it before forking the daemon
3071
3072         * bus/dispatch.c (send_service_nonexistent_error): set the sender
3073         on the service nonexistent error
3074
3075         * bus/driver.c (bus_driver_handle_acquire_service): set the
3076         sender on the AcquireService reply
3077
3078         * test/data/valid-config-files/debug-allow-all.conf.in: Make test
3079         server also listen on a UNIX socket so services can connect to it.
3080
3081 2003-04-06  Havoc Pennington  <hp@pobox.com>
3082
3083         * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
3084         so it detects deadlocks and also we actually init threads when
3085         debugging.
3086
3087 2003-04-06  Havoc Pennington  <hp@pobox.com>
3088
3089         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
3090         save the domain socket name, and unlink it when we disconnect the
3091         server. Means that at least when we exit normally, we won't leave
3092         a bunch of junk in /tmp
3093
3094         * dbus/dbus-transport-unix.c
3095         (_dbus_transport_new_for_domain_socket): code cleanup (nicer
3096         memory management). (I was making a real change here but then
3097         didn't)
3098
3099 2003-04-06  Havoc Pennington  <hp@pobox.com>
3100
3101         * bus/bus.c (bus_context_new): fix wrong handling of
3102         server_data_slot_unref() in the error case.
3103
3104         * dbus/dbus-internals.h (_dbus_assert): change so it passes
3105         "(condition) != 0" to _dbus_real_assert so that
3106         "_dbus_assert (pointer)" doesn't cause a warning
3107
3108         * bus/main.c (main): accept --print-address option to print out
3109         the message bus address
3110
3111         * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
3112
3113         * dbus/dbus-transport.c (_dbus_transport_open): special error for
3114         "tmpdir" option to unix: address on client side
3115
3116         * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
3117         to unix: address
3118
3119         * configure.in (TEST_SOCKET_DIR): locate a temporary directory
3120         we can use to create sockets in the test suite.
3121
3122         * bus/main.c (signal_handler): on SIGTERM, exit the daemon
3123         cleanly. To be used for testing.
3124
3125         * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
3126
3127         * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
3128
3129         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3130         handle trying to call this when there's no servers active
3131
3132 2003-04-05  Havoc Pennington  <hp@pobox.com>
3133
3134         * NEWS: update
3135
3136         * configure.in: 0.8
3137
3138 2003-04-05  Havoc Pennington  <hp@pobox.com>
3139
3140         * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
3141         crash on startup. Need to get "try starting the daemon"
3142         in the test suite I guess. ;-)
3143
3144         * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
3145         tracked the number of open connections; it's better done in
3146         application-specific code as you want it to span all servers etc.
3147
3148 2003-04-05  Havoc Pennington  <hp@pobox.com>
3149
3150         * bus/Makefile.am (install-data-hook): add missing DESTDIR,
3151         patch from Colin Walters
3152
3153 2003-04-05  Havoc Pennington  <hp@pobox.com>
3154
3155         * doc/config-file.txt (Elements): fix docs of <auth> to reflect
3156         reality; in fact multiple mechanisms are allowed.
3157
3158         * dbus/dbus-internals.c (_dbus_real_assert)
3159         (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
3160         _dbus_assert_not_reached() into functions, so that they don't show
3161         up in basic block counts for test coverage, and don't use up as
3162         much disk space. Does mean slower execution speed though, so
3163         assumes --disable-asserts is the normal production case.
3164
3165 2003-04-05  Havoc Pennington  <hp@pobox.com>
3166
3167         * test/Makefile.am (dist-hook): also dist *.in files
3168
3169         * NEWS: update
3170
3171         * configure.in: 0.7
3172
3173 2003-04-05  Havoc Pennington  <hp@pobox.com>
3174
3175         * dbus/dbus-string.c: docs warning
3176
3177         * dbus/dbus-spawn.c: missing docs
3178
3179         * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
3180
3181 2003-04-05  Havoc Pennington  <hp@pobox.com>
3182
3183         * bus/loop.c (bus_loop_iterate): fix the timeout code, using
3184         magic from GLib
3185
3186         * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
3187         to -1 once we've reaped the babysitter
3188         (_dbus_babysitter_handle_watch): do as much work as we can, not
3189         just one go of it
3190
3191         * bus/activation.c: add code using DBusBabysitter so that we
3192         handle it when a service fails to start up properly.
3193         (bus_activation_service_created): don't remove the activation
3194         entries as we go, just let them get removed when we free the pending
3195         activation. Unref reply messages after sending them.
3196
3197 2003-04-05  Havoc Pennington  <hp@pobox.com>
3198
3199         * test/decode-gcov.c (main): print per-directory stats in the report
3200
3201         * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
3202
3203 2003-04-05  Havoc Pennington  <hp@pobox.com>
3204
3205         * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
3206
3207         * test/decode-gcov.c: hack up a little program to suck data
3208         out of gcov files. Yes this is sort of silly.
3209
3210         * configure.in: define something in config.h and do an
3211         AM_CONDITIONAL when gcov is enabled
3212
3213 2003-04-04  Havoc Pennington  <hp@redhat.com>
3214
3215         * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
3216         return a "babysitter" object that is used to monitor the status of
3217         the spawned process and reap it when required.
3218
3219         * test/test-segfault.c, test/test-exit.c,
3220         test/test-sleep-forever.c: binaries that do various lame things,
3221         used in the test suite.
3222
3223         * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
3224
3225 2003-04-03  Havoc Pennington  <hp@pobox.com>
3226
3227         * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
3228         in preparation for modifying it, dbus-sysdeps is getting
3229         a bit unmanageable.
3230
3231 2003-04-03  Havoc Pennington  <hp@redhat.com>
3232
3233         * bus/loop.h, bus/loop.c: make the mainloop an object so we can
3234         have multiple ones
3235
3236         * bus/*.[hc]: adapt to mainloop change
3237
3238 2003-04-03  Havoc Pennington  <hp@redhat.com>
3239
3240         * bus/activation.c (load_directory): fix up memleaks
3241         (bus_activation_entry_free): free the entry
3242
3243         * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
3244         we get one from the message bus; fix memleaks.
3245
3246         * dbus/dbus-message.c (dbus_set_error_from_message): new function
3247
3248 2003-04-03  Havoc Pennington  <hp@pobox.com>
3249
3250         * bus/config-parser.c (bus_config_parser_unref): free
3251         list of mechanisms, bug discovered by test suite enhancements
3252         (putting system.conf and session.conf into suite)
3253
3254         * test/Makefile.am, test/test-service.c: add placeholder for a
3255         test service that we'll activate as part of test suite. Doesn't
3256         do anything yet.
3257
3258         * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
3259         setting NULL value, and use system malloc not dbus_malloc()
3260         when we have unavoidable memleakage.
3261
3262         * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
3263         didn't work, and support DBUS_BUS_ACTIVATION.
3264
3265         * bus/activation.c (child_setup): pass our well-known bus type to
3266         the child
3267
3268         * bus/config-parser.c: support <type> to specify well-known type
3269
3270         * doc/dbus-specification.sgml: document the env variables to
3271         locate well-known buses and find service activator
3272
3273 2003-04-02  Havoc Pennington  <hp@redhat.com>
3274
3275         * test/Makefile.am (all-local): add a rule to copy tests to
3276         builddir, so we can have generated tests. Use this to remove the
3277         silly hack for testing system.conf and session.conf. Will use this
3278         shortly to generate .service files pointing to test binaries.
3279
3280 2003-04-02  Havoc Pennington  <hp@redhat.com>
3281
3282         * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
3283         current alloc and needed new length, not max of the doubled
3284         allocation and needed new length. Also, when building tests,
3285         don't do the double-allocation stuff, just realloc every time.
3286
3287 2003-04-02  Havoc Pennington  <hp@redhat.com>
3288
3289         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
3290         in error messages
3291         (_dbus_string_get_dirname): new
3292         (_dbus_sysdeps_test): new
3293         (_dbus_directory_open): include dirnames in error messages
3294
3295         * bus/config-parser.c: interpret <include> and <includedir> and
3296         <servicedir> relative to config file location if the given
3297         filename is not absolute.
3298
3299         * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
3300
3301 2003-04-02  Havoc Pennington  <hp@redhat.com>
3302
3303         * bus/connection.c (bus_transaction_send_error_reply): set sender
3304         service for the error, and unref the reply on success
3305
3306         * bus/activation.c: convert to use BusTransaction so OOM can be
3307         handled correctly
3308         (bus_activation_service_created): set sender of the message
3309
3310 2003-04-01  Havoc Pennington  <hp@redhat.com>
3311
3312         * bus/config-parser.c, bus/bus.c: implement <servicedir> and
3313         <includedir> (at least mostly)
3314
3315         * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
3316         first, then the user ID
3317
3318 2003-04-01  Havoc Pennington  <hp@pobox.com>
3319
3320         * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
3321         function
3322
3323         * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
3324
3325         * dbus/dbus-internals.c (_dbus_dup_string_array): new function
3326
3327         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
3328         socket 0777, and unlink any existing socket.
3329
3330         * bus/bus.c (bus_context_new): change our UID/GID and fork if
3331         the configuration file so specifies; set up auth mechanism
3332         restrictions
3333
3334         * bus/config-parser.c (bus_config_parser_content): add support
3335         for <fork> option and fill in code for <auth>
3336
3337         * bus/system.conf.in: add <fork/> to default configuration,
3338         and limit auth mechanisms to EXTERNAL
3339
3340         * doc/config-file.txt (Elements): add <fork>
3341
3342         * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
3343         (_dbus_change_identity): new function
3344
3345 2003-03-31  Havoc Pennington  <hp@redhat.com>
3346
3347         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
3348         (_dbus_listen_unix_socket): fix off-by-one error in null
3349         termination spotted by Nalin
3350
3351 2003-03-31  Havoc Pennington  <hp@redhat.com>
3352
3353         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
3354         DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
3355         having a real home directory available.
3356
3357 2003-03-31  Havoc Pennington  <hp@redhat.com>
3358
3359         * bus/Makefile.am (install-data-hook): create /var/run/dbus
3360
3361         * bus/messagebus.in: add init script for Red Hat /etc/init.d
3362
3363         * configure.in: add support for specifying a style of init script
3364         to install
3365
3366 2003-03-31  Havoc Pennington  <hp@redhat.com>
3367
3368         Fix some annoying DBusString API and fix all affected code.
3369
3370         * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
3371         max_length argument
3372         (_dbus_string_get_data): change to return string instead of using
3373         an out param
3374         (_dbus_string_get_const_data): ditto
3375         (_dbus_string_get_data_len): ditto
3376         (_dbus_string_get_const_data_len): ditto
3377
3378 2003-03-31  Havoc Pennington  <hp@redhat.com>
3379
3380         * bus/main.c (main): fix up the command line arguments to be nicer
3381
3382 2003-03-31  Havoc Pennington  <hp@redhat.com>
3383
3384         * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
3385         define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
3386         final location that lands in the config file
3387
3388         * bus/config-loader-expat.c (bus_config_load): fix type of
3389         XML_Parser variable
3390
3391         * doc/TODO: remove TODO item for dbus_bus_get()
3392
3393         * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
3394
3395 2003-03-31  Havoc Pennington  <hp@pobox.com>
3396
3397         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
3398         (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
3399         argument since they are always client side
3400
3401         * dbus/dbus-server.c (dbus_server_get_address): new function
3402
3403         * bus/main.c (main): take the configuration file as an argument.
3404
3405         * test/data/valid-config-files/debug-allow-all.conf: new file to
3406         use with dispatch.c tests for example
3407
3408         * bus/test-main.c (main): require test data dir
3409
3410         * bus/bus.c (bus_context_new): change this to take a
3411         configuration file name as argument
3412
3413         * doc/config-file.txt (Elements): add <servicedir>
3414
3415         * bus/system.conf, bus/session.conf: new files
3416
3417         * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
3418         well-known socket if none set
3419
3420         * configure.in: create system.conf and session.conf
3421
3422 2003-03-30  Havoc Pennington  <hp@pobox.com>
3423
3424         * bus/config-parser.c: hacking
3425
3426         * dbus/dbus-memory.c: don't use DBusList for the list of stuff
3427         to shut down, since it could cause weirdness with the DBusList
3428         lock
3429
3430         * dbus/dbus-list.c (_dbus_list_test): add tests for the
3431         link-oriented stack routines
3432         (alloc_link): free the mempool if the first alloc from it fails
3433
3434         * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
3435
3436         * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
3437         from GLib
3438         (_dbus_string_skip_white): new
3439
3440         * doc/config-file.txt (Elements): add <includedir>
3441
3442 2003-03-28  Havoc Pennington  <hp@pobox.com>
3443
3444         * dbus/dbus-string.c (_dbus_string_copy_data_len)
3445         (_dbus_string_copy_data): new functions
3446
3447 2003-03-28  Anders Carlsson  <andersca@codefactory.se>
3448
3449         * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
3450         * dbus/dbus-bus.h:
3451         Add dbus_bus_get.
3452
3453         * dbus/dbus-memory.c:
3454         Fix a doc comment.
3455
3456 2003-03-28  Havoc Pennington  <hp@pobox.com>
3457
3458         * bus/test.c (bus_test_flush_bus): remove the sleep from here,
3459         I think it may have just been superstition. Not sure.
3460
3461         * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
3462         failures that were not being handled.
3463
3464         * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
3465
3466         * dbus/dbus-memory.c: add ability to set number of mallocs in a
3467         row that will fail on out-of-memory.
3468
3469         * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
3470         function for testing out-of-memory handling.
3471
3472         * bus/config-loader-expat.c (memsuite): don't wrap the dbus
3473         allocation functions, they do map exactly to the expat ones.
3474
3475 2003-03-27  Havoc Pennington  <hp@redhat.com>
3476
3477         * bus/config-loader-libxml.c (bus_config_load): add another error
3478         check
3479
3480 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
3481
3482         * doc/TODO:
3483         Add note about automatic service activation.
3484
3485         * doc/dbus-specification.sgml:
3486         Rename the specification and clarify a few things.
3487
3488 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
3489
3490         * Doxyfile.in:
3491         * dbus/dbus-address.c:
3492         * dbus/dbus-dict.c:
3493         * dbus/dbus-marshal.c:
3494         * dbus/dbus-server-debug-pipe.c:
3495         * dbus/dbus-transport-unix.c:
3496         Fix documentation warnings.
3497
3498 2003-03-26  Havoc Pennington  <hp@pobox.com>
3499
3500         * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
3501         after every test so it's quick and easy to see which leaked, and
3502         so we test multiple dbus_shutdown() calls
3503
3504         * configure.in: change configure.in XML stuff to also support
3505         expat
3506
3507         * config-loader-libxml.c: some hacking
3508
3509         * config-loader-expat.c: some hacking
3510
3511         * config-parser.c: some hacking, plus tests
3512
3513 2003-03-25  Havoc Pennington  <hp@redhat.com>
3514
3515         * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
3516
3517         * configure.in: add --with-xml option to specify XML library,
3518         right now only libxml is supported.
3519
3520         * bus/config-loader-libxml.c, config-parser.c: sync some minor
3521         nonworking code between home and work, still just stubs
3522
3523 2003-03-24  Havoc Pennington  <hp@redhat.com>
3524
3525         * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
3526         file
3527
3528         * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
3529         NULL argument for "message" if the error is a well-known one,
3530         fill in a generic message in this case.
3531
3532         * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
3533         favor of DBusError
3534
3535         * bus/test.c (bus_test_flush_bus): add
3536
3537         * bus/policy.c (bus_policy_test): test code stub
3538
3539 2003-03-24  Havoc Pennington  <hp@pobox.com>
3540
3541         * bus/connection.c (bus_connections_setup_connection): set up
3542         the "can this user connect" function, but it always returns
3543         TRUE until we have a config file parser so we can have a config
3544         file that allows connections.
3545
3546 2003-03-23  Havoc Pennington  <hp@pobox.com>
3547
3548         * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
3549         DBUS_BUILD_TESTS, actually alloc/free a block of memory for
3550         the mutex, so we can check for proper memory management
3551         and OOM handling.
3552
3553         * dbus/dbus-dataslot.c: remove the mutex from
3554         DBusDataSlotAllocator and lock it manually when using it,
3555         to simplify fitting it into the global slots framework.
3556
3557         * dbus/dbus-threads.c (init_static_locks): rework how we're
3558         handling global locks so they are easily shut down.
3559
3560         * bus/policy.c (bus_policy_append_rule): fix
3561
3562         * bus/test-main.c (main): check for memleaks
3563
3564         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
3565         test suite check for memleaks
3566
3567         * dbus/dbus-memory.c: add support in test mode for tracking
3568         number of outstanding blocks
3569
3570 2003-03-23  Havoc Pennington  <hp@pobox.com>
3571
3572         * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
3573         policies code
3574
3575         * dbus/dbus-hash.h: add ULONG hash keys
3576
3577         * dbus/dbus-sysdeps.c (_dbus_get_groups): new
3578         (_dbus_get_group_id): new function
3579
3580 2003-03-20  Havoc Pennington  <hp@redhat.com>
3581
3582         * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
3583         new function
3584         (dbus_connection_get_unix_user): new function
3585
3586 2003-03-20  Havoc Pennington  <hp@pobox.com>
3587
3588         * bus/connection.c (bus_connection_send_oom_error): assert that
3589         message has a sender
3590         (connection_execute_transaction): ditto
3591         (bus_connection_preallocate_oom_error): fix to set the sender, and
3592         set recipient to the destination service, not the bus driver
3593
3594         * bus/policy.c: hacking
3595
3596         * dbus/dbus-message.c (dbus_message_service_is): new function
3597         (dbus_message_sender_is): new
3598
3599 2003-03-19  Havoc Pennington  <hp@redhat.com>
3600
3601         * bus/policy.c: start sketching code for policy restrictions on
3602         what connections can do.
3603
3604 2003-03-18  Havoc Pennington  <hp@redhat.com>
3605
3606         * doc/TODO: some notes on high-level todo items. Little nitpick
3607         stuff is all in @todo, so no need to add it here.
3608
3609         * doc/config-file.txt: some notes on how config file might look
3610
3611 2003-03-18  Anders Carlsson  <andersca@codefactory.se>
3612
3613         * configure.in: 0.6
3614
3615         * NEWS: Update.
3616
3617 2003-03-17  Havoc Pennington  <hp@redhat.com>
3618
3619         * dbus/dbus-internals.h: add gcc attributes so that
3620         our printf-style functions warn on bad arguments to
3621         format
3622
3623         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
3624         format bug
3625
3626         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
3627         printf format bug
3628
3629 2003-03-17  Havoc Pennington  <hp@redhat.com>
3630
3631         * bus/test-main.c (main): make it print something as it runs
3632         so make check doesn't look stuck
3633
3634         * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
3635         from CVS, now obsolete
3636
3637 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
3638
3639         * bus/dispatch.c: (bus_dispatch):
3640         Refetch the service name since it may have been reallocated
3641         when dbus_message_set_sender was called.
3642
3643         * dbus/dbus-sysdeps.c: (_dbus_accept):
3644         Add address and address length variables and use them to stop
3645         valgrind from complaining.
3646
3647 2003-03-17  Havoc Pennington  <hp@pobox.com>
3648
3649         All tests pass, no memleaks, no valgrind complaints.
3650
3651         * bus/test.c: refcount handler_slot
3652
3653         * bus/connection.c (bus_connections_new): refcount
3654         connection_data_slot
3655
3656         * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
3657         bytes so that auth scripts pass.
3658
3659         * bus/dispatch.c: init message_handler_slot so it gets allocated
3660         properly
3661
3662         * bus/dispatch.c (message_handler_slot_ref): fix memleak
3663
3664         * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
3665         dealloc server_pipe_hash when no longer used for benefit of
3666         leak checking
3667
3668         * dbus/dbus-auth.c (process_command): memleak fix
3669
3670         * bus/dispatch.c (check_hello_message): memleak fix
3671
3672 2003-03-16  Havoc Pennington  <hp@pobox.com>
3673
3674         * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
3675
3676 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
3677
3678         * bus/activation.c (bus_activation_activate_service): Append
3679         the pending activation entry to the list of pending activations.
3680
3681 2003-03-16  Havoc Pennington  <hp@pobox.com>
3682
3683         * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
3684         connections
3685
3686         * dbus/dbus-address.c (create_entry): fix OOM handling when
3687         failing to alloc entry->method
3688
3689 2003-03-16  Havoc Pennington  <hp@pobox.com>
3690
3691         * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
3692         the watch
3693
3694         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
3695         add some missing dbus_set_result
3696
3697         * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
3698         alloc the DBusMessageHandler
3699
3700         * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
3701         the transport here, since we call this from the finalizer; it
3702         resulted in a double-finalize.
3703
3704         * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
3705         where we tried to use transport->connection that was NULL,
3706         happened when transport was disconnected early on due to OOM
3707
3708         * bus/*.c: adapt to handle OOM for watches/timeouts
3709
3710         * dbus/dbus-transport-unix.c: port to handle OOM during
3711         watch handling
3712
3713         * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
3714         reference to unused bytes instead of a copy
3715
3716         * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
3717         out of memory
3718
3719         * dbus/dbus-connection.c (dbus_connection_handle_watch): return
3720         FALSE on OOM
3721
3722         * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
3723         of memory
3724
3725 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
3726
3727         * doc/dbus-specification.sgml:
3728         Document reply message for ActivateService.
3729
3730 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
3731
3732         * bus/activation.c: (bus_pending_activation_entry_free),
3733         (bus_pending_activation_free), (bus_activation_new),
3734         (bus_activation_unref), (bus_activation_service_created),
3735         (bus_activation_activate_service):
3736         * bus/activation.h:
3737         * bus/bus.c: (bus_context_new):
3738         * bus/desktop-file.c: (new_section):
3739         * bus/driver.c: (bus_driver_send_service_deleted),
3740         (bus_driver_handle_activate_service):
3741         * bus/services.c: (bus_registry_new), (bus_registry_ensure):
3742         * bus/services.h:
3743         * dbus/dbus-connection.c:
3744         (dbus_connection_send_with_reply_and_block):
3745         * dbus/dbus-message.c: (dbus_message_append_args_valist):
3746         * dbus/dbus-protocol.h:
3747         Make activation work better. Now pending activations will be queued
3748         and the daemon won't try to activate services that are already registered.
3749
3750 2003-03-16  Havoc Pennington  <hp@pobox.com>
3751
3752         * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
3753         connection data
3754
3755         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
3756         DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
3757
3758 2003-03-16  Havoc Pennington  <hp@pobox.com>
3759
3760         * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
3761         this. always run the test suite before commit...
3762
3763         * bus/*: adapt to DBusConnection API changes
3764
3765         * glib/dbus-gmain.c: adapt to DBusConnection API changes,
3766         requires renaming stuff to avoid dbus_connection_dispatch name
3767         conflict.
3768
3769         * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
3770         function
3771
3772         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
3773         separate from _dbus_message_loader_return_buffer()
3774
3775         * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
3776         this, because it's now always broken to use; the number of
3777         messages in queue vs. the number still buffered by the message
3778         loader is undefined/meaningless. Should use
3779         dbus_connection_get_dispatch_state().
3780         (dbus_connection_dispatch): rename from
3781         dbus_connection_dispatch_message
3782
3783 2003-03-16  Havoc Pennington  <hp@pobox.com>
3784
3785         * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
3786         implementation
3787
3788 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
3789
3790         * dbus/dbus-connection.c:
3791         (dbus_connection_send_with_reply_and_block):
3792         Decrease connection->n_incoming when removing an entry
3793         from the list.
3794         * dbus/dbus-dict.c: (dbus_dict_entry_free),
3795         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
3796         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
3797         (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
3798         (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
3799         (dbus_dict_get_byte_array):
3800         Handle NULL arrays and strings. Also add support for byte arrays.
3801
3802         * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
3803         (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
3804         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
3805         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
3806         (_dbus_demarshal_dict), (demarshal_and_validate_len),
3807         (_dbus_marshal_validate_arg), (_dbus_marshal_test):
3808         * dbus/dbus-marshal.h:
3809         Add support for marshalling and demarshalling empty arrays and strings.
3810
3811         * dbus/dbus-message.c: (dbus_message_append_args_valist),
3812         (dbus_message_append_string_array),
3813         (dbus_message_iter_get_boolean),
3814         (dbus_message_iter_get_boolean_array),
3815         (dbus_message_iter_get_int32_array),
3816         (dbus_message_iter_get_uint32_array),
3817         (dbus_message_iter_get_double_array),
3818         (dbus_message_iter_get_byte_array),
3819         (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
3820         (check_message_handling):
3821         Add support for getting empty arrays and dicts.
3822
3823         * dbus/dbus-string.c: (_dbus_string_validate_utf8):
3824         Don't do any validation at all for now, that's better than just checking
3825         for ASCII.
3826
3827         * test/data/valid-messages/emptiness.message:
3828         New test message with lots of empty arrays.
3829
3830 2003-03-16  Havoc Pennington  <hp@pobox.com>
3831
3832         * dbus/dbus-connection.c
3833         (_dbus_connection_queue_received_message_link): new function that
3834         can't fail due to OOM
3835
3836         * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
3837         new function pops a message together with a list link
3838         containing it.
3839
3840         * dbus/dbus-transport-unix.c (queue_messages): use new link-based
3841         message queuing functions to avoid needing to alloc memory
3842
3843 2003-03-16  Havoc Pennington  <hp@pobox.com>
3844
3845         Oops - test code was only testing failure of around 30 of the
3846         mallocs in the test path, but it turns out there are 500+
3847         mallocs. I believe this was due to misguided linking setup such
3848         that there was one copy of dbus_malloc etc. in the daemon and one
3849         in the shared lib, and only daemon mallocs were tested. In any
3850         case, the test case now tests all 500+ mallocs, and doesn't pass
3851         yet, though there are lots of fixes in this patch.
3852
3853         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
3854         this so that it doesn't need to allocate memory, since it
3855         has no way of indicating failure due to OOM (and would be
3856         annoying if it did).
3857
3858         * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
3859
3860         * bus/Makefile.am: rearrange to create two self-contained
3861         libraries, to avoid having libraries with overlapping symbols.
3862         that was resulting in weirdness, e.g. I'm pretty sure there
3863         were two copies of global static variables.
3864
3865         * dbus/dbus-internals.c: move the malloc debug stuff to
3866         dbus-memory.c
3867
3868         * dbus/dbus-list.c (free_link): free list mempool if it becomes
3869         empty.
3870
3871         * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
3872
3873         * dbus/dbus-address.c (dbus_parse_address): free list nodes
3874         on failure.
3875
3876         * bus/dispatch.c (bus_dispatch_add_connection): free
3877         message_handler_slot when no longer using it, so
3878         memory leak checkers are happy for the test suite.
3879
3880         * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
3881
3882         * bus/bus.c (new_connection_callback): disconnect in here if
3883         bus_connections_setup_connection fails.
3884
3885         * bus/connection.c (bus_connections_unref): fix to free the
3886         connections
3887         (bus_connections_setup_connection): if this fails, don't
3888         disconnect the connection, just be sure there are no side
3889         effects.
3890
3891         * dbus/dbus-string.c (undo_alignment): unbreak this
3892
3893         * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
3894         leaking
3895         (_dbus_auth_new): fix the order in which we free strings
3896         on OOM failure
3897
3898         * bus/connection.c (bus_connection_disconnected): fix to
3899         not send ServiceDeleted multiple times in case of memory
3900         allocation failure
3901
3902         * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
3903         get the base service name
3904         (dbus_bus_register_client): don't return base service name,
3905         instead store it on the DBusConnection and have an accessor
3906         function for it.
3907         (dbus_bus_register_client): rename dbus_bus_register()
3908
3909         * bus/dispatch.c (check_hello_message): verify that other
3910         connections on the bus also got the correct results, not
3911         just the one sending hello
3912
3913 2003-03-15  Havoc Pennington  <hp@pobox.com>
3914
3915         Make it pass the Hello handling test including all OOM codepaths.
3916         Now to do other messages...
3917
3918         * bus/services.c (bus_service_remove_owner): fix crash when
3919         removing owner from an empty list of owners
3920         (bus_registry_ensure): don't leave service in the list of
3921         a connection's owned services if we fail to put the service
3922         in the hash table.
3923
3924         * bus/connection.c (bus_connection_preallocate_oom_error): set
3925         error flag on the OOM error.
3926
3927         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
3928         handle _dbus_transport_set_connection failure
3929
3930         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
3931         to create watches up front and simply enable/disable them as
3932         needed.
3933         (unix_connection_set): this can now fail on OOM
3934
3935         * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
3936         of enabling/disabling a watch or timeout.
3937
3938         * bus/loop.c (bus_loop_iterate): don't touch disabled
3939         watches/timeouts
3940
3941         * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
3942
3943 2003-03-15  Havoc Pennington  <hp@pobox.com>
3944
3945         * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
3946         write useful test code, after all that futzing around ;-)
3947
3948         Test does not yet pass because we can't handle OOM in
3949         _dbus_transport_messages_pending (basically,
3950         dbus_connection_preallocate_send() does not prealloc the write
3951         watch). To fix this, I think we need to add new stuff to
3952         set_watch_functions, namely a SetEnabled function so we can alloc
3953         the watch earlier, then enable it later.
3954
3955         * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
3956         dbus-memory.c to the convenience lib
3957
3958         * bus/test.c: rename some static functions to keep them clearly
3959         distinct from stuff in connection.c. Handle client disconnection.
3960
3961 2003-03-14  Havoc Pennington  <hp@pobox.com>
3962
3963         * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
3964         transport, tests more of the real codepath. Set up clients
3965         with bus_setup_debug_client.
3966
3967         * bus/test.c (bus_setup_debug_client): function to set up debug
3968         "clients" on the main loop
3969
3970         * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
3971         support
3972
3973         * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
3974         server type
3975
3976         * dbus/dbus-server-debug.c: support a debug server based on pipes
3977
3978         * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
3979         (_dbus_close): new function
3980
3981         * configure.in: check for socketpair
3982
3983 2003-03-14  Havoc Pennington  <hp@redhat.com>
3984
3985         * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
3986         cheesy hack
3987
3988         * dbus/dbus-transport-debug.c: rework this a good bit to be
3989         less complicated. hopefully still works.
3990
3991         * dbus/dbus-server-debug.c (handle_new_client): remove timeout
3992         manually
3993
3994         * glib/dbus-gmain.c (timeout_handler): don't remove timeout
3995         after running it
3996
3997         * dbus/dbus-message.c (dbus_message_copy): rename from
3998         dbus_message_new_from_message, fix it up to copy
3999         all the message fields, add test case
4000
4001         * bus/dispatch.c (bus_dispatch_test): add some more test code,
4002         not quite passing yet
4003
4004 2003-03-14  Havoc Pennington  <hp@pobox.com>
4005
4006         * bus/loop.c (bus_loop_iterate): add this so we can "run loop
4007         until no work remains" in test code. (the large diff here
4008         is just code movement, no actual changes)
4009
4010         * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
4011         1, no point waiting around for test code.
4012         (_dbus_server_debug_accept_transport): unref the timeout
4013         after adding it (right?)
4014
4015         * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
4016
4017 2003-03-13  Havoc Pennington  <hp@redhat.com>
4018
4019         * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
4020         out of memory
4021
4022         * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
4023         of memory
4024
4025         * dbus/dbus-connection.h: Make AddWatchFunction and
4026         AddTimeoutFunction return a bool so they can fail on out-of-memory
4027
4028         * bus/bus.c (bus_context_new): set up timeout handlers
4029
4030         * bus/connection.c (bus_connections_setup_connection): set up
4031         timeout handlers
4032
4033         * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
4034         can fail
4035
4036         * bus/bus.c (bus_context_new): adapt to changes
4037
4038         * bus/connection.c: adapt to changes
4039
4040         * test/watch.c: adapt to DBusWatch changes
4041
4042         * bus/dispatch.c (bus_dispatch_test): started adding this but
4043         didn't finish
4044
4045 2003-03-14  Anders Carlsson  <andersca@codefactory.se>
4046
4047         * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
4048
4049 2003-03-13  Havoc Pennington  <hp@pobox.com>
4050
4051         * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
4052         set up a test framework as for the library
4053
4054 2003-03-12  Havoc Pennington  <hp@pobox.com>
4055
4056         Throughout: purge global variables, introduce BusActivation,
4057         BusConnections, BusRegistry, etc. objects instead.
4058
4059         * bus/bus.h, bus/bus.c: introduce BusContext as a global
4060         message bus object
4061
4062         * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
4063         going to redo this a bit differently I think
4064
4065 2003-03-12  Havoc Pennington  <hp@redhat.com>
4066
4067         Mega-patch that gets the message bus daemon initially handling
4068         out-of-memory. Work still needed. Also lots of random
4069         moving stuff to DBusError instead of ResultCode.
4070
4071         * dbus/dbus-list.c (_dbus_list_length_is_one): new function
4072
4073         * dbus/dbus-connection.c
4074         (dbus_connection_send_with_reply_and_block): use DBusError
4075
4076         * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
4077         DBusResultCode
4078
4079         * dbus/dbus-connection.c (dbus_connection_send): drop the result
4080         code here, as the only failure possible is OOM.
4081
4082         * bus/connection.c (bus_connection_disconnect):
4083         rename bus_connection_disconnected as it's a notification only
4084
4085         * bus/driver.c (bus_driver_handle_acquire_service): don't free
4086         "name" on get_args failure, should be done by get_args;
4087         don't disconnect client for bad args, just return an error.
4088         (bus_driver_handle_service_exists): ditto
4089
4090         * bus/services.c (bus_services_list): NULL-terminate returned array
4091
4092         * bus/driver.c (bus_driver_send_service_lost)
4093         (bus_driver_send_service_acquired): send messages from driver to a
4094         specific client to the client's unique name, not to the broadcast
4095         service.
4096
4097         * dbus/dbus-message.c (decode_header_data): reject messages that
4098         contain no name field
4099         (_dbus_message_get_client_serial): rename to
4100         dbus_message_get_serial and make public
4101         (_dbus_message_set_serial): rename from set_client_serial
4102         (_dbus_message_set_reply_serial): make public
4103         (_dbus_message_get_reply_serial): make public
4104
4105         * bus/connection.c (bus_connection_foreach): allow stopping
4106         iteration by returning FALSE from foreach function.
4107
4108         * dbus/dbus-connection.c (dbus_connection_send_preallocated)
4109         (dbus_connection_free_preallocated_send)
4110         (dbus_connection_preallocate_send): new API for sending a message
4111         without possibility of malloc failure.
4112         (dbus_connection_send_message): rename to just
4113         dbus_connection_send (and same for whole function family)
4114
4115         * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
4116
4117         * dbus/dbus-sysdeps.c (_dbus_exit): new function
4118
4119         * bus/activation.c: handle/return errors
4120
4121         * dbus/dbus-errors.h: add more DBUS_ERROR #define
4122
4123         * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
4124         (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
4125         (_dbus_result_from_errno): move to this file
4126
4127 2003-03-10  Anders Carlsson  <andersca@codefactory.se>
4128
4129         * dbus/dbus-marshal.c:
4130         (_dbus_marshal_set_string):
4131         Take a length argument so we can marshal the correct string
4132         length.
4133
4134         (_dbus_marshal_dict), (_dbus_demarshal_dict),
4135         (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
4136         (_dbus_marshal_test):
4137         * dbus/dbus-marshal.h:
4138         Add support for marshalling and demarshalling dicts.
4139
4140         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4141         Add support for TYPE DICT.
4142
4143         * dbus/dbus-message.c: (set_string_field):
4144         Adjust header padding.
4145
4146         (dbus_message_append_args_valist), (dbus_message_append_dict),
4147         (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
4148         (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
4149         (check_message_handling), (check_have_valid_message):
4150         * dbus/dbus-message.h:
4151         Add functions for setting and getting dicts.
4152
4153         * dbus/dbus-protocol.h:
4154         Add DBUS_TYPE_DICT.
4155
4156         * dbus/dbus.h:
4157         Add dbus-dict.h
4158
4159         * doc/dbus-specification.sgml:
4160         Add information about how dicts are marshalled.
4161
4162         * test/data/invalid-messages/dict-with-nil-value.message:
4163         * test/data/invalid-messages/too-short-dict.message:
4164         * test/data/valid-messages/dict-simple.message:
4165         * test/data/valid-messages/dict.message:
4166         Add sample messages containing dicts.
4167
4168 2003-03-08  Anders Carlsson  <andersca@codefactory.se>
4169
4170         * dbus/dbus-dict.h: Add DBUS_END_DECLS.
4171
4172 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
4173
4174         * dbus/Makefile.am:
4175         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4176         (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
4177         (dbus_dict_set_int32), (dbus_dict_set_uint32),
4178         (dbus_dict_set_double), (dbus_dict_set_string),
4179         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
4180         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
4181         (dbus_dict_set_string_array), (_dbus_dict_test):
4182         * dbus/dbus-dict.h:
4183         Fix according to comments from Havoc.
4184
4185 2003-03-06  Michael Meeks  <michael@server.home>
4186
4187         * configure.in: if we don't have kde-config, disable have_qt.
4188
4189 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
4190
4191         * dbus/Makefile.am:
4192         Add dbus-dict.[ch]
4193
4194         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
4195         (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
4196         (dbus_dict_remove), (dbus_dict_get_value_type),
4197         (dbus_dict_get_keys), (dbus_dict_put_boolean),
4198         (dbus_dict_put_int32), (dbus_dict_put_uint32),
4199         (dbus_dict_put_double), (dbus_dict_put_string),
4200         (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
4201         (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
4202         (dbus_dict_put_string_array), (dbus_dict_get_boolean),
4203         (dbus_dict_get_int32), (dbus_dict_get_uint32),
4204         (dbus_dict_get_double), (dbus_dict_get_string),
4205         (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
4206         (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
4207         (dbus_dict_get_string_array), (_dbus_dict_test):
4208         * dbus/dbus-dict.h:
4209         Add DBusDict implementation
4210
4211         * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
4212         * dbus/dbus-test.h:
4213         Add _dbus_dict_test
4214
4215 2003-03-04  Havoc Pennington  <hp@pobox.com>
4216
4217         * test/data/auth/*: adapt to changes
4218
4219         * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
4220         USERID_BASE64 and change USERNAME_BASE64 to put in username not
4221         userid
4222
4223         * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
4224         more stuff from being in a context name, to make the protocol
4225         simpler to deal with
4226
4227         * dbus/dbus-errors.c (dbus_error_has_name): new function
4228         (dbus_error_is_set): new function
4229
4230         * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
4231         with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
4232
4233         * dbus/dbus-connection.c (dbus_connection_flush): also read
4234         messages during a flush operation
4235
4236         * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
4237
4238 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
4239
4240         * configure.in: Check for gethostbyname on Solaris.
4241
4242         * dbus/dbus-transport.c: (_dbus_transport_open):
4243         Remove duplicate "tcp" entry.
4244
4245         * doc/dbus-specification.sgml:
4246         Clarify some things.
4247
4248 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
4249
4250         * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
4251         * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
4252         (_dbus_keyring_test):
4253         * dbus/dbus-md5.c: (_dbus_md5_compute):
4254         * dbus/dbus-sha.c: (_dbus_sha_compute):
4255         Plug memory leaks.
4256
4257 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
4258
4259         * README: Add some things.
4260
4261 2003-03-04  Anders Carlsson  <andersca@codefactory.se>
4262
4263         * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
4264         after case DBUS_TYPE_BOOELAN.
4265
4266 2003-03-02  Havoc Pennington  <hp@pobox.com>
4267
4268         * test/break-loader.c (randomly_set_extreme_ints): add test that
4269         sets really huge and small integers
4270
4271         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
4272         that length of boolean array fits in the string, and that
4273         string has room for boolean value in single-bool case.
4274
4275         * dbus/dbus-message-builder.c (_dbus_message_data_load): add
4276         optional value to "ALIGN" command which is what to fill the
4277         alignment with.
4278
4279         * test/data/valid-messages/no-padding.message: add regression
4280         test for the message padding problem
4281
4282 2003-03-02  Havoc Pennington  <hp@pobox.com>
4283
4284         * dbus/dbus-message.c (decode_header_data): fix to always init
4285         message_padding, from Benjamin Dauvergne
4286
4287 2003-03-02  Havoc Pennington  <hp@pobox.com>
4288
4289         * configure.in: 0.5
4290
4291         * NEWS: Update.
4292
4293 2003-03-01  Joe Shaw  <joe@assbarn.com>
4294
4295         * configure.in: Check for "struct cmsgcred" and try to access its
4296         members for BSD-like unices.
4297
4298         * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
4299         _dbus_read_credentials_unix_socket().
4300         (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
4301         read() for reading the credential byte off the unix socket.  Use
4302         struct cmsgcred on systems that support it.
4303
4304 2003-02-27  Alexander Larsson  <alexl@redhat.com>
4305
4306         * glib/Makefile.am:
4307         * configure.in:
4308         Make gthreads-2.0 dependency optional. Don't build thread test if
4309         its not found.
4310
4311 2003-02-27  Havoc Pennington  <hp@pobox.com>
4312
4313         * dbus/dbus-connection.c
4314         (dbus_connection_send_message_with_reply_and_block): fix doh!
4315         doh! doh! bug that resulted in never removing a reply from the
4316         queue, no wonder we called get_reply_serial so much ;-)
4317
4318         * dbus/dbus-message.c (struct DBusMessage): cache reply serial
4319         and client serial instead of demarshaling them every time
4320
4321 2003-02-27  Havoc Pennington  <hp@pobox.com>
4322
4323         * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
4324         more inlined, using dbus-string-private.h, speeds things up
4325         substantially
4326
4327         * dbus/dbus-string.c (_dbus_string_free): apply align offset
4328         when freeing the string
4329         (_dbus_string_steal_data): fix for align offset
4330         (undo_alignment): new function
4331
4332 2003-02-26  Havoc Pennington  <hp@redhat.com>
4333
4334         All kinds of audit fixes from Owen, plus initial attempt to
4335         handle unaligned memory returned from malloc.
4336
4337         * dbus/dbus-string.c (_dbus_string_init): clamp max length to
4338         leave room for align_offset and nul byte
4339         (fixup_alignment): function to track an align_offset and
4340         ensure real->str is aligned
4341         (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
4342         to allow a nul byte plus align offset
4343         (_dbus_string_lock): fix overflow issue
4344         (_dbus_string_init_const_len): add assertions on sanity of len,
4345         assign allocated to be ALLOCATION_PADDING larger than len
4346         (set_length): fixup the overflow handling
4347         (_dbus_string_get_data_len): fix overflow in assertion
4348         (open_gap): detect overflow in size of gap to be opened
4349         (_dbus_string_lengthen): add overflow check
4350         (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
4351         (_dbus_string_append): add overflow check
4352         (_dbus_string_append_unichar): overflow
4353         (_dbus_string_delete): fix overflow in assertion
4354         (_dbus_string_copy_len): overflow in assertion
4355         (_dbus_string_replace_len): overflows in assertions
4356         (_dbus_string_find): change to implement in terms of
4357         _dbus_string_find_to
4358         (_dbus_string_find_to): assorted fixage
4359         (_dbus_string_equal_c_str): assert c_str != NULL,
4360         fix logic so the function works
4361         (_dbus_string_ends_with_c_str): fix overflow thingy
4362         (_dbus_string_base64_encode): overflow fix
4363         (_dbus_string_validate_ascii): overflow
4364         (_dbus_string_validate_nul): overflow
4365
4366 2003-02-26  Havoc Pennington  <hp@redhat.com>
4367
4368         * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
4369
4370 2003-02-26  Alexander Larsson  <alexl@redhat.com>
4371
4372         * configure.in:
4373         Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
4374
4375         * dbus/dbus-connection.c:
4376         * dbus/dbus-connection.h:
4377         Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
4378         Add dbus_connection_set_wakeup_main_function and use it when queueing
4379         incoming and outgoing messages.
4380
4381
4382         * dbus/dbus-dataslot.c:
4383         Threadsafe usage of DBusDataSlotAllocator
4384
4385         * dbus/dbus-message.c: (dbus_message_get_args_iter):
4386         dbus_new can fail.
4387
4388         * dbus/dbus-server-unix.c:
4389         Add todo comment
4390
4391         * glib/dbus-gmain.c:
4392         Implement the new wakeup functions for glib.
4393
4394         * glib/Makefile.am:
4395         * glib/test-thread-client.c:
4396         * glib/test-thread-server.c:
4397         * glib/test-thread.h:
4398         Initial cut at some thread test code. Not really done yet.
4399
4400 2003-02-26  Havoc Pennington  <hp@pobox.com>
4401
4402         * dbus/dbus-connection.c
4403         (dbus_connection_send_message_with_reply_and_block): fix crash
4404         where we ref'd the outgoing message instead of the returned reply
4405
4406         * dbus/dbus-transport-unix.c (do_authentication): check read watch
4407         at the end of this function, so if we didn't need to read for
4408         authentication, we reinstall it for receiving messages
4409
4410         * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
4411         a NULL sender for peer-to-peer case
4412
4413         * dbus/dbus-transport-unix.c (check_read_watch): handle
4414         !authenticated case correctly
4415
4416         * glib/dbus-gmain.c: add support for DBusServer
4417
4418         * dbus/dbus-server.c: add data slot support
4419
4420         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
4421         return values and handle errors
4422
4423         * dbus/dbus-dataslot.c: factor out the data slot stuff from
4424         DBusConnection
4425
4426         * Doxyfile.in (INPUT): add glib subdir
4427
4428         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
4429         setup_with_g_main instead of hookup_with_g_main; write docs
4430
4431 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
4432
4433         * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
4434         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4435         * dbus/dbus-message.c: (dbus_message_append_boolean),
4436         (dbus_message_append_boolean_array),
4437         (dbus_message_get_args_valist), (_dbus_message_test):
4438         * dbus/dbus-message.h:
4439         * doc/dbus-specification.sgml:
4440         Various fixes as pointed out by Havoc.
4441
4442         * test/data/invalid-messages/bad-boolean-array.message:
4443         * test/data/invalid-messages/bad-boolean.message:
4444         Add invalid boolean value test cases.
4445
4446 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
4447
4448         * dbus/dbus-internals.c: (_dbus_type_to_string):
4449         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
4450         (_dbus_marshal_validate_arg):
4451         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
4452         * dbus/dbus-message.c: (dbus_message_append_args_valist),
4453         (dbus_message_append_boolean), (dbus_message_append_boolean_array),
4454         (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
4455         (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
4456         (dbus_message_iter_get_double),
4457         (dbus_message_iter_get_boolean_array), (message_iter_test):
4458         * dbus/dbus-message.h:
4459         * dbus/dbus-protocol.h:
4460         * doc/dbus-specification.sgml:
4461         * test/data/valid-messages/lots-of-arguments.message:
4462         Add support for boolean and boolean array types.
4463
4464 2003-02-23  Havoc Pennington  <hp@pobox.com>
4465
4466         * dbus/dbus-keyring.c: finish most of this implementation and
4467         simple unit test
4468
4469         * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
4470         these barf if the error isn't cleared to NULL
4471
4472         * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
4473         (_dbus_create_directory): new function
4474
4475         * dbus/dbus-errors.c (dbus_set_error): fix warning
4476
4477         * dbus/dbus-string.c (_dbus_string_hex_encode): new function
4478         (_dbus_string_hex_decode): new function
4479         (test_hex_roundtrip): test code
4480
4481         * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
4482
4483         * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
4484
4485         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
4486         the save-to-temp/rename trick to atomically write the new file
4487         (_dbus_string_parse_uint): new function
4488
4489 2003-02-22  Havoc Pennington  <hp@pobox.com>
4490
4491         * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
4492
4493 2003-02-22  Havoc Pennington  <hp@pobox.com>
4494
4495         * dbus/dbus-message.c (dbus_message_iter_get_string_array):
4496         (dbus_message_iter_get_byte_array): Fix up doxygen warnings
4497
4498         * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
4499
4500         * dbus/test/data/sha-1: add US government test suite for SHA-1
4501
4502 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
4503
4504         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
4505         Make string arrays NULL-terminated.
4506
4507         * dbus/dbus-memory.c: (dbus_free_string_array):
4508         * dbus/dbus-memory.h:
4509         New function for freeing NULL-terminated string arrays.
4510
4511         * dbus/dbus-message-builder.c: (append_quoted_string),
4512         (_dbus_message_data_load):
4513         Add support for array types.
4514
4515         * dbus/dbus-message.c: (check_message_handling):
4516         Add more types as test cases.
4517
4518         * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
4519         (_dbus_string_parse_double):
4520         Add the start offset to the end offset.
4521
4522         * test/data/valid-messages/lots-of-arguments.message:
4523         New test message with lots of arguments.
4524
4525 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
4526
4527         * dbus/dbus-message.c: (dbus_message_append_nil),
4528         (dbus_message_append_int32), (dbus_message_append_uint32),
4529         (dbus_message_append_double), (dbus_message_append_string),
4530         (dbus_message_append_int32_array),
4531         (dbus_message_append_uint32_array),
4532         (dbus_message_append_double_array),
4533         (dbus_message_append_byte_array),
4534         (dbus_message_append_string_array):
4535         Fix all out-of-memory handling in these functions.
4536
4537 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
4538
4539         * dbus/dbus-message.c: (dbus_message_append_nil):
4540         Fix a silly.
4541
4542 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
4543
4544         * dbus/dbus-message.c: (dbus_message_append_args_valist),
4545         (dbus_message_append_nil), (dbus_message_append_int32_array),
4546         (dbus_message_append_uint32_array),
4547         (dbus_message_append_double_array),
4548         (dbus_message_append_byte_array),
4549         (dbus_message_append_string_array), (dbus_message_get_args_valist),
4550         (dbus_message_iter_get_int32_array),
4551         (dbus_message_iter_get_uint32_array),
4552         (dbus_message_iter_get_double_array),
4553         (dbus_message_iter_get_byte_array),
4554         (dbus_message_iter_get_string_array):
4555
4556         * dbus/dbus-message.h:
4557         Add functions for appending and getting arrays.
4558
4559 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
4560
4561         * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
4562         element size at least 8 bytes, fixes mempool tests on
4563         64-bit machines.
4564
4565 2003-02-20  Alexander Larsson  <alexl@redhat.com>
4566
4567         * dbus/dbus-transport-unix.c (unix_do_iteration):
4568         Unlock the connection mutex during a blocking select call.
4569         Add todo about how we need a way to wake up the select.
4570
4571         * dbus/dbus-connection-internal.h:
4572         * dbus/dbus-connection.c:
4573         Add _dbus_connection_lock and _dbus_connection_unlock.
4574
4575 2003-02-19  Havoc Pennington  <hp@pobox.com>
4576
4577         * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
4578         Doxyfile.in, not Doxyfile
4579
4580         * dbus/dbus-keyring.c: do some hacking on this
4581
4582         * dbus/dbus-sysdeps.c (_dbus_delete_file): new
4583
4584         * dbus/dbus-errors.c (dbus_set_error_const): do not call
4585         dbus_error_init
4586         (dbus_set_error): remove dbus_error_init, check for message ==
4587         NULL *before* we sprintf into it, and add @todo about including
4588         system headers in this file
4589
4590         * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
4591
4592         * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
4593
4594         * dbus/dbus-sysdeps.c (get_user_info): break this function out to
4595         get various bits of user information based on either username
4596         or user ID
4597         (_dbus_homedir_from_username): new function
4598
4599 2003-02-19  Anders Carlsson  <andersca@codefactory.se>
4600
4601         * configure.in:
4602         Add check for nonposix getpwnam_r
4603
4604         * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
4605         Align the pool element size to a sizeof (void *) boundary.
4606
4607         * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
4608         (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
4609         General Solaris fixes.
4610
4611         * test/data/valid-messages/simplest-manual.message:
4612         Explicitly state that we want little-endian packing.
4613
4614 2003-02-19  Mikael Hallendal  <micke@codefactory.se>
4615
4616         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4617
4618         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
4619         Added to create a transport connecting using a tcp/ip socket.
4620
4621         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
4622         to a tcp socket at given host and port.
4623         (_dbus_listen_tcp_socket): added to listen on tcp socket for given
4624         hostname and port.
4625
4626         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
4627
4628         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
4629         Added to create a server listening on a TCP/IP socket.
4630
4631 2003-02-19  Havoc Pennington  <hp@pobox.com>
4632
4633         Throughout: mop up all the Doxygen warnings and undocumented
4634         stuff.
4635
4636         * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
4637         to search any paths.
4638
4639         * dbus/dbus-threads.c: move global mutex initializers to
4640         dbus-internals.h, multiple prototypes was confusing doxygen
4641         besides being kind of ugly
4642
4643         * Doxyfile (PREDEFINED): have Doxygen define
4644         DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
4645         docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
4646         (do not abuse the feature! it's for stuff like the autogenerated
4647         macros in dbus-md5.c, not just for things you don't feel like
4648         documenting...)
4649
4650 2003-02-18  Havoc Pennington  <hp@pobox.com>
4651
4652         * dbus/dbus-string.c (_dbus_string_zero): new function
4653
4654         * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
4655         wrap it in some dbus-friendly API
4656
4657         * dbus/dbus-types.h: add 16-bit types
4658
4659 2003-02-18  Joe Shaw  <joe@assbarn.com>
4660
4661         * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
4662         credentials from our currently running process.
4663         (get_word): Fix a buglet where we were copying the entire length
4664         instead of relative to our position.
4665
4666         * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
4667         keys on the stack... it's 640k of data.
4668
4669         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
4670         read the credentials byte off the socket, even if we don't have
4671         SO_PEERCRED.
4672         (_dbus_poll): Implement poll() using select() for systems which
4673         don't have it.
4674
4675         * glib/test-dbus-glib.c (main): Print out an error if no
4676         parameters are given.
4677
4678         * test/data/auth/fallback.auth-script: Added.  Tests that a client
4679         can fallback to a secondary auth mechanism if the first fails.
4680
4681 2003-02-18  Havoc Pennington  <hp@pobox.com>
4682
4683         * AUTHORS: add Alex
4684
4685 2003-02-17  Havoc Pennington  <hp@pobox.com>
4686
4687         * doc/dbus-specification.sgml: lots of cosmetic
4688         cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
4689         env variable to DBUS_BUS_ADDRESS, s/client/application/,
4690         s/server/bus/ (except in authentication section). Add a section
4691         "Message Bus Message Routing"
4692
4693 2003-02-17  Anders Carlsson  <andersca@codefactory.se.>
4694
4695         Release 0.4
4696
4697         * NEWS: Update
4698
4699 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
4700
4701         * doc/dbus-specification.sgml:
4702         Specification updates.
4703
4704 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
4705
4706         * bus/activation.c: (bus_activation_init), (child_setup),
4707         (bus_activation_activate_service):
4708         * bus/activation.h:
4709         * bus/main.c: (main):
4710         Set DBUS_ADDRESS environment variable.
4711
4712         * dbus/dbus-errors.c: (dbus_set_error):
4713         Don't use va_copy since that's a C99 feature.
4714
4715         * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
4716         (_dbus_spawn_async):
4717         * dbus/dbus-sysdeps.h:
4718         Add child_setup_func to _dbus_spawn_async.
4719
4720         * doc/dbus-specification.sgml:
4721         Update specification.
4722
4723         * test/spawn-test.c: (setup_func), (main):
4724         Fix test.
4725
4726 2003-02-17  Alexander Larsson  <alexl@redhat.com>
4727
4728         * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
4729         Added todo.
4730
4731 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
4732
4733         * doc/.cvsignore:
4734         * doc/Makefile.am:
4735         * doc/dbus-test-plan.sgml:
4736         Add test plan document.
4737
4738         * test/Makefile.am:
4739         Fix distcheck.
4740
4741 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
4742
4743         * dbus/dbus-message.c: (decode_header_data),
4744         (_dbus_message_loader_return_buffer):
4745         Set the header padding amount when loading a message.
4746
4747 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
4748
4749         * bus/dispatch.c: (send_one_message):
4750         Only send broadcast messages to registered connections.
4751
4752         * dbus/dbus-message.c: (dbus_message_name_is):
4753         * dbus/dbus-message.h:
4754         New convenience function.
4755
4756         * dbus/dbus-transport-debug.c: (do_reading):
4757         Only dispatch one message per run.
4758
4759         * test/Makefile.am:
4760         * test/bus-test.c: (new_connection_callback), (die),
4761         (test_hello_client1_handler), (test_hello_client2_handler),
4762         (test_hello_replies), (main):
4763
4764         * test/bus-test-loop.[ch]:
4765         Add these.
4766
4767 2003-02-16  Havoc Pennington  <hp@pobox.com>
4768
4769         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
4770         backward conditional
4771
4772 2003-02-16  Alexander Larsson  <alexl@redhat.com>
4773
4774         * dbus/dbus-connection.c:
4775         Implement sent_message_with_reply. (with_reply_and block is still
4776         busted).
4777         Made dispatch_message not lose message if OOM.
4778
4779         * dbus/dbus-errors.h:
4780         Add NoReply error (for reply timeouts).
4781
4782 2003-02-16  Alexander Larsson  <alexl@redhat.com>
4783
4784         * dbus/dbus-hash.c (_dbus_hash_table_unref):
4785         Actually free keys and values when destroying hashtable.
4786
4787 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
4788
4789         * dbus/dbus-auth.c: (client_try_next_mechanism):
4790         Plug a leak.
4791
4792         * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
4793         Return TRUE if there's no thread implementation around.
4794
4795         * glib/dbus-gmain.c: (free_source),
4796         (dbus_connection_hookup_with_g_main):
4797         Make sure to remove the GSource when the connection is finalized.
4798
4799 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
4800
4801         * bus/dispatch.c: (bus_dispatch_message_handler):
4802         * dbus/dbus-errors.h:
4803         Return an error if someone tries to send a message to a service
4804         that doesn't exist.
4805
4806 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
4807
4808         * bus/activation.c: (load_directory), (bus_activation_init),
4809         (bus_activation_activate_service):
4810         * bus/activation.h:
4811         * bus/driver.c:
4812         (bus_driver_handle_activate_service), (bus_driver_handle_message):
4813         More work on the activation handling.
4814
4815         * dbus/dbus-errors.h:
4816         Add some error messages
4817
4818         * dbus/dbus-message.c: (dbus_message_new_error_reply):
4819         * dbus/dbus-message.h:
4820         New function that creates an error message.
4821
4822         * dbus/dbus-protocol.h:
4823         Add ACTIVATE_SERVER message.
4824
4825         * dbus/dbus-server-unix.c: (unix_handle_watch),
4826         (_dbus_server_new_for_domain_socket):
4827         Call _dbus_fd_set_close_on_exec.
4828
4829         * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
4830         (_dbus_spawn_async), (_dbus_disable_sigpipe),
4831         (_dbus_fd_set_close_on_exec):
4832         * dbus/dbus-sysdeps.h:
4833         Add _dbus_fd_set_close_on exec function. Also add function that checks
4834         that all open fds are set to close-on-exec and warns otherwise.
4835
4836         * dbus/dbus-transport-unix.c:
4837         (_dbus_transport_new_for_domain_socket):
4838         Call _dbus_fd_set_close_on_exec.
4839
4840 2003-02-16  Havoc Pennington  <hp@pobox.com>
4841
4842         * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
4843         allow people to avoid setting SIGPIPE to SIG_IGN
4844         (_dbus_connection_new_for_transport): disable SIGPIPE unless
4845         we've been asked not to
4846
4847 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
4848
4849         * dbus/dbus-list.c: (_dbus_list_append_link),
4850         (_dbus_list_prepend_link):
4851         * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
4852         (dbus_realloc):
4853         Warning fixes.
4854
4855 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
4856
4857         * bus/Makefile.am:
4858         * bus/activation.c: (bus_activation_entry_free),
4859         (add_desktop_file_entry), (load_directory), (bus_activation_init):
4860         * bus/activation.h:
4861         * bus/main.c: (main):
4862         Add simple activation support, doesn't work yet though.
4863
4864 2003-02-15   Zack Rusin  <zack@kde.org>
4865
4866         * qt/dbus-qthread.cpp:  small casting fix
4867
4868 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
4869
4870         * dbus/dbus-errors.c: (dbus_set_error):
4871         * dbus/dbus-errors.h:
4872         Add a few errors and make dbus_set_error void.
4873
4874         * dbus/dbus-sysdeps.c:
4875         (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
4876         (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
4877         * dbus/dbus-sysdeps.h:
4878         Add _dbus_spawn_async.
4879
4880         * test/spawn-test.c: (main):
4881         Test for _dbus_spawn_async.
4882
4883 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
4884
4885         * dbus/dbus-internals.h:
4886         Fix build without tests.
4887
4888         * dbus/dbus-list.c: (alloc_link):
4889         Fix a segfault when a malloc fails.
4890
4891         * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
4892         (dbus_malloc0), (dbus_realloc):
4893         Add support for malloc debugging.
4894
4895 2003-02-15  Alexander Larsson  <alexl@redhat.com>
4896
4897         * dbus/dbus-threads.c:
4898         * dbus/dbus-threads.h:
4899         Add condvars. Remove static mutext from API.
4900         Implement static mutexes by initializing them from threads_init.
4901
4902         * glib/dbus-gthread.c:
4903         * qt/dbus-qthread.cpp:
4904         Update with the thread api changes.
4905
4906
4907         * dbus/dbus-list.c:
4908         * dbus/dbus-list.h:
4909         Turn StaticMutex into normal mutex + init function.
4910         Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
4911         _dbus_list_append_link, _dbus_list_prepend_link
4912
4913
4914         * dbus/dbus-sysdeps.c:
4915         * dbus/dbus-sysdeps.h:
4916         New type dbus_atomic_t, and new functions _dbus_atomic_inc,
4917         _dbus_atomic_dec. Only slow fallback implementation at the moment.
4918
4919         * dbus/dbus-protocol.h:
4920         Add DBUS_MESSAGE_LOCAL_DISCONNECT define
4921
4922         * dbus/dbus-message.c:
4923         Make ref/unref atomic.
4924         Fix some docs.
4925
4926         * dbus/dbus-connection-internal.h:
4927         * dbus/dbus-connection.c:
4928         * dbus/dbus-connection.h:
4929         Make threadsafe.
4930         Change _peek to _borrow,_return & _steal_borrowed.
4931         Change disconnect callback to event.
4932         Make dbus_connection_dispatch_messages reentrant.
4933
4934         * dbus/dbus-transport.c:
4935         Don't ref the connection on calls to the transport
4936         implementation.
4937
4938         * dbus/dbus-message-handler.c:
4939         Make threadsafe.
4940
4941         * glib/dbus-gmain.c:
4942         Don't use peek_message anymore
4943
4944         * test/Makefile.am:
4945         * test/debug-thread.c:
4946         * test/debug-thread.h:
4947         Simple thread implementation that asserts() on deadlocks in
4948         single-threaded code.
4949
4950         * test/bus-test.c:
4951         (main) Call debug_threads_init.
4952
4953         * test/watch.c:
4954         Use disconnect message instead of disconnect callback.
4955
4956         * bus/connection.c:
4957         * bus/connection.h:
4958         Don't call dbus_connection_set_disconnect_function. Instead export
4959         bus_connection_disconnect.
4960
4961         * bus/dispatch.c:
4962         Call bus_connection_disconnect when we get a disconnected message.
4963
4964 2003-02-15  Havoc Pennington  <hp@pobox.com>
4965
4966         * dbus/dbus-message.c (dbus_message_new): fool around with the
4967         docs
4968
4969 2003-02-14  Havoc Pennington  <hp@pobox.com>
4970
4971         * dbus/dbus-mempool.c: fail if the debug functions so indicate
4972
4973         * dbus/dbus-memory.c: fail if the debug functions indicate we
4974         should
4975
4976         * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
4977         (_dbus_decrement_fail_alloc_counter): debug functions to
4978         simulate memory allocation failures
4979
4980 2003-02-14  Havoc Pennington  <hp@pobox.com>
4981
4982         * dbus/dbus-errors.h (struct DBusError): add a word of padding
4983         to DBusError
4984
4985 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
4986
4987         * bus/driver.c: (bus_driver_handle_hello):
4988         * bus/driver.h:
4989         * bus/services.c: (bus_service_lookup):
4990         Reorder message sending so we get a more sane order.
4991
4992         * test/bus-test.c: (message_handler):
4993         Fix tyop.
4994
4995 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
4996
4997         * bus/driver.c: (bus_driver_send_service_deleted),
4998         (bus_driver_send_service_created), (bus_driver_send_service_lost),
4999         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5000         (bus_driver_send_welcome_message),
5001         (bus_driver_handle_list_services),
5002         (bus_driver_handle_acquire_service),
5003         (bus_driver_handle_service_exists):
5004         * dbus/dbus-bus.c: (dbus_bus_register_client),
5005         (dbus_bus_acquire_service), (dbus_bus_service_exists):
5006         * dbus/dbus-errors.c: (dbus_result_to_string):
5007         * dbus/dbus-errors.h:
5008         * dbus/dbus-message.c: (dbus_message_append_args),
5009         (dbus_message_append_args_valist), (dbus_message_get_args),
5010         (dbus_message_get_args_valist), (dbus_message_get_args_iter),
5011         (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
5012         (dbus_message_iter_get_byte_array),
5013         (dbus_message_iter_get_string_array), (message_iter_test),
5014         (check_message_handling), (_dbus_message_test):
5015         * dbus/dbus-message.h:
5016         * test/bus-test.c: (main):
5017         Change fields to arguments in messages, so that they won't be
5018         confused with header fields.
5019
5020         * glib/test-dbus-glib.c: (main):
5021         Remove append_fields from hello message.
5022
5023 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5024
5025         * dbus/dbus-errors.c:
5026         * dbus/dbus-message.c:
5027         * dbus/dbus-string.c:
5028         Documentation fixes.
5029
5030 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5031
5032         * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
5033         (remove_timeout):
5034         Implement support for timeouts in dbus-glib.
5035
5036 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5037
5038         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
5039         * dbus/dbus-message.c: (process_test_subdir):
5040         * test/break-loader.c: (find_breaks_based_on):
5041         Plug some memory leaks.
5042
5043 2003-02-13  Richard Hult  <rhult@codefactory.se>
5044
5045         * bus/main.c: Fix build.
5046
5047         * dbus/dbus-errors.h:
5048         * dbus/dbus-errors.c: Fix copyright for Anders.
5049
5050 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5051
5052         * bus/Makefile.am:
5053         Add utils.[ch]
5054
5055         * bus/connection.c: (bus_connection_foreach):
5056         Fix a warning.
5057
5058         * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
5059         (unescape_string), (new_section), (parse_section_start),
5060         (parse_key_value), (report_error), (bus_desktop_file_load),
5061         (bus_desktop_file_get_string):
5062         * bus/desktop-file.h:
5063         Use DBusError for error reporting.
5064
5065         * bus/dispatch.c: (send_one_message),
5066         (bus_dispatch_message_handler):
5067         * bus/driver.c: (bus_driver_send_service_deleted),
5068         (bus_driver_send_service_created), (bus_driver_send_service_lost),
5069         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
5070         (bus_driver_send_welcome_message),
5071         (bus_driver_handle_list_services),
5072         (bus_driver_handle_acquire_service),
5073         (bus_driver_handle_service_exists):
5074         * bus/loop.c: (bus_loop_run):
5075         * bus/main.c:
5076         Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
5077
5078         * bus/utils.c: (bus_wait_for_memory):
5079         * bus/utils.h:
5080         New files with general utility functions.
5081
5082         * dbus/dbus-internals.h:
5083         Remove _DBUS_HANDLE_OOM.
5084
5085 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5086
5087         * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
5088         (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
5089         * dbus/dbus-errors.h:
5090         Add DBusError structure.
5091
5092 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5093
5094         * test/data/valid-messages/standard-acquire-service.message:
5095         * test/data/valid-messages/standard-hello.message:
5096         * test/data/valid-messages/standard-list-services.message:
5097         * test/data/valid-messages/standard-service-exists.message:
5098         Add some standard messages.
5099
5100 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5101
5102         * bus/driver.c: (bus_driver_send_welcome_message),
5103         (bus_driver_handle_list_services),
5104         (bus_driver_handle_acquire_service),
5105         (bus_driver_handle_service_exists), (bus_driver_handle_message):
5106         Update for API changes in libdbus.
5107
5108         * dbus/dbus-message.c: (dbus_message_new_reply):
5109         * dbus/dbus-message.h:
5110         Remove the name argument. The spec states that replies shouldn't
5111         have a name.
5112
5113 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
5114
5115         * bus/desktop-file.c: (parse_section_start), (parse_key_value),
5116         (report_error), (bus_desktop_file_load), (lookup_section),
5117         (lookup_line), (bus_desktop_file_get_raw),
5118         (bus_desktop_file_get_string):
5119         * bus/desktop-file.h:
5120         Some fixes, and new functions for getting a key value from a section.
5121
5122 2003-02-13  Havoc Pennington  <hp@pobox.com>
5123
5124         * test/data/auth/fail-after-n-attempts.auth-script: new test
5125
5126         * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
5127         reject the client.
5128
5129 2003-02-13  Havoc Pennington  <hp@pobox.com>
5130
5131         * dbus/dbus-auth.c (handle_server_data_external_mech): args to
5132         dbus_credentials_match were backward
5133
5134         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
5135         NO_CREDENTIALS and ROOT_CREDENTIALS
5136
5137         * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
5138         into here. Never process more commands after we've reached an
5139         end state; store further data as unused bytes.
5140
5141         * test/data/auth/*: add more auth tests
5142
5143         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
5144         command to match exact string and EXPECT_UNUSED to match unused
5145         bytes
5146
5147         * test/Makefile.am (dist-hook): fix to dist all the test stuff
5148
5149 2003-02-12  Havoc Pennington  <hp@pobox.com>
5150
5151         * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
5152         \r off of popped lines
5153
5154         * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
5155         scripts
5156
5157         * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
5158         SEND, append \r\n
5159
5160 2003-02-12  Havoc Pennington  <hp@pobox.com>
5161
5162         * dbus/Makefile.am: remove break-loader from the build, since it
5163         moved.
5164
5165         * configure.in: add --enable-gcov to turn on coverage profiling
5166         flags and disable optimization
5167
5168 2003-02-10  Havoc Pennington  <hp@pobox.com>
5169
5170         * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
5171         initial cut at test framework for DBusAuth from laptop.
5172         Doesn't quite work yet but it compiles and I need to get
5173         it off the 266mhz laptop. ;-)
5174
5175         * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
5176         fix a memleak in error case
5177
5178 2003-02-12  Anders Carlsson  <andersca@codefactory.se>
5179
5180         * bus/Makefile.am:
5181         * bus/desktop-file.c:
5182         * bus/desktop-file.h:
5183         Add a desktop file parser.
5184
5185 2003-02-11  Zack Rusin  <zack@kde.org>
5186
5187         * qt/message.[h|cpp]: sample implementation
5188         of the KDE wrapper for DBusMessage
5189
5190 2003-02-09  Zack Rusin  <zack@kde.org>
5191
5192         * test/bus-test.c: make_it_compile
5193         * doc/dbus-specification.sgml: minimal semantic fix
5194
5195 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
5196
5197         Release 0.3
5198
5199         * NEWS: Update
5200
5201 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
5202
5203         * dbus/Makefile.am:
5204         * dbus/dbus-break-loader.c:
5205         * test/Makefile.am:
5206         * test/break-loader.c:
5207         Move dbus-break-loader to test/ and rename it to break-loader.
5208
5209 2003-02-02  Havoc Pennington  <hp@pobox.com>
5210
5211         * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
5212         for code to manage cookies in your home directory
5213
5214         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
5215
5216         * dbus/dbus-auth.c (get_state): impose a maximum number of tries
5217         to authenticate, then disconnect the client.
5218
5219 2003-02-03  Alexander Larsson  <alexl@redhat.com>
5220
5221         * dbus/dbus-message.c (dbus_message_append_fields):
5222         Correct docs.
5223
5224 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
5225
5226         * doc/dbus-specification.sgml:
5227         Update address format section.
5228
5229 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
5230
5231         * test/Makefile.am:
5232         * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
5233         (message_handler), (new_connection_callback), (loop_quit),
5234         (loop_run), (main):
5235         Add bus test.
5236
5237 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
5238
5239         * bus/driver.c: (bus_driver_handle_service_exists):
5240         Simplify the code a bit.
5241
5242         * dbus/dbus-bus.c: (dbus_bus_service_exists):
5243         Fix a silly.
5244
5245 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
5246
5247         * bus/Makefile.am:
5248         Add libdbus-daemon.la and link to it.
5249
5250 2003-02-01  James Willcox  <jwillcox@gnome.org>
5251
5252         * bus/driver.c: (bus_driver_handle_own_service):
5253         Actually include the service reply code in the message.
5254
5255 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
5256
5257         * bus/driver.c: (bus_driver_handle_service_exists):
5258         Don't unref the incoming message.
5259
5260 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
5261
5262         * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
5263
5264 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
5265
5266         * dbus/dbus-server.c: (dbus_server_listen):
5267         * dbus/dbus-transport.c: (_dbus_transport_open):
5268         ifdef out the calls to the debug transport and server.
5269
5270 2003-02-02  Alexander Larsson  <alexl@redhat.com>
5271
5272         * dbus/dbus-watch.c (dbus_watch_get_flags):
5273         Add note in the docs that ERROR or HANGUP won't be returned
5274         and are assumed always on.
5275
5276         * glib/dbus-gmain.c (add_watch):
5277         Always add IO_ERR | IO_HUP
5278
5279         * dbus/dbus-message.h:
5280         Add semicolon after dbus_message_iter_get_string_array().
5281         Makes qt code build again
5282
5283 2003-02-01  Anders Carlsson  <andersca@codefactory.se>
5284
5285         * bus/driver.c: (create_unique_client_name),
5286         (bus_driver_handle_hello):
5287         Don't take a name, just use a numeric id to identify
5288         each client.
5289
5290         * dbus/Makefile.am:
5291         * dbus/dbus-bus.c: (dbus_bus_register_client),
5292         (dbus_bus_acquire_service), (dbus_bus_service_exists):
5293         * dbus/dbus-bus.h:
5294         Add new convenience functions for communicating with the bus.
5295
5296         * dbus/dbus-message.h:
5297
5298         * dbus/dbus-protocol.h:
5299         Fix a typo.
5300
5301 2003-02-01  Alexander Larsson  <alexl@redhat.com>
5302
5303         * dbus/dbus-message.c (dbus_message_append_fields):
5304         Add some more doc comments.
5305
5306 2003-02-01  Havoc Pennington  <hp@pobox.com>
5307
5308         * dbus/dbus-break-loader.c (randomly_modify_length): change
5309         a 4-byte value in the message as if it were a length
5310
5311         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
5312         execute bit on saved files
5313
5314 2003-02-01  Havoc Pennington  <hp@pobox.com>
5315
5316         * dbus/dbus-break-loader.c (main): new program to find messages
5317         that break the loader.
5318
5319         * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
5320         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
5321
5322         * dbus/dbus-string.c (_dbus_string_set_byte): new
5323
5324 2003-01-31  Havoc Pennington  <hp@pobox.com>
5325
5326         * dbus/dbus-message.c: refactor the test code to be more general,
5327         in preparation for writing a "randomly permute test cases to
5328         try to break the loader" program.
5329
5330 2003-01-31  Havoc Pennington  <hp@pobox.com>
5331
5332         * doc/dbus-specification.sgml: work on the specification
5333
5334         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
5335         the protocol version of the message.
5336
5337         * dbus/dbus-protocol.h: drop special _REPLY names, the spec
5338         no longer specifies that.
5339         (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
5340         1/2/3/4)
5341
5342         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
5343         "break" for DBUS_TYPE_NIL, remove @todo
5344
5345 2003-01-31  Havoc Pennington  <hp@pobox.com>
5346
5347         * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
5348         just set_is_error/get_is_error as this is a commonly-used
5349         function, and write docs.
5350
5351 2003-01-31  Anders Carlsson  <andersca@codefactory.se>
5352
5353         * dbus/dbus-address.c: (dbus_address_entry_free):
5354         Free key and value lists.
5355
5356         * dbus/dbus-internals.c: (_dbus_type_to_string):
5357         Add the types we didn't have.
5358
5359         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
5360         (_dbus_marshal_validate_arg):
5361         Add NIL types.
5362
5363         * dbus/dbus-message.c: (dbus_message_set_sender):
5364         Remove todo about being able to set sender to NULL.
5365
5366         (dbus_message_set_is_error_reply),
5367         (dbus_message_get_is_error_reply):
5368         * dbus/dbus-message.h:
5369         New functions.
5370
5371         * dbus/dbus-protocol.h:
5372         Add error reply flag.
5373
5374         * test/data/valid-messages/opposite-endian.message:
5375         Add NIL type to test.
5376
5377 2003-01-31  Havoc Pennington  <hp@pobox.com>
5378
5379         * doc/dbus-specification.sgml: fully specify the header.  Add
5380         flags and major protocol version, and change header/body len to
5381         unsigned.
5382
5383         * dbus/dbus-message-builder.c (append_saved_length): append length
5384         as uint32
5385
5386         * dbus/dbus-message.c (dbus_message_create_header): change header
5387         length and body length to unsigned. Add the new fields from the
5388         spec
5389         (_dbus_message_loader_return_buffer): unsigned header/body len
5390
5391 2003-01-30  Havoc Pennington  <hp@pobox.com>
5392
5393         * dbus/dbus-auth.c: rework to use only REJECTED, no
5394         MECHANISMS
5395
5396         * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
5397         use REJECTED, suggested by Mark McLoughlin
5398
5399 2003-01-30  Havoc Pennington  <hp@pobox.com>
5400
5401         * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
5402         a better way to report errors here. e.g.  "unix address lacks
5403         path" or something. also "no such file" when the path doesn't
5404         exist, etc.
5405
5406         * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
5407         leaking list nodes
5408         (dbus_parse_address): add @todo about documenting address format,
5409         and allowing , and ; to be escaped
5410
5411 2003-01-30  Anders Carlsson  <andersca@codefactory.se>
5412
5413         * dbus/Makefile.am:
5414         Add dbus-address.[ch]
5415
5416         * dbus/dbus-address.c: (dbus_address_entry_free),
5417         (dbus_address_entries_free), (create_entry),
5418         (dbus_address_entry_get_method), (dbus_address_entry_get_value),
5419         (dbus_parse_address), (_dbus_address_test):
5420         * dbus/dbus-address.h:
5421         New files for dealing with address parsing.
5422
5423         * dbus/dbus-connection.c:
5424         Document timeout functions.
5425
5426         * dbus/dbus-message.c:
5427         Document dbus_message_new_from_message.
5428
5429         * dbus/dbus-server-debug.c:
5430         Document.
5431
5432         * dbus/dbus-server.c: (dbus_server_listen):
5433         Parse address and use correct server implementation.
5434
5435         * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
5436         * dbus/dbus-string.h:
5437         New function with test.
5438
5439         * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
5440         * dbus/dbus-test.h:
5441         Add address tests.
5442
5443         * dbus/dbus-transport-debug.c:
5444         Document.
5445
5446         * dbus/dbus-transport.c: (_dbus_transport_open):
5447         Parse address and use correct transport implementation.
5448
5449 2003-01-30  Havoc Pennington  <hp@pobox.com>
5450
5451         * dbus/dbus-message.c: use message->byte_order instead of
5452         DBUS_COMPILER_BYTE_ORDER throughout.
5453         (dbus_message_create_header): pad header to align the
5454         start of the body of the message to 8-byte boundary
5455
5456         * dbus/dbus-marshal.h: make all the demarshalers take const
5457         DBusString arguments.
5458
5459         * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
5460         validate message args here, so we don't have to do slow validation
5461         later, and so we catch bad messages as they are incoming. Also add
5462         better checks on header_len and body_len. Also fill in
5463         message->byte_order
5464
5465         * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
5466         implemented properly)
5467         (_dbus_string_validate_nul): new function to check all-nul
5468
5469         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
5470         get_arg_end_pos and remove all validation
5471         (_dbus_marshal_validate_arg): actually do validation here.
5472
5473 2003-01-29  Havoc Pennington  <hp@pobox.com>
5474
5475         * dbus/dbus-message.c (check_message_handling): fix assertion
5476         failure on set_client_serial
5477
5478 2003-01-28  Havoc Pennington  <hp@pobox.com>
5479
5480         * dbus/dbus-server-debug.c: Add doc section comments
5481
5482         * dbus/dbus-transport-debug.c: add doc section comments
5483
5484 2003-01-28  Havoc Pennington  <hp@redhat.com>
5485
5486         * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
5487         the reverse order from how I had it
5488         (_dbus_string_base64_encode): reverse encoding order. I was
5489         basically byteswapping everything during encoding.
5490
5491 2003-01-28  Anders Carlsson  <andersca@codefactory.se>
5492
5493         * dbus/dbus-connection-internal.h:
5494         * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
5495         (_dbus_connection_remove_timeout):
5496         Add functions for adding and removing timeouts.
5497
5498         * dbus/dbus-message.c: (dbus_message_new_from_message):
5499         Add new function that takes a message and creates an exact
5500         copy of it, but with the refcount set to 1.
5501         (check_message_handling):
5502         Fix build error.
5503
5504         * dbus/dbus-server-protected.h:
5505         * dbus/dbus-server.c: (_dbus_server_init_base),
5506         (_dbus_server_finalize_base), (_dbus_server_add_timeout),
5507         (dbus_server_set_timeout_functions):
5508         (_dbus_server_remove_timeout):
5509         New functions so that a server can add and remove timeouts.
5510
5511         (dbus_server_listen):
5512         Add commented out call to dbus_server_debug_new.
5513
5514         * dbus/dbus-timeout.c: (_dbus_timeout_new):
5515         Actually set the handler, doh.
5516
5517         * dbus/dbus-transport.c: (_dbus_transport_open):
5518         Add commented out call to dbus_transport_debug_client_new.
5519
5520         * dbus/Makefile.am:
5521         Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
5522
5523 2003-01-28  Havoc Pennington  <hp@pobox.com>
5524
5525         * dbus/dbus-message.c (check_message_handling): function to check
5526         on the loaded message, iterates over it etc.
5527
5528 2003-01-28  Havoc Pennington  <hp@pobox.com>
5529
5530         * test/Makefile.am (dist-hook): fix make distdir
5531
5532         * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
5533
5534 2003-01-27  Havoc Pennington  <hp@pobox.com>
5535
5536         * dbus/dbus-mempool.c (time_for_size): replace printf with
5537         _dbus_verbose
5538
5539         * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
5540         empty lines; fix the SAVE_LENGTH stuff to be
5541         START_LENGTH/END_LENGTH so it actually works; couple other
5542         bugfixes
5543
5544         * test/Makefile.am (dist-hook): add dist-hook for .message files
5545
5546         * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
5547         can be constant or locked.
5548         (_dbus_string_free): allow freeing a const string as
5549         documented/intended
5550
5551         * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
5552
5553         * dbus/dbus-test-main.c (main): take an argument which is the
5554         directory containing test data
5555
5556         * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
5557         argument to this and load all the messages in test/data/
5558         checking that they can be loaded or not loaded as appropriate.
5559
5560 2003-01-27  Anders Carlsson  <andersca@codefactory.se>
5561
5562         * bus/dispatch.c: (bus_dispatch_message_handler):
5563         Dispatch messages sent to services.
5564
5565         * bus/driver.c: (bus_driver_send_service_deleted),
5566         (bus_driver_send_service_created), (bus_driver_send_service_lost),
5567         (bus_driver_send_service_acquired):
5568         Add helper functions for sending service related messages.
5569
5570         (bus_driver_send_welcome_message):
5571         Send HELLO_REPLY instead of WELCOME.
5572
5573         (bus_driver_handle_list_services):
5574         Send LIST_SERVICES_REPLY instead of SERVICES.
5575
5576         (bus_driver_handle_own_service),
5577         (bus_driver_handle_service_exists):
5578         New message handlers.
5579
5580         (bus_driver_handle_message):
5581         Invoke new message handlers.
5582
5583         (bus_driver_remove_connection):
5584         Don't remove any services here since that's done automatically
5585         by bus_service_remove_owner now.
5586
5587         * bus/driver.h:
5588         New function signatures.
5589
5590         * bus/services.c: (bus_service_add_owner):
5591         Send ServiceAcquired message if we're the only primary owner.
5592
5593         (bus_service_remove_owner):
5594         Send ServiceAcquired/ServiceLost messages.
5595
5596         (bus_service_set_prohibit_replacement),
5597         (bus_service_get_prohibit_replacement):
5598         Functions for setting prohibit replacement.
5599
5600         (bus_service_has_owner):
5601         New function that checks if a connection is in the owner queue of
5602         a certain service.
5603
5604         * bus/services.h:
5605         Add new function signatures.
5606
5607         * dbus/dbus-list.c: (_dbus_list_test):
5608         Add tests for _dbus_list_remove_last and traversing the list backwards.
5609
5610         * dbus/dbus-list.h:
5611         Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
5612         go any further, so return NULL then.
5613
5614         * dbus/dbus-protocol.h:
5615         Add new messages, service flags and service replies.
5616
5617 2003-01-26  Havoc Pennington  <hp@pobox.com>
5618
5619         * dbus/dbus-message-builder.c: implement, completely untested.
5620
5621         * test/data/*: add data to be used in testing.
5622         ".message" files are our simple loadable text format.
5623         ".message-raw" will be binary dumps of messages.
5624
5625         * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
5626
5627 2003-01-26  Havoc Pennington  <hp@pobox.com>
5628
5629         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
5630
5631         * dbus/dbus-errors.c (dbus_result_to_string): add
5632         file errors
5633
5634         * dbus/dbus-message-builder.c: new file, will contain code to load
5635         up messages from files. Not implemented yet.
5636
5637 2003-01-26  Havoc Pennington  <hp@pobox.com>
5638
5639         * dbus/dbus-message.c (dbus_message_set_sender): support deleting
5640         the sender by setting to NULL
5641
5642 2003-01-26  Havoc Pennington  <hp@pobox.com>
5643
5644         The unit tests pass, but otherwise untested.  If it breaks, the
5645         tests should have been better. ;-)
5646
5647         * bus/driver.c (bus_driver_handle_hello): return if we disconnect
5648         the connection.
5649
5650         * dbus/dbus-message.c: redo everything so we maintain
5651         message->header as the only copy of the various fields.
5652         This avoids the possibility of out-of-memory in some cases,
5653         for example dbus_message_lock() can't run out of memory anymore,
5654         and avoids extra copying. Figured I may as well go ahead and do
5655         this since it was busted for dbus_message_lock to not return
5656         failure on OOM, and dbus_message_write_header was totally
5657         unchecked for OOM. Also fixed some random other bugs.
5658
5659         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
5660         that strings are nul-terminated. Also, end_pos can be equal
5661         to string length just not greater than, I think.
5662         (_dbus_marshal_set_int32): new function
5663         (_dbus_marshal_set_uint32): new function
5664         (_dbus_marshal_set_string): new function
5665
5666         * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
5667         a warning, init timeout_list to NULL
5668         (dbus_connection_send_message): don't use uninitialized variable
5669         "serial"
5670
5671         * dbus/dbus-string.c (_dbus_string_replace_len): new function
5672
5673 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
5674
5675         * bus/driver.c: (bus_driver_handle_hello),
5676         (bus_driver_send_welcome_message):
5677         Plug leaks
5678
5679 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
5680
5681         * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
5682         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
5683         (dbus_connection_unref):
5684         * dbus/dbus-marshal.c: (_dbus_marshal_test):
5685         * dbus/dbus-message.c: (dbus_message_unref),
5686         Plug memory leaks.
5687
5688         (dbus_message_get_fields):
5689         Remove debugging printout.
5690
5691         (_dbus_message_loader_return_buffer):
5692         Don't store the header string.
5693
5694         (_dbus_message_test):
5695         Plug leaks.
5696
5697 2003-01-26  Richard Hult  <rhult@codefactory.se>
5698
5699         * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
5700         the file descriptor list, since it can change under us.
5701
5702 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
5703
5704         * glib/dbus-gmain.c: (dbus_connection_prepare),
5705         (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
5706         (remove_watch), (dbus_connection_hookup_with_g_main):
5707         Rewrite the glib handling to use its own GSource instead of a
5708         GIOChannel so we can catch messages put in the queue while waiting
5709         for a reply.
5710
5711 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
5712
5713         * bus/Makefile.am:
5714         * bus/connection.c: (connection_disconnect_handler),
5715         (connection_watch_callback), (bus_connection_setup):
5716         * bus/dispatch.c: (send_one_message),
5717         (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
5718         (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
5719         * bus/dispatch.h:
5720         * bus/driver.c: (bus_driver_send_service_deleted),
5721         (bus_driver_send_service_created), (bus_driver_handle_hello),
5722         (bus_driver_send_welcome_message),
5723         (bus_driver_handle_list_services), (bus_driver_remove_connection),
5724         (bus_driver_handle_message):
5725         * bus/driver.h:
5726         Refactor code, put the message dispatching in its own file. Use
5727         _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
5728         is disconnected.
5729
5730 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
5731
5732         * dbus/dbus-internals.h:
5733         Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
5734
5735         * dbus/dbus-message.c: (dbus_message_get_sender):
5736         * dbus/dbus-message.h:
5737         Implement dbus_message_get_sender.
5738
5739         * dbus/dbus-protocol.h:
5740         Add message and service defines.
5741
5742 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
5743
5744         * dbus/dbus-connection.c: (dbus_connection_send_message):
5745         * dbus/dbus-message-internal.h:
5746         * dbus/dbus-message.c: (_dbus_message_get_client_serial),
5747         (dbus_message_write_header):
5748         Remove _dbus_messag_unlock and don't set the client serial on a
5749         message if one already exists.
5750
5751 2003-01-24  Havoc Pennington  <hp@pobox.com>
5752
5753         * dbus/dbus-list.c (alloc_link): put a thread lock on the global
5754         list_pool
5755
5756         * bus/driver.c (bus_driver_handle_list_services): fix a leak
5757         on OOM
5758
5759 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
5760
5761         * dbus/dbus-list.c: (alloc_link), (free_link):
5762         Use a memory pool for the links.
5763
5764 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
5765
5766         * bus/connection.c: (bus_connection_foreach):
5767         * bus/connection.h:
5768         Add new bus_connection_foreach function.
5769
5770         * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
5771         Add function that broadcasts a message to all clients.
5772
5773         (bus_driver_send_service_created), (bus_driver_handle_hello),
5774         (bus_driver_send_welcome_message),
5775         (bus_driver_handle_list_services), (bus_driver_message_handler):
5776         Implement functions that take care of listing services, and notifying
5777         clients when new services are created.
5778
5779         * bus/services.c: (bus_services_list):
5780         * bus/services.h:
5781         Add new function that returns an array of strings with the currently
5782         registered services.
5783
5784         * glib/dbus-glib.h:
5785         * glib/dbus-gmain.c:
5786         Update copyright year.
5787
5788 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
5789
5790         * dbus/dbus-connection.c: (dbus_connection_send_message):
5791         Unlock the message in case it was sent earlier.
5792
5793         (dbus_connection_send_message_with_reply_and_block):
5794         Remove the reply message from the list.
5795
5796         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
5797         Set array_len and new_pos correctly.
5798
5799         (_dbus_marshal_test):
5800         Remove debug output.
5801
5802         * dbus/dbus-message-internal.h:
5803         * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
5804         New function that returns the reply serial.
5805
5806         (_dbus_message_unlock):
5807         New function that unlocks a message and resets its header.
5808
5809         (dbus_message_append_string_array),
5810         (dbus_message_get_fields_valist),
5811         (dbus_message_iter_get_field_type),
5812         (dbus_message_iter_get_string_array),
5813         (dbus_message_get_fields),
5814         (dbus_message_append_fields_valist):
5815         Handle string arrays.
5816
5817         (dbus_message_set_sender):
5818         Make this function public since the bus daemon needs it.
5819
5820         (decode_header_data):
5821         Set the reply serial to -1 initially.
5822
5823         * dbus/dbus-message.h:
5824         Add dbus_message_set_sender.
5825
5826 2003-01-24  Havoc Pennington  <hp@pobox.com>
5827
5828         * doc/dbus-specification.sgml: add some stuff
5829
5830 2003-01-22  Havoc Pennington  <hp@pobox.com>
5831
5832         * doc/dbus-specification.sgml: Start to document the protocol.
5833
5834 2003-01-22  Havoc Pennington  <hp@pobox.com>
5835
5836         * dbus/dbus-connection.c
5837         (dbus_connection_send_message_with_reply_and_block): add some @todo
5838
5839         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
5840
5841 2003-01-21  Havoc Pennington  <hp@pobox.com>
5842
5843         (patch untested because can't compile)
5844
5845         * bus/driver.c (create_unique_client_name): make this function
5846         never recycle client names. Also, caller should initialize
5847         the DBusString.
5848
5849         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
5850
5851 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
5852
5853         * dbus/dbus-marshal.c: (_dbus_marshal_double),
5854         (_dbus_marshal_int32), (_dbus_marshal_uint32),
5855         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
5856         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
5857         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
5858         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
5859         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
5860         * dbus/dbus-marshal.h:
5861         * dbus/dbus-protocol.h:
5862         Add support for marshalling and demarshalling integer, double
5863         and string arrays.
5864
5865 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
5866
5867         * bus/Makefile.am:
5868         Add driver.[ch]
5869
5870         * bus/connection.c: (connection_disconnect_handler):
5871         Remove the connection from the bus driver's list.
5872
5873         (connection_watch_callback): Dispatch messages.
5874
5875         (free_connection_data): Free connection name.
5876
5877         (bus_connection_setup): Add connection to the bus driver's list.
5878         (bus_connection_remove_owned_service):
5879         (bus_connection_set_name), (bus_connection_get_name):
5880         Add functions for setting and getting the connection's name.
5881
5882         * bus/connection.h:
5883         Add function headers.
5884
5885         * bus/driver.c: (create_unique_client_name),
5886         (bus_driver_handle_hello_message),
5887         (bus_driver_send_welcome_message), (bus_driver_message_handler),
5888         (bus_driver_add_connection), (bus_driver_remove_connection):
5889         * bus/driver.h:
5890         * bus/main.c:
5891         * bus/services.c: (bus_service_free):
5892         * bus/services.h:
5893         New file that handles communication and registreation with the bus
5894         itself.
5895
5896 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
5897
5898         * dbus/dbus-connection.c: (dbus_connection_send_message):
5899         Add a new client_serial parameter.
5900
5901         (dbus_connection_send_message_with_reply):
5902         Remove a @todo since we've implemented the blocking function.
5903
5904         (dbus_connection_send_message_with_reply_and_block):
5905         New function that sends a message and waits for a reply and
5906         then returns the reply.
5907
5908         * dbus/dbus-connection.h:
5909         Add new functions.
5910
5911         * dbus/dbus-errors.c: (dbus_result_to_string):
5912         * dbus/dbus-errors.h:
5913         Add new DBUS_RESULT.
5914
5915         * dbus/dbus-message-internal.h:
5916         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
5917         (_dbus_message_set_sender), (dbus_message_write_header),
5918         (dbus_message_new_reply), (decode_header_data),
5919         (_dbus_message_loader_return_buffer), (_dbus_message_test):
5920         * dbus/dbus-message.h:
5921         Add new functions that set the reply serial and sender.
5922         Also marshal and demarshal them correctly and add test.
5923
5924         * dbus/dbus-protocol.h:
5925         Add new DBUS_MESSAGE_TYPE_SENDER.
5926
5927         * glib/dbus-glib.h:
5928         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
5929         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
5930         (dbus_connection_hookup_with_g_main):
5931         * glib/test-dbus-glib.c: (main):
5932         Rewrite to use GIOChannel and remove the GSource crack.
5933
5934         * test/echo-client.c: (main):
5935         * test/watch.c: (check_messages):
5936         Update for changed APIs
5937
5938 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
5939
5940         * dbus/Makefile.am: Add dbus-timeout.[cħ]
5941
5942         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
5943         Create a DBusTimeoutList.
5944         (dbus_connection_set_timeout_functions): Add new function to
5945         set timeout callbacks
5946
5947         * dbus/dbus-connection.h: Add public DBusTimeout API.
5948
5949         * dbus/dbus-message.c: (dbus_message_get_service):
5950         * dbus/dbus-message.h:  New function.
5951
5952         * dbus/dbus-server.c: Fix small doc typo.
5953
5954         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
5955
5956 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
5957
5958         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
5959         of the string, just as long as specified.
5960
5961 2003-01-19  Havoc Pennington  <hp@pobox.com>
5962
5963         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
5964         new function
5965
5966         * dbus/dbus-server.c (dbus_server_set_max_connections)
5967         (dbus_server_get_max_connections, dbus_server_get_n_connections):
5968         keep track of current number of connections, and add API for
5969         setting a max (but haven't implemented enforcing the max yet)
5970
5971 2003-01-18  Havoc Pennington  <hp@pobox.com>
5972
5973         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
5974         reading/writing if read_watch != NULL or write_watch != NULL.
5975
5976         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
5977         the message loader code to actually load message->header and
5978         message->body into the newly-created message.
5979
5980         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
5981         in OOM case
5982
5983         * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
5984         (dbus_connection_get_max_message_size)
5985         (dbus_connection_set_max_live_messages_size)
5986         (dbus_connection_get_max_live_messages_size): implement some
5987         resource limitation functions
5988
5989         * dbus/dbus-resources.c: new file implementing some of the
5990         resource limits stuff
5991
5992         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
5993         missing docs, add @todo to handle OOM etc.
5994
5995         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
5996         docs
5997
5998 2003-01-18  Havoc Pennington  <hp@pobox.com>
5999
6000         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
6001         connection if it hasn't been already.
6002
6003         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
6004         replace with DisconnectFunction.
6005
6006 2003-01-18  Havoc Pennington  <hp@pobox.com>
6007
6008         Building --disable-verbose-mode --disable-asserts --disable-tests
6009         cuts the library from 112K to 45K or so
6010
6011         * configure.in: check for varargs macro support,
6012         add --enable-verbose-mode, --enable-asserts.
6013
6014         * dbus/dbus-internals.h (_dbus_assert): support
6015         DBUS_DISABLE_ASSERT
6016         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
6017
6018 2003-01-18  Havoc Pennington  <hp@pobox.com>
6019
6020         * dbus/dbus-test.c: include config.h so that tests actually run
6021
6022         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
6023         so the failure mode when that assumption fails will be plenty
6024         obvious.
6025
6026 2003-01-18  Havoc Pennington  <hp@pobox.com>
6027
6028         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
6029
6030         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
6031         the distribution
6032
6033         * test/Makefile.am: don't use special variable "TESTS" for echo-*
6034         since we don't want to use those in make check
6035
6036 2003-01-15  Havoc Pennington  <hp@redhat.com>
6037
6038         Release 0.2
6039
6040         * NEWS: update
6041
6042 2003-01-15  Havoc Pennington  <hp@redhat.com>
6043
6044         * test/Makefile.am: fix so that test source code ends up in the
6045         distribution on make distcheck
6046
6047 2003-01-15  Havoc Pennington  <hp@redhat.com>
6048
6049         Release 0.1.
6050
6051         * NEWS: update
6052
6053 2003-01-15  Havoc Pennington  <hp@redhat.com>
6054
6055         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
6056         fix build when --disable-tests
6057
6058         * Makefile.am (EXTRA_DIST): put HACKING in here
6059
6060         * HACKING: document procedure for making a tarball release.
6061
6062 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
6063
6064         * bus/connection.c: (connection_error_handler),
6065         (bus_connection_setup):
6066         * bus/main.c: (main):
6067         Make sure that the DBusConnectionData struct is NULLed
6068         out to prevent a segfault.
6069
6070         * dbus/dbus-errors.c: (dbus_result_to_string):
6071         * dbus/dbus-errors.h:
6072         * dbus/dbus-message.c: (dbus_message_get_fields),
6073         (dbus_message_get_fields_valist), (_dbus_message_test):
6074         * dbus/dbus-message.h:
6075         Make dbus_message_get_fields return a result code so we can
6076         track invalid fields as well as oom.
6077
6078 2003-01-11  Havoc Pennington  <hp@pobox.com>
6079
6080         * configure.in: change --enable-test/--enable-ansi action-if-given
6081         to enable_foo=$enableval instead of enable_foo=yes
6082
6083 2003-01-08  Havoc Pennington  <hp@pobox.com>
6084
6085         * dbus/dbus-string.c (_dbus_string_align_length): new function
6086
6087         * dbus/dbus-test-main.c: move main() for test app here
6088         * dbus/dbus-test.c
6089         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
6090         symbol to run tests, because dbus-test isn't in the main
6091         library
6092
6093         Code review nitpicks.
6094
6095         * dbus/dbus-message.c (dbus_message_write_header): add newlines
6096         for people with narrow emacs ;-). Assert client_serial was filled
6097         in. Assert message->name != NULL.
6098         (dbus_message_append_fields): have "first_field_type" arg separate
6099         from va list, needed for C++ binding that also uses varargs IIRC
6100         and helps with type safety
6101         (dbus_message_new): add @todo about using DBusString to store
6102         service/name internally
6103         (dbus_message_new): don't leak ->service and ->name on OOM later
6104         in the function
6105         (dbus_message_unref): free the service name
6106         (dbus_message_get_fields): same change to varargs
6107         i.e. first_field_type
6108         (_dbus_message_loader_return_buffer): assert that the message data
6109         is aligned (if not it's a bug in our code). Put in verbose griping
6110         about why we set corrupted = TRUE.
6111         (decode_header_data): add FIXME that char* is evil.  Was going to
6112         add FIXME about evil locale-specific string.h strncmp, but just
6113         switched to wacky string-as-uint32 optimization. Move check for
6114         "no room for field name" above get_const_data_len() to avoid
6115         assertion failure in get_const_data_len if we have trailing 2
6116         bytes or the like. Check for service and name fields being
6117         provided twice. Don't leak service/name on error. Require field
6118         names to be aligned to 4 bytes.
6119
6120         * dbus/dbus-marshal.c: move byte swap stuff to header
6121         (_dbus_pack_int32): uscore-prefix
6122         (_dbus_unpack_int32): uscore-prefix
6123         (_dbus_unpack_uint32): export
6124         (_dbus_demarshal_string): add @todo complaining about use of
6125         memcpy()
6126         (_dbus_marshal_get_field_end_pos): add @todo about bad error
6127         handling allowing corrupt data to go unchecked
6128
6129 2003-01-08  Havoc Pennington  <hp@redhat.com>
6130
6131         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
6132         to the select() as needed for authentication. (should be using
6133         _dbus_poll() not select, but for another day)
6134
6135         * dbus/dbus.h: include dbus/dbus-protocol.h
6136
6137 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
6138
6139         * dbus/Makefile.am (dbusinclude_HEADERS): Install
6140         dbus-connection.h
6141
6142 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
6143
6144         * dbus/dbus-internals.c: (_dbus_type_to_string):
6145         New function that returns a string describing a type.
6146
6147         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
6148         * dbus/dbus-marshal.h:
6149         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
6150         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
6151         (dbus_message_iter_get_byte_array):
6152         * dbus/dbus-message.h:
6153         Add new convenience functions for appending and getting message fields.
6154         Also add demarshalling routines for byte arrays.
6155
6156 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
6157
6158         * dbus/dbus-connection-internal.h:
6159         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
6160         (_dbus_connection_get_next_client_serial),
6161         (dbus_connection_send_message):
6162         * dbus/dbus-internals.h:
6163         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
6164         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
6165         (_dbus_marshal_uint32), (_dbus_demarshal_double),
6166         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
6167         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
6168         (_dbus_verbose_bytes), (_dbus_marshal_test):
6169         * dbus/dbus-marshal.h:
6170         * dbus/dbus-message-internal.h:
6171         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
6172         (dbus_message_write_header), (_dbus_message_lock),
6173         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
6174         (dbus_message_get_name), (dbus_message_append_int32),
6175         (dbus_message_append_uint32), (dbus_message_append_double),
6176         (dbus_message_append_string), (dbus_message_append_byte_array),
6177         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
6178         (dbus_message_iter_unref), (dbus_message_iter_has_next),
6179         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
6180         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
6181         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
6182         (decode_header_data), (_dbus_message_loader_return_buffer),
6183         (message_iter_test), (_dbus_message_test):
6184         * dbus/dbus-message.h:
6185         * dbus/dbus-protocol.h:
6186         * dbus/dbus-test.c: (main):
6187         * dbus/dbus-test.h:
6188         * glib/test-dbus-glib.c: (message_handler), (main):
6189         * test/echo-client.c: (main):
6190         * test/watch.c: (check_messages):
6191         Make messages sendable and receivable for real.
6192
6193 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
6194
6195         * dbus/dbus-marshal.c: (_dbus_marshal_double),
6196         (_dbus_marshal_string), (_dbus_marshal_byte_array):
6197         * dbus/dbus-message.c: (dbus_message_append_int32),
6198         (dbus_message_append_uint32), (dbus_message_append_double),
6199         (dbus_message_append_string), (dbus_message_append_byte_array):
6200         Handle OOM restoration.
6201
6202 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
6203
6204         * dbus/dbus-marshal.c: (_dbus_marshal_string),
6205         (_dbus_demarshal_string), (_dbus_marshal_test):
6206         * dbus/dbus-marshal.h:
6207         * dbus/dbus-message.c: (dbus_message_get_name),
6208         Document these functions.
6209
6210         (dbus_message_append_int32), (dbus_message_append_uint32),
6211         (dbus_message_append_double), (dbus_message_append_string),
6212         (dbus_message_append_byte_array):
6213         * dbus/dbus-message.h:
6214         Add functions for adding message fields of different types.
6215
6216         * dbus/dbus-protocol.h:
6217         Add the different types.
6218
6219 2003-01-05  Havoc Pennington  <hp@pobox.com>
6220
6221         * bus/connection.c: implement routines for handling connections,
6222         first thing is keeping a list of owned services on each connection
6223         and setting up watches etc.
6224
6225         * bus/services.c: implement a mapping from service names to lists
6226         of connections
6227
6228         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
6229
6230         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
6231         to use static mutexes for global data
6232
6233         * dbus/dbus-connection.c (dbus_connection_set_data): add new
6234         collection of functions to set/get application-specific data
6235         on the DBusConnection.
6236
6237 2003-01-04  Havoc Pennington  <hp@pobox.com>
6238
6239         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
6240         (_dbus_poll): new function
6241
6242         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
6243         copied from GLib
6244
6245         * bus/loop.c: initial code for the daemon main loop
6246
6247 2003-01-04  Havoc Pennington  <hp@pobox.com>
6248
6249         * test/watch.c (error_handler): make it safe if the error handler
6250         is called multiple times (if we s/error handler/disconnect
6251         handler/ we should just guarantee it's called only once)
6252
6253         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
6254         error handler on disconnect (it's quite possible we should
6255         just change the error handler to a "disconnect handler," I'm
6256         not sure we have any other meaningful errors)
6257
6258         * configure.in: check for getpwnam_r
6259
6260         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
6261         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
6262         mechanism as in SASL spec, using socket credentials
6263
6264         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
6265         (_dbus_send_credentials_unix_socket): new function
6266
6267         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
6268         dbus_accept()
6269         (_dbus_write): only check errno if <0 returned
6270         (_dbus_write_two): ditto
6271
6272 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
6273
6274         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
6275         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
6276         (_dbus_marshal_test):
6277         * dbus/dbus-marshal.h:
6278         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
6279         to _dbus_marshal_utf8_string. Also fix some tests.
6280
6281 2002-12-28  Harri Porten  <porten@kde.org>
6282
6283         * configure.in: added check for C++ compiler and a very cheesy
6284         check for the Qt integration
6285
6286         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
6287
6288         * qt/Makefile.am: added
6289
6290         * qt/.cvsignore: added
6291
6292         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
6293         latter, added #ifdef QT_THREAD_SUPPORT guard.
6294
6295         * dbus/Makefile.am: added missing headers for make dist
6296
6297 2002-12-28  Kristian Rietveld  <kris@gtk.org>
6298
6299         * dbus/Makefile.am: fixup export-symbols-regex.
6300
6301 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
6302
6303         * acinclude.m4: Add this file and put the
6304         PKG_CHECK_MODULE macro in it.
6305
6306 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
6307
6308         * dbus/dbus-marshal.c: (_dbus_marshal_string),
6309         (_dbus_demarshal_double), (_dbus_demarshal_int32),
6310         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6311         (_dbus_marshal_test):
6312         Make the demarshalling routines align the pos argument.
6313         Add string marshalling tests and fix the obvious bugs
6314         discovered.
6315
6316 2002-12-26  Havoc Pennington  <hp@pobox.com>
6317
6318         * dbus/dbus-auth.c: fixes fixes fixes
6319
6320         * dbus/dbus-transport-unix.c: wire up support for
6321         encoding/decoding data on the wire
6322
6323         * dbus/dbus-auth.c (_dbus_auth_encode_data)
6324         (_dbus_auth_decode_data): append to target string
6325         instead of nuking it.
6326
6327 2002-12-26  Havoc Pennington  <hp@pobox.com>
6328
6329         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
6330         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
6331         doh
6332
6333         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
6334         avoid swap_bytes() overhead (ignoring possible assembly stuff for
6335         now). Main point is because I wanted unpack_uint32 to implement
6336         _dbus_verbose_bytes
6337         (_dbus_verbose_bytes): new function
6338
6339         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
6340
6341         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
6342         mechanism to handle a corrupt message stream
6343         (_dbus_message_loader_new): fix preallocation to only prealloc,
6344         not prelengthen
6345
6346         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
6347         (_dbus_string_test): enhance tests for copy/move and fix the
6348         functions
6349
6350         * dbus/dbus-transport-unix.c: Hold references in more places to
6351         avoid reentrancy problems
6352
6353         * dbus/dbus-transport.c: ditto
6354
6355         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
6356         leak reference count in no-message case
6357
6358         * test/watch.c (do_mainloop): handle adding/removing watches
6359         during iteration over the watches. Also, ref the connection/server
6360         stored on a watch, so we don't try to mangle a destroyed one.
6361
6362         * dbus/dbus-transport-unix.c (do_authentication): perform
6363         authentication
6364
6365         * dbus/dbus-auth.c (get_state): add a state
6366         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
6367         (_dbus_auth_get_unused_bytes): append the unused bytes
6368         to the passed in string, rather than prepend
6369
6370         * dbus/dbus-transport.c (_dbus_transport_init_base): create
6371         the auth conversation DBusAuth
6372
6373         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
6374         (_dbus_transport_new_for_domain_socket): when creating a
6375         transport, pass in whether it's a client-side or server-side
6376         transport so we know which DBusAuth to create
6377
6378 2002-12-03  Havoc Pennington  <hp@pobox.com>
6379
6380         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
6381         _after_ finalizing the derived members
6382         (unix_connection_set): unref watch if we fail to add it
6383
6384         * dbus/dbus-connection.c (dbus_connection_unref): delete the
6385         transport first, so that the connection owned by the
6386         transport will be valid as the transport finalizes.
6387
6388         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
6389         if necessary, and remove watches from the connection.
6390
6391         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
6392
6393 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
6394
6395         * dbus/dbus-marshal.c: (_dbus_marshal_string),
6396         (_dbus_demarshal_double), (_dbus_demarshal_int32),
6397         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
6398         (_dbus_marshal_test):
6399         * dbus/dbus-marshal.h:
6400         Add string marshal functions and have the demarshal functions
6401         return the new position.
6402
6403 2002-12-25  Havoc Pennington  <hp@pobox.com>
6404
6405         * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
6406         it is a simple protocol that just maps directly to SASL.
6407
6408         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
6409         initial implementation, not actually used yet.
6410
6411         * dbus/dbus-string.c (_dbus_string_find): new function
6412         (_dbus_string_equal): new function
6413         (_dbus_string_base64_encode): new function
6414         (_dbus_string_base64_decode): new function
6415
6416 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
6417
6418         * dbus/Makefile.am:
6419         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
6420         (_dbus_marshal_int32), (_dbus_marshal_uint32),
6421         (_dbus_demarshal_double), (_dbus_demarshal_int32),
6422         (_dbus_demarshal_uint32), (_dbus_marshal_test):
6423         * dbus/dbus-marshal.h:
6424         * dbus/dbus-protocol.h:
6425         * dbus/dbus-test.c: (main):
6426         * dbus/dbus-test.h:
6427         Add un-optimized marshalling/demarshalling routines.
6428
6429 2002-12-25  Harri Porten  <porten@kde.org>
6430
6431         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
6432
6433 2002-12-24  Zack Rusin  <zack@kde.org>
6434
6435         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
6436         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
6437         main loop stuff
6438
6439 2002-12-24  Havoc Pennington  <hp@pobox.com>
6440
6441         * glib/dbus-gthread.c: fix include
6442
6443         * glib/dbus-glib.h: rename DBusMessageHandler for now.
6444         I think glib API needs to change, though, as you don't
6445         want to use DBusMessageFunction, you want to use the
6446         DBusMessageHandler object. Probably
6447         dbus_connection_open_with_g_main_loop()
6448         and dbus_connection_setup_g_main_loop() or something like that
6449         (but think of better names...) that just create a connection
6450         that has watch/timeout functions etc. already set up.
6451
6452         * dbus/dbus-connection.c
6453         (dbus_connection_send_message_with_reply): new function just to
6454         show how the message handler helps us deal with replies.
6455
6456         * dbus/dbus-list.c (_dbus_list_remove_last): new function
6457
6458         * dbus/dbus-string.c (_dbus_string_test): free a string that
6459         wasn't
6460
6461         * dbus/dbus-hash.c: use memory pools for the hash entries
6462         (rebuild_table): be more paranoid about overflow, and
6463         shrink table when we can
6464         (_dbus_hash_test): reduce number of sprintfs and write
6465         valid C89. Add tests for case where we grow and then
6466         shrink the hash table.
6467
6468         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
6469
6470         * dbus/dbus-connection.c (dbus_connection_register_handler)
6471         (dbus_connection_unregister_handler): new functions
6472
6473         * dbus/dbus-message.c (dbus_message_get_name): new
6474
6475         * dbus/dbus-list.c: fix docs typo
6476
6477         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
6478         an object representing a handler for messages.
6479
6480 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
6481
6482         * glib/dbus-glib.h:
6483         * glib/dbus-gthread.c: (dbus_gthread_init):
6484         Don't use the gdbus prefix for public functions.
6485
6486 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
6487
6488         * Makefile.am:
6489         * configure.in:
6490         Add GLib checks and fixup .pc files
6491
6492         * glib/Makefile.am:
6493         * glib/dbus-glib.h:
6494         * glib/dbus-gmain.c: (gdbus_connection_prepare),
6495         (gdbus_connection_check), (gdbus_connection_dispatch),
6496         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
6497         (dbus_connection_gsource_new):
6498         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
6499         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
6500         * glib/test-dbus-glib.c: (message_handler), (main):
6501         Add GLib support.
6502
6503 2002-12-15  Harri Porten  <porten@kde.org>
6504
6505         * autogen.sh: check for libtoolize before attempting to use it
6506
6507         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
6508         struct.
6509
6510         * .cvsignore: ignore more stamp files
6511
6512         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
6513
6514         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
6515         without make install.
6516
6517 2002-12-15  Havoc Pennington  <hp@pobox.com>
6518
6519         * dbus/dbus-threads.c: add thread stubs that a higher library
6520         layer can fill in. e.g. the GLib wrapper might fill them in with
6521         GThread stuff. We still need to use this thread API to
6522         thread-safe-ize the library.
6523
6524 2002-12-12  Havoc Pennington  <hp@pobox.com>
6525
6526         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
6527         below new interfaces and include fewer system headers.
6528
6529         * dbus/dbus-sysdeps.c (_dbus_read): new function
6530         (_dbus_write): new function
6531         (_dbus_write_two): new function
6532         (_dbus_connect_unix_socket): new function
6533         (_dbus_listen_unix_socket): new function
6534
6535         * dbus/dbus-message-internal.h: change interfaces to use
6536         DBusString
6537
6538 2002-12-11  Havoc Pennington  <hp@pobox.com>
6539
6540         * dbus/dbus-types.h: add dbus_unichar
6541
6542         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
6543
6544         * dbus/dbus-connection.c (dbus_connection_send_message): return
6545         TRUE on success
6546
6547         * dbus/dbus-transport.c: include dbus-watch.h
6548
6549         * dbus/dbus-connection.c: include dbus-message-internal.h
6550
6551         * HACKING: add file with coding guidelines stuff.
6552
6553         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
6554         handling here, for security purposes (as in vsftpd). Not actually
6555         using this class yet.
6556
6557         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
6558         system/libc usage here, as in vsftpd, for ease of auditing (and
6559         should also simplify portability). Haven't actually moved all the
6560         system/libc usage into here yet.
6561
6562 2002-11-25  Havoc Pennington  <hp@pobox.com>
6563
6564         * dbus/dbus-internals.c (_dbus_verbose): fix to not
6565         always print the first verbose message.
6566
6567 2002-11-24  Havoc Pennington  <hp@pobox.com>
6568
6569         * test/echo-client.c, test/echo-server.c: cheesy test
6570         clients.
6571
6572         * configure.in (AC_CHECK_FUNCS): check for writev
6573
6574         * dbus/dbus-message.c (_dbus_message_get_network_data): new
6575         function
6576
6577         * dbus/dbus-list.c (_dbus_list_foreach): new function
6578
6579         * dbus/dbus-internals.c (_dbus_verbose): new function
6580
6581         * dbus/dbus-server.c, dbus/dbus-server.h: public object
6582         representing a server that listens for connections.
6583
6584         * dbus/.cvsignore: create
6585
6586         * dbus/dbus-errors.h, dbus/dbus-errors.c:
6587         public API for reporting errors
6588
6589         * dbus/dbus-connection.h, dbus/dbus-connection.c:
6590         public object representing a connection that
6591         sends/receives messages. (Same object used for
6592         both client and server.)
6593
6594         * dbus/dbus-transport.h, dbus/dbus-transport.c:
6595         Basic abstraction for different kinds of stream
6596         that we might read/write messages from.
6597
6598 2002-11-23  Havoc Pennington  <hp@pobox.com>
6599
6600         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
6601         _DBUS_INT_MAX
6602
6603         * dbus/dbus-test.c (main): add list test, and include
6604         dbus-test.h as intended
6605
6606         * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
6607         (_dbus_hash_table_remove_int): return value indicates
6608         whether the entry existed to remove
6609
6610         * dbus/dbus-list.c: add linked list utility class,
6611         with docs and tests
6612
6613         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
6614         array sometimes.
6615
6616 2002-11-23  Havoc Pennington  <hp@pobox.com>
6617
6618         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
6619         DBUS_END_DECLS to nothing, that should fix this once and for all
6620
6621         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
6622
6623         * dbus/dbus-message.c, dbus/dbus-hash.c:
6624         add some missing @brief
6625
6626 2002-11-23  Havoc Pennington  <hp@pobox.com>
6627
6628         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
6629         to avoid confusing Doxygen
6630
6631         * dbus/dbus-hash.c: @} not }@
6632
6633         * dbus/dbus-message.c (struct DBusMessage): split out
6634         internals docs
6635
6636 2002-11-23  Havoc Pennington  <hp@pobox.com>
6637
6638         * configure.in: pile on more warning flags if using gcc
6639
6640         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
6641         to document static functions
6642
6643         * configure.in: add summary to end of configure so it
6644         looks nice and attractive
6645
6646         * dbus/dbus-hash.c: finish implementation and write unit
6647         tests and docs
6648
6649         * configure.in: add --enable-tests to enable unit tests
6650
6651         * dbus/dbus-test.c: test program to run unit tests
6652         for all files in dbus/*, initially runs a test for
6653         dbus-hash.c
6654
6655         * dbus/dbus-internals.h: file to hold some internal utility stuff
6656
6657 2002-11-22  Havoc Pennington  <hp@redhat.com>
6658
6659         * dbus/dbus-hash.c: copy in Tcl hash table, not yet
6660         "ported" away from Tcl
6661
6662         * dbus/dbus-types.h: header for types such as dbus_bool_t
6663
6664 2002-11-22  Havoc Pennington  <hp@redhat.com>
6665
6666         * dbus/dbus.h: fixups for doc warnings
6667
6668         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
6669         macros
6670         (QUIET): make it quiet so we can see warnings
6671
6672         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
6673
6674 2002-11-22  Havoc Pennington  <hp@redhat.com>
6675
6676         * Makefile.am: include "Doxyfile" target in all-local
6677
6678         * configure.in: generate the Doxyfile
6679
6680         * Doxyfile.in: move Doxyfile here, so we can use
6681         configure to generate a Doxyfile with the right
6682         version number etc.
6683
6684 2002-11-22  Havoc Pennington  <hp@redhat.com>
6685
6686         * dbus/dbus-message.c: move inline docs into .c file
6687
6688         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
6689         so all docs are under doc/
6690         (MAN_EXTENSION): generate man pages. Use extension
6691         ".3dbus" which matches ".3qt" on my system,
6692         I guess this is OK, I don't know really.
6693         (FILE_PATTERNS): look for .c files not .h, makes sense
6694         for plain C I think
6695
6696 2002-11-22  Havoc Pennington  <hp@pobox.com>
6697
6698         * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
6699         because any app can be a server, and any app can be a client,
6700         the bus is a special kind of server.
6701
6702 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
6703
6704         * Doxyfile : adding. Still needs Makefile rules to be generated
6705         automatically (just run "doxygen" in the toplevel dir for now to
6706         generate docs)
6707
6708         * dbus/dbus-message.h : Adding sample docs (javadoc since
6709         resembles gtk-doc a little more)
6710
6711         * dbus/dbus.h : Adding sample docs
6712
6713 2002-11-21  Havoc Pennington  <hp@redhat.com>
6714
6715         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
6716         so we can allow ourselves to include files directly,
6717         instead of having to use dbus.h
6718
6719         * dbus/dbus.h: fill in
6720
6721         * dbus/dbus-message.h: sketch out a sample header file.
6722         Include griping if you include it directly instead of
6723         via dbus.h
6724
6725         * dbus/dbus-macros.h: new file with macros for extern "C",
6726         TRUE/FALSE, NULL, etc.
6727
6728         * doc/file-boilerplate.c: put include guards in here
6729
6730 2002-11-21  Havoc Pennington  <hp@redhat.com>
6731
6732         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
6733
6734         * COPYING: include the GPL as well, and license code
6735         under both AFL and GPL.
6736
6737 2002-11-21  Havoc Pennington  <hp@redhat.com>
6738
6739         * acconfig.h: get rid of this
6740
6741         * autogen.sh (run_configure): add --no-configure option
6742
6743         * configure.in: remove AC_ARG_PROGRAM to make
6744         autoconf complain less. add AC_PREREQ.
6745         add AC_DEFINE third arg.
6746
6747 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
6748
6749         * doc/Makefile.am:
6750         Fix references so we can distcheck.
6751
6752 2002-11-21  Havoc Pennington  <hp@redhat.com>
6753
6754         * Initial module creation
6755