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