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