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