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