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