2005-05-18 Havoc Pennington <hp@redhat.com>
[platform/upstream/dbus.git] / ChangeLog
1 2005-05-18  Havoc Pennington  <hp@redhat.com>
2
3         * configure.in: use GLIB_GNU_GETTEXT to get INTLLIBS and require
4         gettext. Not really worth requiring yet perhaps, but any
5         production quality 1.0 would require it so we should go ahead and
6         get things set up. We do have a couple token calls to
7         bindtextdomain in the code already.
8
9 2005-05-16  John (J5) Palmieri  <johnp@redhat.com>
10
11         * glib/dbus-gmain.c (io_handler_dispatch): fix deadlock
12         when using recursive g_main_loops
13
14         * python/_dbus.py (class Bus): add the ProxyObjectClass
15         alias for ProxyObject to make it easier for the Twisted 
16         networking framework to integrate dbus.
17
18         * python/proxies.py (class ProxyObject): add the ProxyMethodClass
19         alias for ProxyMethod to make it easier for the Twisted 
20         networking framework to integrate dbus. 
21
22 2005-05-11  Ross Burton  <ross@burtonini.com>
23
24         * glib/dbus-glib-tool.c: Add --prefix argument.
25         * glib/dbus-binding-tool-glib.h: Add prefix argument.
26         * glib/dbus-binding-tool-glib.c (compute_marshaller_name):
27         Add prefix argument.
28         (generate_glue): Pass prefix argument down.
29         (dbus_binding_tool_output_glib_server): Pass prefix to
30         glib-genmarshal.
31         
32 2005-05-11  Colin Walters  <walters@verbum.org>
33
34         * tools/dbus-send.c (append_array): New function.
35         (append_arg): Broken out from main.
36         (main): Add cheesy hack to send arrays and variants.
37         (usage): Update.
38         * tools/dbus-print-message.c (print_iter): Broken out
39         from main.
40
41 2005-05-11  Colin Walters  <walters@verbum.org>
42
43         * dbus/dbus-signature.c (dbus_signature_iter_get_signature):
44         New function, returns signature string for signature iter.
45         * dbus/dbus-signature.h: Prototype it.
46         * dbus/dbus-message.c (dbus_message_iter_get_signature):
47         New function, returns signature string for message iter.
48         (dbus_message_iter_get_array_len): New function, returns
49         length of array.
50         (dbus_message_iter_get_fixed_array): Fix assertion; this
51         function should be used when the iter is pointing to the
52         contents of an array
53         * dbus/dbus-message.h: Prototypes.
54         * dbus/dbus-marshal-recursive.c (_dbus_type_reader_get_array_length):
55         New function; returns length of an array.
56         * dbus/dbus-marshal-recursive.h: Prototype it.
57         
58 2005-05-11  Colin Walters  <walters@verbum.org>
59
60         * dbus/dbus-sysdeps-util.c <!HAVE_POSIX_GETPWNAM_R>: Fix
61         compilation error.
62         
63 2005-05-08  Havoc Pennington  <hp@redhat.com>
64
65         * dbus/dbus-sysdeps-util.c (_dbus_become_daemon): write the
66         daemon's pid, not the parent's pid, to the file descriptor.
67         Reported by Taj Morton.
68
69 2005-05-05  Havoc Pennington  <hp@redhat.com>
70
71         * configure.in (LT_*): add notes on how the libtool versioning
72         works to save thinking. Increment soname to indicate protocol
73         breakage (though really the library interface hasn't changed I
74         guess)
75
76         * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
77         verify the GUID received from server matches what we were
78         expecting, if we had an expectation
79
80         * dbus/dbus-auth.c (send_ok): send GUID along with the OK command
81         (_dbus_auth_get_guid_from_server): new function
82         (send_begin): parse the OK args
83
84         * doc/dbus-specification.xml: add GUID to the auth protocol
85
86 2005-05-05  John (J5) Palmieri  <johnp@redhat.com>
87
88         * Fix my name in previous changelog ;)
89
90         * python/proxies.py (ProxyObject.__getattr__): add further patch
91         from Anthony Baxter to throw an AttributeError when python 
92         __special__ functions are called instead of marshling them over 
93         the bus (Bug#1685 comment 3).
94
95 2005-05-04  John (J5) Palmieri  <johnp@redhat.com>
96
97         * python/Makefile.am: changed to use pyexecdir for the binding
98         shared libraries (Bug#2494)
99
100         * python/exceptions.py: bring exceptions over from the bindings
101         so they can be used in applications (Bug#2036)
102         Make all exceptions derive from DBusException
103
104         * python/_dbus.py, python/proxies.py: implement __repr__ in a couple
105         of classes so that print obj doesn't throw an exception (Bug #1685)
106
107 2005-05-03  Ross Burton  <ross@burtonini.com>
108
109         * glib/dbus-gobject.c (dbus_g_connection_register_g_object):
110         Return if we get an error during registration.  Set up a
111         weak reference on object to unregister if object is destroyed.
112         (unregister_gobject): New function.
113         
114 2005-05-01  John (J5) Palmieri  <johnp@redhat.com>
115
116         * python/dbus_bindings.pyx.in: 
117         - added new type classes for hinting to the marashaler what type 
118         to send over the wire
119         - added int16 and uint16 marshalers
120         - Fixed a bug in the type constants that caused int32 to go out
121         as uint16 over the wire
122         * python/dbus.py: split up into different files and renamed _dbus.py
123         * python/__init__.py, python/_util.py, python/decorators.py, 
124         python/exceptions.py, python/proxies.py, python/services.py,
125         python/types.py: new files split off from dbus.py
126         * python/Makefile.am: Add new files, remove dbus.py and 
127         install all python files to <python module dir>/dbus
128         * python/examples/*: Added #!/usr/bin/env python to the top of
129         every example.  Patch provided by Tatavarty Kalyan
130
131 2005-04-25  John (J5) Palmieri  <johnp@redhat.com>
132
133         * NEWS: Update to 0.33
134
135 2005-04-25  John (J5) Palmieri  <johnp@redhat.com>
136
137         * python/dbus_bindings.pyx.in (send_with_reply_handlers): New send
138         method for doing async calls
139         (_pending_call_notification): New C function for handling pendning call
140         callbacks
141         (set_notify): New method for setting pending call notification
142         
143         * python/dbus.py: new version tuple "version" is set at (0, 40, 0)
144         Async capabilities added to remote method calls
145         (Sender): class removed
146         (RemoteService): class removed
147         (ObjectTree): class removed for now
148         (RemoteObject): Renamed to ProxyObject
149         (RemoteMethod): Renamed to ProxyMethod
150         (method): Decorator added for decorating python methods as dbus methods
151         (signal): Decorator added for decorating python methods as signal emitters
152         (ObjectType): Metaclass added for generating introspection data and the
153         method callback vtable
154         (Interface): Wrapper class added to wrap objects in a dbus interface
155         (Object): Uses ObjectType as its metaclass and exports Introspect
156         of the org.freedesktop.DBus.Introspectable interface
157         (ValidationException, UnknownMethodException): new exceptions
158
159         * python/examples/*: Modified to fit with the new bindings
160
161 2005-04-23  Havoc Pennington  <hp@redhat.com>
162
163         * dbus/dbus-message.c (dbus_message_append_args): fix doc comment,
164         reported by Tony Houghton
165
166         * test/test-service.c (main): test
167         dbus_connection_get_object_path_data()
168
169         * dbus/dbus-object-tree.c (find_handler): be sure we always init
170         the exact_match
171         (_dbus_object_tree_get_user_data_unlocked): new function used by
172         dbus_connection_get_object_path_data()
173         (do_register): add assertion test for get_user_data_unlocked
174         (object_tree_test_iteration): more tests
175
176         * dbus/dbus-connection.c (dbus_connection_get_object_path_data):
177         new function from Dan Reed to let you get the user data from 
178         dbus_connection_register_object_path()
179
180 2005-04-23  John (J5) Palmieri  <johnp@redhat.com>
181
182         * dbus/dbus-marshal-recursive-util.c: Fixed buffer overflow
183         in numerous places that did not account for the NULL terminator
184         (signature_from_seed): changed the manual string copy loop to 
185         just use strcpy instead
186         make check should now pass
187
188 2005-04-19  John (J5) Palmieri  <johnp@redhat.com>
189
190         * dbus/dbus-marshal-header.c (_dbus_header_create): Fix assert
191         so that it allows messages that are not signals to pass in 
192         NULL as the interface.
193
194 2005-04-18  David Zeuthen  <davidz@redhat.com>
195
196         * glib/dbus-gmain.c (io_handler_destroy_source): 
197         (timeout_handler_destroy_source, connection_setup_free): 
198         Also unref the source to avoid memory leaks.
199
200 2005-04-13  David Zeuthen  <davidz@redhat.com>
201
202         * bus/config-parser.c (bus_config_parser_new): Bump this to a
203         more reasonable, yet still totally arbitrary, value :-). 
204
205 2005-04-13  David Zeuthen  <davidz@redhat.com>
206
207         * doc/TODO: Added an "important for 1.0" item about selinux
208         allow/deny messages
209
210 2005-04-13  David Zeuthen  <davidz@redhat.com>
211
212         * bus/selinux.c: Add c-file-style to top of file
213         (log_audit_callback): Don't free the data here anymore
214         (bus_selinux_check): Don't take spid and tpid since appending
215         that to auxdata may OOM.
216         (bus_selinux_allows_acquire_service): Handle OOM and signal back
217         to the caller if we are OOM by taking an error object.
218         (bus_selinux_allows_send): -do-
219
220         * bus/selinux.h: Fix prototypes for bus_selinux_allows_acquire_service
221         and bus_selinux_allows_send
222
223         * bus/bus.c (bus_context_check_security_policy): Pass error and
224         pass on OOM thrown by bus_selinux_allows_send()
225
226         * bus/services.c (bus_registry_acquire_service): Pass error and
227         pass on OOM thrown by bus_selinux_allows_acquire_service()
228
229 2005-04-13  Havoc Pennington  <hp@redhat.com>
230
231         * glib/dbus-gmain.c (message_queue_dispatch): only dispatch one
232         message at a time to avoid monopolizing the main loop, bug 
233         #2953 from Benjamin Otte
234
235 2005-04-09  Havoc Pennington  <hp@redhat.com>
236
237         * dbus/dbus-string.c (copy): change a memcpy to memmove due to
238         possible overlap, fix from Daniel Reed
239         (fixup_alignment): fix signedness warnings
240         (_dbus_string_append_unichar): ditto
241
242 2005-04-09  Havoc Pennington  <hp@redhat.com>
243
244         * dbus/dbus-message-util.c (_dbus_message_test): fix signedness warning
245
246         * glib/dbus-glib-tool.c (main): fix warning
247
248         * glib/dbus-binding-tool-glib.c (generate_glue): fix warning
249
250         * dbus/dbus-connection.c (dbus_connection_read_write_dispatch):
251         add a new function that can be used in simple applications that
252         don't have a main loop and are willing to block
253
254 2005-04-05  David Zeuthen  <davidz@redhat.com>
255
256         Fix https://bugs.freedesktop.org/show_bug.cgi?id=2889
257
258         * glib/dbus-gmain.c:
259         (io_handler_destroy_source): Remove from list of IO handlers
260         of the ConnectionSetup object
261         (timeout_handler_destroy_source): -do- for timeout handlers
262         (io_handler_source_finalized): Don't remove from list since
263         we now do that in io_handler_destroy_source(). Renamed from
264         io_handler_source_destroyed
265         (timeout_handler_source_destroyed): -do- for timeout handlers
266         (connection_setup_free): It is now safe to iterate over all
267         IO and timeout handlers as the _destroy_source removes them
268         from the list synchronously
269
270 2005-03-30  Havoc Pennington  <hp@redhat.com>
271
272         * configure.in: change check to gtk 2.4
273
274         * tools/dbus-viewer.c (name_combo_changed_callback): remove
275         gtk_combo_box_get_active_text() usage to decrement GTK requirement
276         to 2.4
277
278 2005-03-29  John (J5) Palmieri  <johnp@redhat.com>
279
280         * News: Update 0.32
281
282         * HACKING: Fixed realease instructions.  configure.in should be updated to
283           the next release by the person who made the last release.
284
285 2005-03-29  John (J5) Palmieri  <johnp@redhat.com>
286
287         * python/lvalue_cast_post_process.py - removed.  Patch has been
288           submitted to Pyrex maintainers that fixes gcc4.0 errors
289
290         * python/Makefile.am: removed refrences to lvalue_cast_post_process.py
291
292 2005-03-24  Daniel Reed  <n@ml.org>
293
294         * tools/Makefile.am: Make print-introspect and
295         dbus-bus-introspect.xml building conditional on HAVE_GLIB.
296
297 2005-03-22  John (J5) Palmieri  <johnp@redhat.com>
298
299         * tools/Makefile.am: Patch by Colin Walters that fixes distcheck
300
301         * dbus/dbus-userdb.c, dbus/dbus-userdb-util.c: Add patch we have 
302           had in Red Hat packages for a while but for some reason never 
303           got merged upstream
304           (_dbus_is_a_number): New checks if a string
305           can be converted to a number and does the conversion if it can
306           (_dbus_user_database_lookup): Add check to see if the given username
307           is a udi.  This allows udi's to be used instead of usernames in the
308           config file.
309           (_dbus_user_database_lookup_group): Add check to see if the given groupname
310           is a gdi.  This allows gdi's to be used instead of groupnames in the
311           config file.
312
313 2005-03-21  John (J5) Palmieri  <johnp@redhat.com>
314
315         * python/lvalue_cast_post_process.py - added post processor to fix Pyrex
316           code so that it compiles with gcc4.0
317
318         * python/Makefile.am: Added lvalue_cast_post_process.py to EXTRA_DIST
319           run dbus_bindings.c through lvalue_cast_post_process.py and copy the
320           results back to dbus_binding.c
321
322 2005-03-20  Colin Walters  <walters@verbum.org>
323
324         Patch suggested by Inguva Rajasekhar <ringuva@novell.com>.
325
326         * configure.in: Require GTK+ 2.6.
327         
328 2005-03-20  Colin Walters  <walters@verbum.org>
329
330         * Makefile.am (SUBDIRS, DIST_SUBDIRS): Build tools before test.
331
332 2005-03-17  Tom Parker  <palfrey@tevp.net>
333
334         * dbus/dbus-userdb.c (_dbus_user_database_lookup): Don't
335         print DBUS_UID_UNSET; instead print passed username.  Also
336         be sure to actually use gid looked up in cache.
337         
338         * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group): Ditto
339         for DBUS_GID_UNSET and groupname.
340
341 2005-03-17  Colin Walters  <walters@verbum.org>
342
343         * bus/print-introspect.c: Move to tools/.
344         * bus/run-with-tmp-session-bus.sh: Ditto.
345         
346         * glib/Makefile.am (dbus-glib-bindings.h): Move
347         generation to tools/Makefile.am.
348
349         * test/glib/run-test.sh: Update to handle move
350         of run-with-tmp-session-bus.sh.
351
352         * test/glib/test-service-glib.c: Update to handle
353         move of dbus-glib-bindings.h.
354
355         * tools/print-introspect.c: Moved here
356         from bus/, and ported to GLib bindings.
357
358         * tools/run-with-tmp-session-bus.sh: Moved here
359         from bus/.
360
361         * tools/Makefile.am: Generate dbus-glib-bindings.h
362         and dbus-bus-introspect.xml here.
363
364         * tools/.cvsignore, glib/.cvsignore, bus/.cvsignore:
365         Update.
366
367 2005-03-17  Colin Walters  <walters@verbum.org>
368
369         * bus/driver.c (write_args_for_direction): Use
370         _dbus_string_get_const_data to retrieve string;
371         _dbus_string_get_const_data_len doesn't actually return
372         a NULL-terminated substring.
373
374         * test/glib/test-service-glib.c: Include dbus-glib-bindings.h.
375         (main): Change to use org_freedesktop_DBus_request_name
376         instead of using g_proxy_begin_call/end_call.
377
378 2005-03-15  Joe Shaw  <joeshaw@novell.com>
379
380         * mono/ProxyBuilder.cs (BuildFinalizer): Fix some invalid IL when
381         generating the finalizer.  Fixes from Ben Maurer.
382
383 2005-03-12  Joe Shaw  <joeshaw@novell.com>
384
385         * mono/BusDriver.cs: Update method names: ListServices
386         becomes ListNames; GetOwner becomes GetNameOwner.
387
388         * mono/ProxyBuilder.cs (BuildFinalizer): Need to load arg 0
389         onto the eval stack when removing the delegate.
390
391 2005-03-12  Joe Shaw  <joeshaw@novell.com>
392
393         * mono/dbus-sharp.dll.config.in: Don't hardcode 0 for
394         LT_CURRENT.  Set it to the autoconf variable.
395                                                                                 
396         * mono/ProxyBuilder.cs: Add a finalizer to the generated proxy
397         classes that disconnects the signal handler delegate from the
398         service object.  Fixes a big leak of proxy objects on the
399         client side of things.  Patch from Ben Maurer
400         <bmaurer@ximian.com>
401
402 2005-03-12  Colin Walters  <walters@verbum.org>
403
404         * bus/driver.c (write_args_for_direction): New function,
405         parses a type signature into arguments and outputs to
406         XML.
407         (bus_driver_handle_introspect): Use it instead of
408         hardcoding XML for certain signatures.
409         
410         * bus/Makefile.am (dbus-bus-introspect.xml): Add
411         dependency on dbus-daemon.
412
413         * glib/dbus-glib-tool.c (main): Parse ignore_unsupported
414         argument, pass it to dbus_binding_tool_output_glib_client.
415
416         * glib/dbus-binding-tool-glib.c
417         (generate_client_glue): Protect against multiple inclusion.
418         (dbus_binding_tool_output_glib_client): Add
419         G_BEGIN_DECLS/G_END_DECLS.
420
421         * glib/dbus-binding-tool-glib.c (compute_client_method_name):
422         Change to just take iface prefix directly.
423         (write_formal_parameters): Clarify error message.
424         (check_supported_parameters): New function; checks to see type
425         signatures of method parameters are supported.
426         (generate_client_glue): Handle ignore_unsupported flag.
427         (dbus_binding_tool_output_glib_client): Handle ignore_unsupported
428         parameter.
429
430         * glib/Makefile.am (dbus-glib-bindings.h): Pass
431         --ignore-unsupported by default until glib bindings
432         support arrays.
433
434 2005-03-11  Colin Walters  <walters@verbum.org>
435
436         * glib/Makefile.am: Generate dbus-glib-bindings.h and
437         install it.
438
439         * bus/print-introspect.c: New file; prints introspection
440         data for a given name and object path.
441
442         * bus/run-with-tmp-session-bus.sh: New file, refactored
443         from test/glib/run-test.sh.  Creates a temporary session
444         bus and runs another program.
445
446         * test/glib/run-test.sh: Refactor to invoke
447         run-with-tmp-session-bus.sh.
448
449         * bus/driver.c (bus_driver_handle_introspect): Fix to print new
450         introspection format.  Also change to use DBUS_TYPE_x_AS_STRING
451         macros instead of hardcoding.
452
453         * glib/.cvsignore, bus/.cvsignore, test/glib/.cvsignore: Update.
454
455 2005-03-11  Joe Shaw  <joeshaw@novell.com>
456
457         * dbus/dbus-connection.c (dbus_connection_send_with_reply): Remove
458         this unref; it doesn't match up evenly in some codepaths.
459         (_dbus_connection_block_pending_call): Unref at every exitpoint;
460         this evenly matches with the ref near the top of this function.
461
462 2005-03-09  Joe Shaw  <joeshaw@novell.com>
463
464         * dbus/dbus-object-tree.c
465         (_dbus_object_tree_unregister_and_unlock): If checks are enabled
466         and we try to unregister a path that's not registered, still go
467         through the process of unlocking and don't just return.
468
469 2005-03-09  Colin Walters  <walters@verbum.org>
470
471         * glib/dbus-gproxy.c (dbus_g_proxy_invoke): New method; calls
472         to this are generated for client-side wrappers.  Invokes a
473         D-BUS method and returns reply values.  
474
475         * glib/dbus-binding-tool-glib.c (write_args_sig_for_direction): New
476         function; writes signature string for argument direction.
477         (write_args_for_direction): Change to pass input values directly
478         instead of via address, and fix indentation.
479         (generate_client_glue): Change to invoke dbus_g_proxy_invoke.  Also
480         make generated wrappers inlineable.
481
482         * dbus/dbus-message.c (dbus_message_iter_get_fixed_array): Add
483         note about using dbus_type_is_fixed.
484
485         * dbus/dbus-marshal-basic.c (_dbus_type_is_fixed): Moved to
486         dbus/dbus-signature.c as dbus_type_is_fixed.
487
488         All callers updated.
489
490         * dbus/dbus-signature.c (dbus_type_is_fixed): Moved here
491         from dbus/dbus-marshal-basic.c:_dbus_type_is_fixed.
492
493         * dbus/dbus-signature.h: Prototype.
494
495         * glib/dbus-binding-tool-glib.c (compute_marshaller_name): Fix
496         error printf code.
497
498         * test/glib/test-dbus-glib.c (main): Be sure to clear error as
499         appropriate instead of just freeing it.
500         (main): Free returned strings using g_free.
501
502         * test/glib/Makefile.am (test-service-glib-glue.h)
503         (test-service-glib-bindings.h): Add dependency on dbus-binding-tool.
504
505         * glib/dbus-gvalue.c (MAP_BASIC): Refactored from MAP_BASIC_INIT;
506         simply maps a simple D-BUS type to GType.
507         (dbus_dbus_type_to_gtype): Function which maps D-BUS type to
508         GType.
509         (dbus_gvalue_init): Just invoke dbus_dbus_type_to_gtype and
510         initialize the value with it.
511         (dbus_gvalue_binding_type_from_type): Unused, delete.
512         (dbus_gvalue_demarshal): Switch to hardcoding demarshalling for
513         various types instead of unmarshalling to value data directly.
514         Remove can_convert boolean.
515         (dbus_gvalue_marshal): Remove duplicate initialization; switch to
516         returning directly instead of using can_convert boolean.
517         (dbus_gvalue_store): New function; not related to D-BUS per-se.
518         Stores a GValue in a pointer to a value of its corresponding C
519         type.
520
521         * glib/dbus-gvalue.h: Remove dbus_gvalue_binding_type_from_type,
522         add dbus_gvalue_store.
523
524 2005-03-08  Joe Shaw  <joeshaw@novell.com>
525
526         Fix a bunch of lifecycle and memory management problems
527         in the mono bindings.
528
529         * mono/Arguments.cs (Arguments): Implement IDisposable
530
531         * mono/Bus.cs (Bus): Don't allow public instantiation.  This is
532         strictly a static class.
533
534         * mono/Connection.cs: Move the DBusObjectPathVTable and associated
535         delegates into this file.
536         (Connection): Implement IDisposable.
537         (Dispose): Disconnect the connection and set the raw connection
538         pointer to IntPtr.Zero.
539         (~Connection): Call Dispose().
540         (RegisterObjectPath): Added.  Manages the registration of object
541         paths so we can cleanly disconnect them at dispose/finalize time.
542         (UnregisterObjectPath): Ditto.
543         (set_RawConnection): Unregister all of the object paths when
544         changing the underlying DBusConnection.  Add them back onto the
545         new connection, if any.
546
547         * mono/Handler.cs: Don't implement IDisposable; it doesn't use any
548         more unmanaged resources anymore, so it's not necessary.  Move all
549         the DBusObjectPathVTable stuff out of here.
550         (Handler): Save references to our delegates so that they don't get
551         finalized.  Call Connection.RegisterObjectPath() instead of
552         dbus_connection_register_object_path() directly.
553         (Message_Called): Dispose the message after we're finished with
554         it.
555
556         * mono/Message.cs (Message): Implement IDisposable.
557         (Dispose): Dispose the Arguments, and set the RawMessage to
558         IntPtr.Zero.
559         (SendWithReplyAndBlock): We own the ref to the reply that comes
560         back from dbus_connection_send_with_reply_and_block() so add a
561         comment about that and unref it after we've constructed a managed
562         MethodReturn class around it.  Fixes a big, big leak.
563
564         * mono/ProxyBuilder.cs: Reflect into Message to get the Dispose
565         method.
566         (BuildSignalHandler): After we've sent the Signal message, dispose
567         of it.
568         (BuildMethod): Dispose of the method call and reply messages after
569         we've sent the message and extracted the data we want from the
570         reply.
571
572         * mono/Service.cs (UnregisterObject): Don't call handler.Dispose()
573         anymore.
574         (Service_FilterCalled): Dispose of the message after we're
575         finished with it.
576
577 2005-03-08  Joe Shaw  <joeshaw@novell.com>
578
579         * dbus/dbus-connection.c (dbus_connection_send_with_reply):
580         After we attach our pending call to the connection, unref
581         it.  Fixes a leak.
582  
583         * mono/Connection.cs (set_RawConnection): Disconnect our
584         filter and match callbacks from the old connection and
585         reconnect them to the new connection, if any.
586
587         * mono/DBusType/Array.cs: "Code" is a static member, so
588         don't use "this" to refer to it.  Fix for stricter checking
589         in Mono 1.1.4.
590  
591         * mono/DBusType/ObjectPath.cs (Append): Don't leak the
592         object path that we pass into unmanaged code.
593  
594         * mono/DBusType/String.cs (Append): Don't leak the string
595         that we pass into unmanged code.
596
597 2005-03-07  John (J5) Palmieri  <johnp@redhat.com>
598         * NEWS: Update for 0.31
599
600         * configure.in: Release 0.31
601         add LT_CURRENT, LT_REVISION, LT_AGE for easy soname bumping
602
603         * qt/Makefile.am: fixed build
604
605         * dbus/Makefile.am: soname bump for libdbus
606
607         * glib/Makefile.am: soname bump for libdbus-glib
608
609 2005-03-05  Havoc Pennington  <hp@redhat.com>
610
611         * dbus/dbus-sysdeps.c:
612         (pseudorandom_generate_random_bytes_buffer): fix to have no return
613         value
614         (_dbus_generate_random_bytes_buffer): fix return value
615
616         * dbus/dbus-sysdeps-util.c: s/GETPWNAME/GETPWNAM/ so configure
617         checks actually work, from Tom Parker <fdo@tevp.net>
618
619 2005-03-01  Colin Walters  <walters@verbum.org>
620
621         * test/glib/test-dbus-glib.c (lose, lose_gerror): Utility
622         functions copied from dbus-glib-tool.c.
623         (main): Convert lots of error code to use them.
624         Also add some testing for introspection bits.
625
626 2005-03-01  Colin Walters  <walters@verbum.org>
627         
628         * doc/TODO: Remove introspection signature TODO.
629
630 2005-02-27  Colin Walters  <walters@verbum.org>
631
632         * glib/dbus-gidl.c (property_info_get_type, arg_info_get_type):
633         Change return value to const char * instead of int so we can do
634         full signatures.
635         (struct PropertyInfo, struct ArgInfo): Store char *.
636         (property_info_new, arg_info_new): Update parameters, strdup.
637         (property_info_unref, arg_info_unref): Free.
638
639         * glib/dbus-gidl.h: Update prototypes.
640
641         * glib/dbus-gparser.c (basic_type_from_string): Delete.
642         (validate_signature): New function, just validates signature and
643         sets GError.
644         (parse_property, parse_arg): Invoke validate_signature.  Store
645         signature instead of just type code.
646
647         * glib/dbus-gvalue.c (base_type_from_signature): New utility
648         function to return a primary type for a signature, dropping
649         information about types in container types.
650         (dbus_gvalue_genmarshal_name_from_type)
651         (dbus_gvalue_binding_type_from_type)
652         (dbus_gvalue_ctype_from_type): Update to take full signature
653          instead of type code.
654         (dbus_gtype_to_dbus_type): Moved here from glib/dbus-gobject.c.
655
656         * glib/dbus-gvalue.h: Update prototypes for above.
657
658         * glib/dbus-gobject.c (gtype_to_dbus_type): Moved to
659         glib/dbus-gvalue.c as dbus_gtype_to_dbus_type.
660         (introspect_properties, introspect_signals, write_interface):
661         Update to handle signatures, and remove usage of
662         _dbus_gutils_type_to_string.
663         (handle_introspect): Print out type codes instead of e.g. "string"
664         in hardcoded introspection XML; also use x_AS_STRING constants
665         instead of hardcoding in string.
666
667         * glib/dbus-glib-tool.c (pretty_print): Handle signature change
668         to string.  Remove usage of _dbus_gutils_type_to_string.
669
670         * glib/dbus-gutils.c (_dbus_gutils_type_to_string): Delete.
671
672         * glib/dbus-gutils.h (_dbus_gutils_type_to_string): Update for
673         deletion.
674         
675         * glib/dbus-binding-tool-glib.c (compute_marshaller)
676         (compute_marshaller_name, generate_glue): Handle signature change
677         to string.
678         (write_formal_parameters, write_args_for_direction): Ditto, and
679         remove FIXME.
680
681         * tools/dbus-tree-view.c (type_to_string): Delete.
682         (info_set_func_text): Update to print full signatures.
683
684         * test/glib/test-service-glib.xml: Change types to new
685         introspection format.
686
687 2005-02-26  Havoc Pennington  <hp@redhat.com>
688
689         * doc/TODO: remove the "guid" item
690
691         * test/glib/test-profile.c (no_bus_thread_func): use open_private
692         (with_bus_thread_func): use open_private
693
694         * dbus/dbus-connection.c (dbus_connection_open_private): new
695         function that works like the old dbus_connection_open()
696         (dbus_connection_open): now returns an existing connection if
697         possible
698
699         * dbus/dbus-server-unix.c (handle_new_client_fd_and_unlock): pass
700         through the GUID to the transport
701
702         * dbus/dbus-server.c (_dbus_server_init_base): keep around the
703         GUID in hex-encoded form.
704
705         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
706         pass GUID argument in to the transport
707
708         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): add
709         guid argument
710
711         * dbus/dbus-transport.c (_dbus_transport_init_base): add guid argument
712
713         * dbus/dbus-auth.c (_dbus_auth_server_new): add guid argument
714
715 2005-02-25  Havoc Pennington  <hp@redhat.com>
716
717         * doc/dbus-specification.xml: document the GUID thing
718
719         * dbus/dbus-server.c (_dbus_server_init_base): initialize a
720         globally unique ID for the server, and put a "guid=hexencoded"
721         field in the address
722
723         * dbus/dbus-bus.c: fix missing #include of dbus-threads-internal.h
724
725         * dbus/dbus-message.c: ditto
726
727         * dbus/dbus-dataslot.c: ditto
728
729         * dbus/dbus-list.c: ditto
730
731         * dbus/dbus-internals.h: wait, just include
732         dbus-threads-internal.h here
733         
734         * dbus/dbus-string.c (_dbus_string_copy_to_buffer): move back for
735         use in main library
736
737         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes_buffer): new function
738
739 2005-02-24  Colin Walters  <walters@verbum.org>
740
741         * test/glib/Makefile.am (EXTRA_DIST): Add test-service-glib.xml
742
743 2005-02-24  John (J5) Palmieir  <johnp@redhat.com>
744
745         * glib/Makefile.am: added dbus-gobject.h to sources list
746         so distcheck doesn't fail
747         
748 2005-02-24  Havoc Pennington  <hp@redhat.com>
749
750         * dbus/dbus-server.c, dbus/dbus-server-unix.c: change semantics so
751         you must disconnect before unref, since locking and other things
752         are screwed up otherwise. Fix assorted other locking stuff.
753
754         * dbus/dbus-signature.c (dbus_signature_iter_get_element_type):
755         fix compilation
756
757         * dbus/dbus-threads-internal.h: move the mutex/condvar wrappers
758         into a private header and don't export from the library
759
760         * throughout - call _dbus_thread_stuff vs. dbus_thread_stuff
761
762 2005-02-24  Colin Walters  <walters@verbum.org>
763         
764         * dbus/dbus-signature.c: New file; implements various functions
765         related to type signatures.  Includes an interator for parsing,
766         validation functions.
767         (dbus_type_is_basic): Moved here from
768         dbus-marshal-basic.c:_dbus_type_is_basic.
769         (dbus_type_is_container): Moved here from
770         dbus-marshal-basic.c:_dbus_type_is_container.
771
772         All callers of _dbus_type_is_container and _dbus_type_is_basic
773         updated, and include dbus-signature.h.
774
775         * dbus/dbus-signature.h: New file; prototypes for the above.
776
777         * dbus/Makefile.am (DBUS_LIB_SOURCES): Add dbus-signature.c,
778         dbus-signature.h.
779
780         * dbus/dbus-marshal-basic.c (map_type_char_to_type): New utility
781         function factored out of _dbus_first_type_in_signature.
782         (_dbus_first_type_in_signature_c_str): New function; returns first
783         type code for a type signature character.
784
785         * dbus/dbus-marshal-basic.h: Prototype _dbus_first_type_in_signature_c_str,
786         handle function moves.
787
788         * dbus/dbus-marshal-recursive.h: Export _dbus_type_signature_next.
789
790         * dbus/dbus-marshal-recursive.c (_dbus_type_signature_next): New
791         function; skips to next complete type in type signature.
792         Implemented using previous skip_one_complete_type.  Now
793         skip_one_complete_type just delegates to
794         _dbus_type_signature_next.
795
796         * dbus/dbus-marshal-basic.c (_dbus_type_is_basic): Moved
797         to dbus-signature.c
798         (_dbus_type_is_container): Ditto.
799
800         * doc/dbus-specification.xml: Update introspection sample to
801         use real type signatures.
802
803         * dbus/dbus-test.h: Prototype signature test.
804
805         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Run
806         signature tests.
807
808         * dbus/dbus-protocol.h (DBUS_ERROR_INVALID_SIGNATURE): New error.
809
810 2005-02-23  John (J5) Palmieri  <johnp@redhat.com>
811
812         * python/dbus_bindings.pyx.in (PendingCall::get_reply):
813         s/dbus_pending_call_get_reply/dbus_pending_call_steal_reply
814
815 2005-02-21  Colin Walters  <walters@verbum.org>
816
817         * dbus/dbus-test-main.c (main): Take optional specific test
818         argument.
819
820         * dbus/dbus-test.c (run_test): New function, runs a test function
821         with no data directory.
822         (run_data_test): Like above, but takes data directory.
823         (dbus_internal_do_not_use_run_tests): Take
824         specific test argument.  Replace lots of cut n' paste code
825         with run_test and run_data_test.
826
827         * dbus/dbus-test.h: Update prototype for
828         dbus_internal_do_not_use_run_tests.
829
830 2005-02-20  Havoc Pennington  <hp@redhat.com>
831
832         Fix bugs reported by Daniel P. Berrange
833         
834         * dbus/dbus-server.c (_dbus_server_unref_unlocked): new function
835         (protected_change_watch): new function
836         (_dbus_server_toggle_watch, _dbus_server_remove_watch)
837         (_dbus_server_add_watch): change to work like the
838         dbus-connection.c equivalents; like those, probably kind of
839         busted, but should at least mostly work for now
840         (dbus_server_disconnect): drop the lock if we were already
841         disconnected, patch from Daniel P. Berrange
842
843         * dbus/dbus-server.c (_dbus_server_toggle_timeout) 
844         (_dbus_server_remove_timeout, _dbus_server_add_timeout): all the
845         same stuff
846
847         * doc/TODO: todo about unscrewing this mess
848
849 2005-02-19  Colin Walters  <walters@verbum.org>
850
851         * glib/dbus-binding-tool-glib.c
852         (dbus_binding_tool_output_glib_server): Fix iochannel refcounting.
853
854         * glib/dbus-glib-tool.c: Include dbus-glib-tool.h, as well
855         as errno.h and sys/stat.h.
856         (lose): New function, prints error with
857         newline and exits.
858         (lose_gerror): Similar, but takes GError for message.
859         (main): Add --output argument to specify output file to write to,
860         instead of always printing to stdout.  In this mode, determine
861         timestamps on source files to see whether any are newer than the
862         target file.  If not, exit.  Also convert a number of error
863         messages to use lose (since it's shorter), and switch to using
864         g_io_channel_shutdown.
865
866 2005-02-19  Havoc Pennington  <hp@redhat.com>
867
868         * glib/dbus-gobject.c
869         (_dbus_glib_marshal_dbus_message_to_gvalue_array): add docs
870
871         * glib/dbus-glib.c: fix doxygen warnings
872
873         * glib/dbus-gparser.c (parse_annotation): error if an annotation
874         is found on an <arg>
875
876 2005-02-17  Colin Walters  <walters@verbum.org>
877
878         * glib/dbus-gobject.h: Don't export
879         _dbus_glib_marshal_dbus_message_to_gvalue_array.
880         
881         * glib/dbus-gobject.c (_dbus_glib_marshal_dbus_message_to_gvalue_array): Do rename.
882         (invoke_object_method): Handle it.
883
884         * glib/dbus-gproxy.c (marshal_dbus_message_to_g_marshaller):
885         Handle rename.
886         
887 2005-02-17  Colin Walters  <walters@verbum.org>
888
889         * bus/.cvsignore, doc/.cvsignore
890         * test/data/valid-service-files/.cvsignore, test/glib/.cvsignore:
891         Update.
892
893 2005-02-17  Colin Walters  <walters@verbum.org>
894         
895         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_DBUS):
896         Rename to DBUS_SERVICE_DBUS.
897         (DBUS_PATH_ORG_FREEDESKTOP_DBUS): Rename to DBUS_PATH_DBUS.
898         (DBUS_PATH_ORG_FREEDESKTOP_LOCAL): Rename to DBUS_PATH_LOCAL.
899         Change the value from "org.freedesktop.Local"
900         to "org.freedesktop.DBus.Local".
901         (DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS): Rename to DBUS_INTERFACE_DBUS.
902         (DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE): Rename to
903         DBUS_INTERFACE_INTROSPECTABLE.
904         Change the value from "org.freedesktop.Introspectable"
905         to "org.freedesktop.DBus.Introspectable".
906         (DBUS_INTERFACE_ORG_FREEDESKTOP_PROPERTIES): Rename to
907         DBUS_INTERFACE_PROPERTIES.
908         Change the value from "org.freedesktop.Properties"
909         to "org.freedesktop.DBus.Properties".
910         (DBUS_INTERFACE_ORG_FREEDESKTOP_PEER): Rename to
911         DBUS_INTERFACE_PEER.
912         Change the value from "org.freedesktop.Peer"
913         to "org.freedesktop.DBus.Peer".
914         (DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL): 
915         DBUS_INTERFACE_LOCAL.
916         Change the value from "org.freedesktop.Local"
917         to "org.freedesktop.DBus.Local".
918
919         All other users of those constants have been changed.
920
921         * bus/driver.c (bus_driver_handle_introspect): Use constants.
922
923         * glib/dbus-gobject.c (handle_introspect): Use constants.
924
925         * doc/dbus-faq.xml, doc/dbus-specification.xml: Update for rename.
926
927 2005-02-17  Colin Walters  <walters@verbum.org>
928
929         * glib/dbus-gparser.c (struct Parser): Add in_annotation boolean.
930         (parse_node, parse_interface, parse_method, parse_signal)
931         (parse_property, parse_annotation): Lose if we're currently in an
932         annotation.
933         (parse_annotation): New function.
934         (parser_start_element, parser_end_element): Handle annotation.
935         (parse_method, parse_interface): Remove support for c_name attribute,
936         switch to annotations.
937
938         * glib/dbus-gidl.h (interface_info_get_binding_names)
939         (method_info_get_binding_names)
940         (interface_info_get_binding_name, method_info_get_binding_name)
941         (interface_info_set_binding_name, method_info_set_binding_name):
942         Remove.
943         (interface_info_get_annotations, method_info_get_annotations)
944         (interface_info_get_annotation, method_info_get_annotation)
945         (interface_info_add_annotation, method_info_add_annotation):
946         Prototype.
947
948         * glib/dbus-gidl.c (struct InterfaceInfo): Substitute "annotations"
949         for "bindings".
950         (struct MethodInfo): Ditto.
951         Straightfoward conversion of binding methods into annotation methods
952         as prototyped.
953
954         * glib/dbus-glib-tool.c (pretty_print): Print annotations.
955
956         * glib/dbus-binding-tool-glib.h (DBUS_GLIB_ANNOTATION_C_SYMBOL): Define.
957
958         * glib/dbus-binding-tool-glib.c (gather_marshallers, generate_glue):
959         Use new annotation API.
960
961         * doc/introspect.dtd: Fix a number of DTD syntax errors.  Add
962         annotation element.
963         
964         * doc/dbus-specification.xml: Discuss introspection annotations,
965         include list of well-known annotations.
966
967         * test/glib/test-service-glib.xml: Make validate against new DTD.
968
969 2005-02-17  Colin Walters  <walters@verbum.org>
970
971         This patch is based on initial work from
972         Paul Kuliniewicz <kuliniew@purdue.edu>.
973
974         * glib/dbus-gvalue.c (dbus_gvalue_init): New function; move
975         initialization of GValue from dbus type to here.
976         (dbus_gvalue_genmarshal_name_from_type): New function; generates a string
977         for the "glib-genmarshal" program from a DBus type.
978         (dbus_gvalue_binding_type_from_type): New function; turns a DBus type
979         into the C name for it we use in the glib bindings.
980         (dbus_gvalue_ctype_from_type): New function; maps a DBus type into a
981         glib C type (not GValue).
982         (dbus_gvalue_demarshal): invoke dbus_gvalue_init.
983
984         * glib/dbus-gutils.c (_dbus_gutils_wincaps_to_uscore): Moved here
985         from dbus-gobject.c.
986
987         * glib/dbus-gutils.h: Prototype it.
988
989         * glib/dbus-gproxy.c: Include new dbus-gobject.h.
990         (marshal_dbus_message_to_g_marshaller): Use new shared function
991         dbus_glib_marshal_dbus_message_to_gvalue_array.
992
993         * glib/dbus-gparser.c (parse_interface, parse_method): Handle c_name attribute.
994         Will be changed once we have annotations.
995
996         * glib/dbus-gobject.c: Change info_hash_mutex from GStaticMutex to
997         GStaticRWLock.  Callers updated.
998         (wincaps_to_uscore): Move to dbus-gutils.c.  Callers updated.
999         (string_table_next): New function for iterating over zero-terminated
1000         string value array.
1001         (string_table_lookup): New function; retrieves specific entry in
1002         array.
1003         (get_method_data): New function; look up method data in object data chunk.
1004         (object_error_domain_prefix_from_object_info)
1005         (object_error_code_from_object_info): New functions, but not implemented yet.
1006         (method_interface_from_object_info): New function; retrieve interface name.
1007         (method_name_from_object_info): New function; retrieve method name.
1008         (method_arg_info_from_object_info): New function; retrieve argument data.
1009         (arg_iterate): New function; iterates over serialized argument data.
1010         (method_dir_signature_from_object_info): New function; returns a
1011         GString holding type signature for arguments for just one
1012         direction (input or output).
1013         (method_input_signature_from_object_info)
1014         (method_output_signature_from_object_info): New functions.
1015         (dbus_glib_marshal_dbus_message_to_gvalue_array): New shared function;
1016         converts dbus message arguments into a GValue array.  Used for both
1017         signal handling and method invocation.
1018         (struct DBusGlibWriteIterfaceData): New utility structure.
1019         (write_interface): New function; generate introspection XML for
1020         an interface.
1021         (introspect_interfaces): New function; gathers all interface->methods,
1022         generates introspection XML for them.
1023         (handle_introspect): Invoke introspect_interfaces.
1024         (get_object_property): Be sure to zero-initalize stack-allocated GValue.
1025         (lookup_object_and_method): New function; examines an incoming message
1026         and attempts to match it up (via interface, method name, and argument
1027         signature) with a known object and method.
1028         (gerror_domaincode_to_dbus_error_name): New function; converts a
1029         GError domain and code into a DBus error name.  Needs GError data
1030         added to object introspection to work well.
1031         (gerror_to_dbus_error_message): Creates a DBusMessage error return from
1032         GError.
1033         (invoke_object_method): New function to invoke an object method
1034         looked up via lookup_object_and_method.  Parses the incoming
1035         message, turns it into a GValue array, then invokes the marshaller
1036         specified in the DBusGMethodInfo.  Creates a new message with
1037         either return values or error message as appropriate.
1038         (gobject_message_function): Invoke lookup_object_and_method and
1039         invoke_object_method.
1040
1041         * glib/dbus-glib-tool.c: Include dbus-binding-tool-glib.h.
1042         (enum DBusBindingOutputMode): New enum for binding output modes.
1043         (pretty_print): Print binding names.
1044         (dbus_binding_tool_error_quark): GError bits.
1045         (version): Fix typo.
1046         (main): Create GIOChannel for output.  Parse new --mode argument,
1047         possible values are "pretty-print", "glib-server", "glib-client".
1048         Use mode to invoke appropriate function.
1049         
1050         * glib/dbus-gobject.h: Prototype dbus_glib_marshal_dbus_message_to_gvalue_array.
1051
1052         * glib/dbus-glib-tool.h: New header, just includes GError bits
1053         for now.
1054
1055         * glib/dbus-gidl.c (struct InterfaceInfo): Add bindings hashtable;
1056         maps binding style to name.
1057         (struct MethodInfo): Ditto.
1058         (get_hash_keys, get_hash_key): Utility function, returns keys for
1059         a GHashTable.
1060         (interface_info_new, method_info_new): Initialize bindings.
1061         (interface_info_unref, method_info_unref): Destroy bindings.
1062         (method_info_get_binding_names, method_info_get_binding_name)
1063         (interface_info_get_binding_names, interface_info_get_binding_name):
1064         Functions for retrieving binding names.
1065         (method_info_set_binding_name, interface_info_set_binding_name):
1066         Functions for setting binding names.
1067
1068         * glib/dbus-binding-tool-glib.h: New file, has prototypes
1069         for glib binding generation.
1070
1071         * glib/dbus-binding-tool-glib.c: New file, implements server-side
1072         and client-side glib glue generation.
1073
1074         * glib/Makefile.am (dbus_binding_tool_SOURCES): Add
1075         dbus-binding-tool-glib.c, dbus-binding-tool-glib.h,
1076         dbus-glib-tool.h.
1077
1078         * dbus/dbus-glib.h (struct DBusGMethodMarshaller): Remove in favor
1079         of using GClosureMarshal directly.
1080         (struct DBusGObjectInfo): Add n_infos member.
1081
1082         * test/glib/test-service-glib.xml: New file; contains introspection data
1083         for MyTestObject used in test-service-glib.c.
1084
1085         * test/glib/test-service-glib.c (enum MyObjectError): New GError enum.
1086         (my_object_do_nothing, my_object_increment, my_object_throw_error)
1087         (my_object_uppercase, my_object_many_args): New test methods.
1088         (main): Use dbus_g_object_class_install_info to include generated object
1089         info.
1090
1091         * test/glib/Makefile.am: Generate server-side glue for test-service-glib.c,
1092         as well as client-side bindings.
1093
1094         * test/glib/test-dbus-glib.c: Include test-service-glib-bindings.h.
1095         (main): Activate TestSuiteGLibService; test invoke a bunch of its methods
1096         using both the dbus_gproxy stuff directly as well as the generated bindings.
1097
1098 2005-02-15  Havoc Pennington  <hp@redhat.com>
1099
1100         * dbus/dbus-connection.c (dbus_connection_dispatch): always
1101         complete a pending call, don't run filters first.
1102
1103         * glib/dbus-gproxy.c (dbus_g_proxy_end_call): change to use
1104         dbus_pending_call_steal_reply
1105
1106         * dbus/dbus-pending-call.c (dbus_pending_call_block): just call
1107         _dbus_connection_block_pending_call
1108         (dbus_pending_call_get_reply): change to steal_reply and return a
1109         ref
1110
1111         * dbus/dbus-connection.c
1112         (dbus_connection_send_with_reply_and_block): port to work in terms
1113         of DBusPendingCall
1114         (_dbus_connection_block_pending_call): replace block_for_reply
1115         with this
1116
1117 2005-02-14  Havoc Pennington  <hp@redhat.com>
1118
1119         * dbus/dbus-userdb-util.c (_dbus_user_database_lookup_group):
1120         properly handle looking up group information by name; fix 
1121         from j@bootlab.org
1122
1123 2005-02-13  Havoc Pennington  <hp@redhat.com>
1124
1125         * dbus/dbus-connection.c (dbus_connection_return_message) 
1126         (dbus_connection_borrow_message): hold dispatch lock while message
1127         is outstanding
1128         (_dbus_connection_block_for_reply): hold dispatch lock while we
1129         block for the reply, so nobody steals our reply
1130         (dbus_connection_pop_message): hold the dispatch lock while we
1131         pluck the message
1132
1133 2005-02-13  Havoc Pennington  <hp@redhat.com>
1134
1135         * dbus/dbus-connection.c (_dbus_connection_acquire_dispatch)
1136         (_dbus_connection_release_dispatch)
1137         (_dbus_connection_acquire_io_path)
1138         (_dbus_connection_release_io_path): make the mutex and condvar
1139         control access to the "acquired" flag. Drop the connection lock
1140         while waiting on the condvar. Hopefully these are baby steps in
1141         roughly the right direction.
1142
1143 2005-02-13  Havoc Pennington  <hp@redhat.com>
1144
1145         * dbus/dbus-connection.c: use separate mutexes for the condition
1146         variables; this is some kind of baseline for sanity, but the
1147         condition variables still aren't used correctly afaict
1148
1149 2005-02-13  Havoc Pennington  <hp@redhat.com>
1150
1151         * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
1152         fix a double-unlock
1153
1154         * dbus/dbus-connection.c
1155         (_dbus_connection_detach_pending_call_unlocked): add this
1156
1157         Initial semi-correct pass through to fix thread locking; there are
1158         still some issues with the condition variable paths I'm pretty
1159         sure
1160         
1161         * dbus/dbus-server.c: add a mutex on DBusServer and appropriate
1162         lock/unlock calls
1163
1164         * dbus/dbus-connection.c (_dbus_connection_do_iteration_unlocked):
1165         rename to add _unlocked
1166         (struct DBusConnection): move "dispatch_acquired" and
1167         "io_path_acquired" to use only one bit each.
1168         (CONNECTION_LOCK, CONNECTION_UNLOCK): add checks with !DBUS_DISABLE_CHECKS
1169         (dbus_connection_set_watch_functions): hacky fix to reentrancy
1170         (_dbus_connection_add_watch, _dbus_connection_remove_watch) 
1171         (_dbus_connection_toggle_watch, _dbus_connection_add_timeout) 
1172         (_dbus_connection_remove_timeout) 
1173         (_dbus_connection_toggle_timeout): drop lock when calling out to
1174         user functions; done in a hacky/bad way.
1175         (_dbus_connection_send_and_unlock): add a missing unlock
1176         (_dbus_connection_block_for_reply): add a missing unlock
1177
1178         * dbus/dbus-transport.c (_dbus_transport_get_is_authenticated):
1179         drop lock in a hacky probably unsafe way to call out to user
1180         function
1181
1182 2005-02-12  Havoc Pennington  <hp@redhat.com>
1183
1184         * tools/dbus-tree-view.c (info_set_func_text): display more
1185         details on args
1186
1187         * bus/driver.c (bus_driver_handle_list_services): list the bus
1188         driver
1189
1190         * glib/dbus-gparser.c (parse_arg): generate an arg name if none is supplied
1191
1192         * glib/dbus-gidl.c (signal_info_get_n_args): new function
1193         (method_info_get_n_args): new function
1194
1195 2005-02-12  Havoc Pennington  <hp@redhat.com>
1196
1197         * bus/driver.c (bus_driver_handle_introspect): add introspection
1198         for bus driver
1199
1200 2005-02-12  Havoc Pennington  <hp@redhat.com>
1201
1202         * bus/driver.c: put the signature of each bus driver method in the
1203         table of handlers and check it on incoming calls; this isn't
1204         really useful, but going to add introspect support in a minute.
1205
1206 2005-02-11  Joe Shaw  <joeshaw@novell.com>
1207
1208         * mono/Connection.cs: The unpredictability of finalizers in mono
1209         prevents us from deterministically disconnecting the filters from
1210         the Service class's finalizer, so move tracking of filters and
1211         matches here.  Add API for that.
1212
1213         * mono/Service.cs: Remove the code, add code which calls the
1214         methods now on the Connection class.
1215
1216 2005-02-11  John (J5) Palmieri  <johnp@redhat.com>
1217
1218         * python/dbus.py (class Sender): added to support dbus signals better
1219         (Bus::add_signal_receiver): added expand_args parameter which defaults
1220         to True.  When expand args is True the signal handler will pass the 
1221         message arguments as parameters to the signal handler.  If False
1222         revert to previous behavior where the signal handler must get the
1223         argument list from the message.  This is to help port applications
1224         like HAL that have a tendancy to send variable length argument lists.
1225         self._match_rule_to_receivers is now a dict of dicts.
1226         (Bus::remove_signal_receiver): pop handler off the dict intead of 
1227         removing it from a list
1228         (Bus::_signal_func): change signal handlers so that interface,
1229         signal_name, service, path and message are packed into a Sender
1230         object and that is passed to the handler.  If expand_args is True
1231         extract the args list from the message and append it to the parameter
1232         list
1233         
1234         * python/dbus_bindings.pyx.in (class Signature): added to support 
1235         signiature types
1236         (MessageIter::__init__): changed iteration limit to match D-BUS
1237         (MessageIter::get*): added INT16, UINT16, SIGNATURE, DICT_ENTRY, 
1238         STRUCT and VARIENT type support
1239         (MessageIter::python_value_to_dbus_sig): made recursive to support
1240         recursive types
1241         (MessageIter::append*): added Signature, dict, tuple 
1242         support
1243
1244         * python/examples/example-client.py: added examples of getting tuples
1245         and dicts
1246
1247         * python/examples/example-service.py: added examples of sending tuples
1248         and dicts
1249
1250         * python/examples/example-signal-recipient.py: Fixed to handle new
1251         signal callback format
1252
1253 2005-02-10  Havoc Pennington  <hp@redhat.com>
1254
1255         * test/glib/test-dbus-glib.c (main): fix so this test doesn't fail
1256         (call dbus_g_proxy_add_signal)
1257
1258         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
1259         escape the hostname
1260         (_dbus_server_new_for_domain_socket): escape the path
1261
1262         * dbus/dbus-address.c (dbus_address_escape_value): new
1263         (dbus_address_unescape_value): new
1264         (dbus_parse_address): unescape values
1265
1266         * dbus/dbus-string.c (_dbus_string_append_byte_as_hex): new function
1267
1268         * doc/dbus-specification.xml: explain how to escape values in
1269         addresses
1270
1271 2005-02-10  Havoc Pennington  <hp@redhat.com>
1272
1273         * dbus/dbus-message-factory.c (generate_special): modify test to
1274         avoid using a non-basic dict key
1275
1276         * dbus/dbus-marshal-validate-util.c: add test for the below
1277
1278         * doc/dbus-specification.xml: require that dict keys are a basic
1279         type
1280
1281         * dbus/dbus-marshal-validate.c
1282         (_dbus_validate_signature_with_reason): require that dict key is a
1283         basic type
1284
1285 2005-02-10  Havoc Pennington  <hp@redhat.com>
1286
1287         * dbus/dbus-object-tree.c (handle_default_introspect_and_unlock):
1288         change to be _and_unlock instead of _unlocked
1289
1290         * dbus/dbus-connection.c
1291         (_dbus_connection_send_preallocated_unlocked_no_update): rename to
1292         have no_update so we can find this bug quickly in future
1293
1294 2005-02-10  Havoc Pennington  <hp@redhat.com>
1295
1296         * dbus/dbus-message-util.c (verify_test_message): tests for string
1297         array
1298
1299         * dbus/dbus-message.c (dbus_message_append_args_valist): add
1300         support for arrays of string/signature/path
1301
1302 2005-02-10  Joe Shaw  <joeshaw@novell.com>
1303
1304         * dbus/dbus-connection.c
1305         (_dbus_connection_queue_received_message_link,
1306         _dbus_connection_message_sent): Add the path to
1307         the verbose output.
1308         (_dbus_connection_send_preallocated_and_unlock): Added.  Calls
1309         _dbus_connection_send_preallocated_unlocked(), updated the
1310         dispatch status, and unlocks.  Fixes a bug where certain
1311         situations (like a broken pipe) could cause a Disconnect message
1312         to not be sent, tricking the bus into thinking a service was still
1313         there when the process had quit.
1314         (_dbus_connection_send_preallocated): Call
1315         _dbus_connection_send_preallocated_and_unlock().
1316         (_dbus_connection_send_and_unlock): Added.  Calls
1317         _dbus_connection_send_preallocated_and_unlock().
1318         (dbus_connection_send): Call _dbus_connection_send_and_unlock().
1319         (dbus_connection_send_with_reply): Update the dispatch status and
1320         unlock.
1321
1322         * mono/Service.cs (~Service): Added.  Removes the filter so that
1323         we don't get unmanaged code calling back into a GCed delegate.
1324         (RemoveFilter); Added.
1325
1326 2005-02-09  John (J5) Palmieri  <johnp@redhat.com>
1327
1328         * dbus/dbus-message.c (dbus_message_iter_open_container):
1329         - Removed check for iterator type being an array because
1330         get_arg_type does not work with writer iterators
1331         - Pass NULL to _dbus_type_writer_recurse if signiture is NULL
1332
1333 2005-02-07  Havoc Pennington  <hp@redhat.com>
1334
1335         * doc/dbus-specification.xml: some more language cleanups; add
1336         stuff about how to deal with invalid protocol and extension
1337         points; add _ to allowed chars in auth commands; add EXTENSION_
1338         auth command prefix
1339
1340 2005-02-06  Havoc Pennington  <hp@redhat.com>
1341
1342         * s/expected/required/ in a couple places for clarity
1343
1344 2005-02-07  Colin Walters  <walters@verbum.org>
1345
1346         * bus/selinux.c (bus_selinux_allows_send): Handle NULL for
1347         sender or proposed_recipient.
1348
1349 2005-02-06  Havoc Pennington  <hp@redhat.com>
1350
1351         * dbus/dbus-message-factory.c (generate_special): more tests
1352
1353         * dbus/dbus-marshal-validate.c (validate_body_helper): detect
1354         array length that exceeds the maximum
1355
1356 2005-02-05  Havoc Pennington  <hp@redhat.com>
1357
1358         * dbus/dbus-message-factory.c (generate_special): more test cases,
1359         increasing coverage
1360
1361         * dbus/dbus-marshal-validate.c (validate_body_helper): return the
1362         reason why a signature was invalid
1363
1364         * dbus/dbus-marshal-header.c (load_and_validate_field): fix to
1365         skip the length of the string before we look at it in validation
1366
1367         * dbus/dbus-string-util.c (_dbus_string_test): add tests for
1368         equal_substring
1369
1370         * dbus/dbus-message.c (_dbus_message_loader_new): default
1371         max_message_length to DBUS_MAXIMUM_MESSAGE_LENGTH
1372
1373 2005-02-05  Havoc Pennington  <hp@redhat.com>
1374
1375         * dbus/dbus-marshal-validate.c (validate_body_helper): fix crash
1376         if the signature of a variant was empty
1377         (_dbus_validate_signature_with_reason): catch "(a)" (array inside
1378         struct with no element type)
1379
1380         * dbus/dbus-message-factory.c (generate_uint32_changed): add more
1381         mangled messages to break things
1382
1383 2005-02-04  Havoc Pennington  <hp@redhat.com>
1384
1385         * glib/dbus-gproxy.c (dbus_g_proxy_disconnect_signal): use
1386         g_quark_try_string() so it actually can return 0
1387         (dbus_g_proxy_connect_signal): ditto
1388
1389 2005-02-04  Havoc Pennington  <hp@redhat.com>
1390
1391         * glib/dbus-gproxy.c (dbus_g_proxy_emit_remote_signal): fix a
1392         bogus warning
1393         (tristring_from_message): assert cleanly on null path/interface
1394         (should not be possible though I decided later)
1395         (dbus_g_proxy_dispose): move proxy manager unregistration here
1396         (DBUS_G_PROXY_DESTROYED): add this macro, and use it in a bunch of
1397         g_return_if_fail() checks
1398
1399 2005-02-04  Havoc Pennington  <hp@redhat.com>
1400
1401         * doc/Makefile.am (EXTRA_DIST): add DTDs to makefile
1402
1403         * doc/introspect.dtd: add introspect.dtd from David A. Wheeler
1404         (with some minor changes)
1405
1406         * doc/dbus-specification.xml: add deprecated attribute to
1407         introspection format
1408
1409 2005-01-31  Havoc Pennington  <hp@redhat.com>
1410
1411         * glib/dbus-gproxy.c: rewrite how signals work again, this time I
1412         think it's sort of right
1413
1414 2005-01-30  Havoc Pennington  <hp@redhat.com>
1415
1416         * tools/dbus-viewer.c: kind of half-ass hook up the option menu.
1417
1418 2005-01-30  Havoc Pennington  <hp@redhat.com>
1419
1420         * tools/dbus-names-model.c: dynamically watch NameOwnerChanged
1421
1422         * autogen.sh: change to autotools 1.9
1423
1424         * glib/dbus-gproxy.c: completely change how signals work
1425         (dbus_g_proxy_add_signal): new function to specify signature of a
1426         signal
1427         (dbus_g_proxy_emit_received): marshal the dbus message to GValues,
1428         and g_warning if the incoming message has the wrong signature.
1429
1430 2005-01-30  Havoc Pennington  <hp@redhat.com>
1431
1432         * tools/dbus-names-model.c (have_names_notify): fix this
1433
1434         * dbus/dbus-message.c (_dbus_message_iter_get_args_valist): clean
1435         up the string array handling a bit 
1436
1437 2005-01-30  Havoc Pennington  <hp@redhat.com>
1438
1439         * glib/dbus-glib.c (dbus_g_pending_call_set_notify): new function
1440         (dbus_g_pending_call_cancel): new function
1441
1442         * dbus/dbus-glib.h: move GType decls for connection/message here;
1443         * dbus/dbus-glib.c: move all the g_type and ref/unref stuff in
1444         here, just kind of rationalizing how we handle all that
1445
1446         * tools/dbus-names-model.c: new file for a tree model listing the
1447         services on a bus
1448
1449         * tools/dbus-tree-view.c (model_new): use proper typing on the
1450         model rows
1451
1452 2005-01-30  Havoc Pennington  <hp@redhat.com>
1453
1454         * glib/dbus-gmain.c: add a custom GSource back that just checks
1455         whether the message queue has anything in it; otherwise, there are 
1456         cases where we won't see messages in the queue since there was no 
1457         IO visible to the glib main loop
1458
1459         * dbus/dbus-connection-internal.h (_DBUS_DEFAULT_TIMEOUT_VALUE):
1460         increase default message timeout to 25 seconds
1461
1462 2005-01-30  Havoc Pennington  <hp@redhat.com>
1463
1464         * test/glib/test-profile.c (no_bus_stop_server): remove the
1465         warning about the g_warning that I just fixed
1466
1467         * glib/dbus-gmain.c: rewrite the main loop stuff to avoid the
1468         custom source, seems to be a lot easier to understand and work
1469         better.
1470
1471 2005-01-30  Havoc Pennington  <hp@redhat.com>
1472
1473         I think this main loop thing is conceptually broken, but here are 
1474         some band aids. I'll maybe rewrite it in a minute.
1475         
1476         * glib/dbus-gmain.c (add_timeout): timeout stuff doesn't use the
1477         custom GSource, so don't pass it in; confusing
1478         (gsource_server_finalize, gsource_connection_finalize): add
1479         finalize handlers that remove all the watches.  
1480
1481 2005-01-30  Havoc Pennington  <hp@redhat.com>
1482
1483         * glib/dbus-gobject.c (introspect_properties): fix the XML
1484         generated
1485
1486         * dbus/dbus-message.c (dbus_message_unref): add an in_cache flag
1487         which effectively detects the use of freed messages
1488
1489         * glib/dbus-gobject.c (handle_introspect): modify and return the
1490         reply message instead of the incoming message
1491
1492         * dbus/dbus-object-tree.c (handle_default_introspect_unlocked):
1493         gee, maybe it should SEND THE XML instead of just making a string
1494         and freeing it again ;-)
1495
1496         * tools/dbus-print-message.c (print_message): improve printing of
1497         messages
1498
1499         * configure.in: add debug-glib.service to the output
1500
1501 2005-01-30  Havoc Pennington  <hp@redhat.com>
1502
1503         dbus-viewer introspected and displayed the bus driver
1504         
1505         * dbus/dbus-object-tree.c 
1506         (object_tree_test_iteration): add tests for a handler registered on "/"
1507
1508         * dbus/dbus-object-tree.c
1509         (_dbus_decompose_path): fix to handle path "/" properly
1510         (run_decompose_tests): add tests for path decomposition
1511         
1512         * glib/dbus-gutils.c (_dbus_gutils_split_path): fix to handle "/"
1513         properly
1514
1515         * glib/dbus-gobject.c (handle_introspect): fix quotes
1516
1517         * test/glib/run-test.sh: support launching the bus, then running
1518         dbus-viewer
1519
1520         * test/glib/test-service-glib.c (main): put in a trivial gobject
1521         subclass and register it on the connection
1522
1523         * bus/driver.c (bus_driver_handle_introspect): implement
1524         introspection of the bus driver service
1525
1526         * dbus/dbus-protocol.h: add #defines for the XML namespace,
1527         identifiers, doctype decl
1528
1529         * bus/driver.c (bus_driver_handle_get_service_owner): handle
1530         attempts to get owner of DBUS_SERVICE_ORG_FREEDESKTOP_DBUS by 
1531         returning the service unchanged.
1532         (bus_driver_handle_message): remove old check for reply_serial in
1533         method calls, now the message type deals with that
1534         (bus_driver_handle_message): handle NULL interface
1535
1536         * glib/dbus-gproxy.c (dbus_g_proxy_get_bus_name): new function
1537
1538         * glib/dbus-gloader-expat.c (description_load_from_string): allow
1539         -1 for len
1540
1541         * tools/dbus-viewer.c: add support for introspecting a service on
1542         a bus
1543
1544         * glib/dbus-gproxy.c (dbus_g_pending_call_ref): add
1545         (dbus_g_pending_call_unref): add
1546
1547 2005-01-29  Havoc Pennington  <hp@redhat.com>
1548
1549         * tools/dbus-tree-view.c: add support for displaying properties.
1550         (run dbus-viewer with an introspect xml file as arg, then resize
1551         the window so the tree elements show up, not sure what that is)
1552
1553         * glib/dbus-gobject.c (handle_introspect): return
1554         org.freedesktop.Properties and org.freedesktop.Introspectable
1555         interfaces when we are introspected.
1556
1557         * doc/dbus-specification.xml: allow empty interface name when 
1558         Get/Set a property
1559
1560 2005-01-29  Havoc Pennington  <hp@redhat.com>
1561
1562         * glib/Makefile.am: rename dbus-glib-tool to dbus-binding-tool;
1563         though it uses glib, it could be extended for any binding in
1564         principle
1565
1566         * glib/dbus-gobject.c (gobject_message_function): change to the
1567         new way properties work
1568
1569         * dbus/dbus-protocol.h: add the new interfaces
1570
1571         * doc/dbus-specification.xml: document the introspection format,
1572         Introspectable interface, and add an org.freedesktop.Properties
1573         interface.
1574
1575         * glib/dbus-gparser.c: add support for a <property> element
1576
1577         * glib/dbus-gidl.c: add PropertyInfo
1578
1579         * glib/dbus-gobject.c (handle_introspect): put the outermost
1580         <node> outside the signal and property descriptions.
1581         (introspect_properties): export properties as <property> rather
1582         than as method calls
1583
1584 2005-01-28  Havoc Pennington  <hp@redhat.com>
1585
1586         * doc/TODO, doc/dbus-specification.xml: spec and TODO tweaks
1587         related to authentication protocol
1588
1589 2005-01-28  John (J5) Palmieri  <johnp@redhat.com>
1590
1591         * python/dbus_bindings.pyx.in: Updated to handle new D-BUS type system
1592                 - BUS_ACTIVATION -> BUS_STARTER
1593                 - DBUS_BUS_ACTIVATION -> DBUS_BUS_STARTER
1594                 - class MessageIter (__init__): Added recursion checking 
1595                 so we throw a nice error instead of just disconnecting from the
1596                 bus.
1597                 (get): Added arg_type parameter for recursion.
1598                 Removed the nil type
1599                 Added signiture type placeholder (not implemented)
1600                 Added struct type placeholder (not implemented)
1601                 Added varient type placeholder (not implemented)
1602                 Commented out dict type for now     
1603                 (get_element_type): renamed from get_array_type
1604                 (get_*): changed to use the dbus_message_iter_get_basic API
1605                 (get_*_array): removed in favor of recursive get_array method
1606                 (get_array): new recursive method which calls get to marshal
1607                 the elements of the array
1608                 (value_to_dbus_sig): New method returns the corrasponding
1609                 dbus signiture to a python value
1610                 (append): Comment out dict handling for now
1611                 Handle lists with the new recursive API
1612                 Comment out None handling for now
1613                 (append_nil): removed
1614                 (append_*): changed to use dbus_message_iter_append_basic API
1615                 (append_*_array): removed in favor of recursive append_array 
1616                 method
1617                 (__str__): Make it easier to print out recursive iterators
1618                 for debugging
1619                 - class Message (__str__): moved type inspection to the
1620                 MessageIter class' __str__ method
1621                 (get_iter): Added an append parameter wich defaults to False
1622                 If True use the new API's to create an append iterator
1623
1624         * python/dbus.py: Update to use new bindings API
1625                 - TYPE_ACTIVATION -> TYPE_STARTER
1626                 - class Bus (_get_match_rule): GetServiceOwner -> GetNameOwner
1627                 - class ActivationBus -> class StarterBus
1628                 - class RemoteObject (__call__): get an append iterator
1629                 - (_dispatch_dbus_method_call): get an append iterator
1630                 - class Object (emit_signal): get an append iterator
1631
1632         * python/examples/: Fixed up the examples to work with the new API
1633                 
1634 2005-01-28  Joe Shaw  <joeshaw@novell.com>
1635
1636         * configure.in: Bump version up to 0.30.
1637
1638         * HACKING: Add a release item to bump the version number up after 
1639         a release.
1640
1641 2005-01-28  Havoc Pennington  <hp@redhat.com>
1642
1643         * doc/dbus-specification.xml: update to describe 16-bit types and
1644         dict entries
1645
1646         * dbus/dbus-marshal-basic.c (_dbus_unpack_uint16): fix broken
1647         assertion
1648
1649         * dbus/dbus-protocol.h (DBUS_TYPE_DICT_ENTRY): add DICT_ENTRY as a
1650         type
1651
1652         * dbus/dbus-marshal-recursive.c: implement
1653
1654 2005-01-27  Havoc Pennington  <hp@redhat.com>
1655
1656         * dbus/dbus-arch-deps.h.in: add 16/32-bit types
1657
1658         * configure.in: find the right type for 16 and 32 bit ints as well
1659         as 64
1660
1661         * dbus/dbus-protocol.h (DBUS_TYPE_INT16, DBUS_TYPE_UINT16): add
1662         the 16-bit types so people don't have to stuff them in 32-bit or
1663         byte arrays.
1664
1665 2005-01-27  Havoc Pennington  <hp@redhat.com>
1666
1667         * dbus/dbus-message.c: byteswap the message if you init an
1668         iterator to read/write from it
1669         
1670         * dbus/dbus-marshal-byteswap.c: new file implementing 
1671         _dbus_marshal_byteswap()
1672
1673         * dbus/dbus-marshal-basic.c: add _dbus_swap_array()
1674
1675 2005-01-26  Havoc Pennington  <hp@redhat.com>
1676         
1677         * dbus/dbus-marshal-validate-util.c: break this out (and fix
1678         build, apparently - nobody noticed?)
1679         
1680 2005-01-26  Havoc Pennington  <hp@redhat.com>
1681
1682         * dbus/dbus-marshal-recursive.h: remove todo comment
1683
1684 2005-01-25  Joe Shaw  <joeshaw@novell.com>
1685
1686         * Land the mono binding changes to conform to the new APIs.
1687
1688         * mono/Makefile.am: Remove Custom.cs, DBusType/Custom.cs,
1689         DBusType/Dict.cs, and DBusType/Nil.cs from the build.
1690
1691         * mono/Arguments.cs (GetCodeAsString): Added.  Returns the dbus
1692         type code as a string.
1693         (InitAppending): Rename dbus_message_append_iter_init() to
1694         dbus_message_iter_init_append().
1695
1696         * mono/BusDriver.cs: Rename ServiceEventHandler to
1697         NameOwnerChangedHandler.  Rename GetServiceOwner to GetOwner.
1698         Rename ServiceOwnerChanged to NameOwnerChanged.
1699
1700         * mono/Connection.cs: Rename BaseService to UniqueName, and the
1701         underlying C call.
1702
1703         * mono/Custom.cs: Removed.  The CUSTOM type has been removed.
1704
1705         * mono/Service.cs: Rename Exists to HasOwner, internally rename
1706         dbus_bus_acquire_service() to dbus_bus_request_name().
1707
1708         * mono/DBusType/Array.cs (ctor): Use Type.GetElementType() instead
1709         of Type.UnderlyingSystemType to get the correct element type for
1710         the array.
1711         (ctor): Update code for new APIs: use dbus_message_iter_recurse(),
1712         dbus_message_get_{element|arg}_type() instead of
1713         dbus_message_iter_init_array_iterator().
1714         (Append): Replace dbus_message_iter_append_array() with
1715         dbus_message_iter_open_container() and
1716         dbus_message_iter_close_container().
1717
1718         * mono/DBusType/Custom.cs, mono/DBusType/Nil.cs: Removed.  These
1719         types have been removed.
1720         
1721         * mono/DBusType/*.cs: Replace calls of
1722         dbus_message_iter_get_[type]() to dbus_message_iter_get_basic(),
1723         but specify the type in the DllImport extern declaration.  Ditto
1724         for dbus_message_iter_append_[type]() ->
1725         dbus_message_iter_append_basic().
1726
1727         * mono/example/BusListener.cs: Update for ServiceEventHandler ->
1728         NameOwnerChangedHandler.
1729
1730 2005-01-25  John (J5) Palmieri  <johnp@redhat.com>
1731
1732         * python/dbus_bindings.pyx.in: Rename of methods and bindings
1733                 - get_base_service -> get_unique_name
1734                 - bus_get_base_service -> bus_get_unique_name
1735                 - dbus_bus_get_base_service -> dbus_bus_get_unique_name
1736                 - ACTIVATION_REPLY_ACTIVATED -> DBUS_START_REPLY_SUCCESS 
1737                 - ACTIVATION_REPLY_ALREADY_ACTIVE -> DBUS_START_REPLY_ALREADY_RUNNING
1738                 - bus_activate_service -> bus_start_service_by_name
1739                 - dbus_bus_activate_service -> dbus_bus_start_service_by_name
1740                 - bus_acquire_service -> bus_request_name
1741                 - dbus_bus_acquire_service -> dbus_bus_request_name
1742                 - bus_service_exists -> bus_name_has_owner
1743                 - dbus_bus_service_exists -> dbus_bus_name_has_owner
1744
1745         * python/dbus.py: Rename of methods
1746                 - activate_service -> start_service_by_name
1747                 - bus_acquire_service -> bus_request_name
1748                 - ACTIVATION_REPLY_ACTIVATED -> START_REPLY_SUCCESS 
1749                 - ACTIVATION_REPLY_ALREADY_ACTIVE -> START_REPLY_ALREADY_RUNNING
1750
1751         
1752 2005-01-24  Joe Shaw  <joeshaw@novell.com>
1753
1754         * dbus/dbus-connection.c (dbus_connection_dispatch): Print out the
1755         signature for the method that can't be found.
1756
1757         * dbus/dbus-message.c (dbus_message_iter_init): To check to see if
1758         the message has any arguments, we need to call
1759         _dbus_type_reader_get_current_type(), not
1760         _dbus_type_reader_has_next().
1761
1762 2005-01-24  Havoc Pennington  <hp@redhat.com>
1763
1764         * dbus/dbus-message-factory.c: more testing of message validation
1765
1766         * dbus/dbus-protocol.h (DBUS_MINIMUM_HEADER_SIZE): move to this
1767         header
1768
1769 2005-01-23  Havoc Pennington  <hp@redhat.com>
1770
1771         * dbus/dbus-message-factory.c, dbus/dbus-message-util.c: 
1772         get this all working, not many tests in the framework yet though
1773
1774 2005-01-22  Havoc Pennington  <hp@redhat.com>
1775
1776         * doc/dbus-faq.xml, doc/dbus-tutorial: add a FAQ and update
1777         tutorial, based on work from David Wheeler.
1778
1779 2005-01-21  Havoc Pennington  <hp@redhat.com>
1780
1781         * dbus/dbus-bus.c: add more return_if_fail checks
1782
1783         * dbus/dbus-message.c (load_message): have the "no validation"
1784         mode (have to edit the code to toggle the mode for now though)
1785
1786         * dbus/dbus-marshal-header.c (_dbus_header_load): have a mode that
1787         skips all validation; I want to use this at least for benchmark
1788         baseline, I'm not sure if it should be a publicly-available switch.
1789
1790 2005-01-21  Havoc Pennington  <hp@redhat.com>
1791
1792         * glib/dbus-gmain.c: don't put the GLib bindings in the same
1793         toplevel doxygen group as the low-level API stuff
1794
1795         * dbus/dbus.h: note that libdbus is the low-level API
1796
1797 2005-01-20  Havoc Pennington  <hp@redhat.com>
1798
1799         * update-dbus-docs.sh: script to update docs on the web site, only
1800         works for me though. neener.
1801
1802 2005-01-20  Havoc Pennington  <hp@redhat.com>
1803
1804         * dbus/dbus-sysdeps.c (_dbus_poll): amazingly, trying to compile
1805         code can reveal bugs in it
1806
1807 2005-01-20  Havoc Pennington  <hp@redhat.com>
1808
1809         * dbus/dbus-sysdeps.c (_dbus_poll): fix several bugs in the
1810         select() version, patches from Tor Lillqvist
1811
1812 2005-01-20  Havoc Pennington  <hp@redhat.com>
1813
1814         * doc/dbus-tutorial.xml: replace > with &gt;
1815
1816         * bus/services.c (bus_registry_acquire_service): validate the name
1817         and return a better error if it's no good.
1818
1819         * doc/dbus-specification.xml: note NO_AUTO_START change
1820
1821         * dbus/dbus-protocol.h (DBUS_HEADER_FLAG_NO_AUTO_START): change
1822         from AUTO_START, we're toggling the default
1823
1824         * bus/dispatch.c: adapt the tests to change of auto-start default
1825
1826 2005-01-18  Havoc Pennington  <hp@redhat.com>
1827
1828         * rename dbus-daemon-1 to dbus-daemon throughout
1829
1830 2005-01-18  Havoc Pennington  <hp@redhat.com>
1831
1832         * Throughout, grand renaming to strip out the use of "service",
1833         just say "name" instead (or "bus name" when ambiguous).  Did not
1834         change the internal code of the message bus itself, only the
1835         programmer-facing API and messages.
1836         
1837         * doc/dbus-specification.xml: further update the message bus section
1838         
1839         * bus/config-parser.c (all_are_equiv): fix bug using freed string
1840         in error case
1841
1842 2005-01-17  Havoc Pennington  <hp@redhat.com>
1843
1844         * dbus/dbus-types.h: remove 16-bit types since we don't use them
1845         ever
1846
1847         * dbus/dbus-marshal-validate.c (_dbus_validate_path): disallow any
1848         "invalid name character" not only non-ASCII
1849
1850         * doc/dbus-specification.xml: further update spec, message bus 
1851         parts are still out-of-date but the marshaling etc. stuff is now
1852         accurate-ish
1853
1854 2005-01-17  Havoc Pennington  <hp@redhat.com>
1855
1856         * doc/dbus-specification.xml: partially update spec
1857
1858 2005-01-17  Havoc Pennington  <hp@redhat.com>
1859
1860         * Throughout, align variant bodies according to the contained
1861         type, rather than always to 8. Should save a fair bit of space in
1862         message headers.
1863         
1864         * dbus/dbus-marshal-validate.c (_dbus_validate_body_with_reason):
1865         fix handling of case where p == end
1866
1867         * doc/TODO: remove the dbus_bool_t item and variant alignment items
1868
1869 2005-01-17  Havoc Pennington  <hp@redhat.com>
1870
1871         * dbus/dbus-types.h: hardcode dbus_bool_t to 32 bits
1872
1873         * Throughout: modify DBUS_TYPE_BOOLEAN to be a 32-bit type instead
1874         of an 8-bit type. Now dbus_bool_t is the type to use whenever you 
1875         are marshaling/unmarshaling a boolean.
1876
1877 2005-01-16  Havoc Pennington  <hp@redhat.com>
1878
1879         This is about it on what can be disabled/deleted from libdbus
1880         easily, back below 150K anyhow. Deeper cuts are more work than 
1881         just turning the code off as I've done here.
1882         
1883         * dbus/dbus-marshal-basic.c (_dbus_pack_int32): we don't need the
1884         signed int convenience funcs
1885
1886         * dbus/dbus-internals.c (_dbus_verbose_real): omit when not in
1887         verbose mode
1888
1889         * dbus/dbus-string-util.c, dbus/dbus-string.c: more breaking
1890         things out of libdbus
1891
1892         * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-util.c: same
1893         
1894         * dbus/dbus-hash.c: purge the TWO_STRINGS crap (well, make it
1895         tests-enabled-only, though it should probably be deleted)
1896
1897         * dbus/dbus-message-util.c: same stuff
1898
1899         * dbus/dbus-auth-util.c: same stuff
1900
1901 2005-01-16  Havoc Pennington  <hp@redhat.com>
1902
1903         * dbus/dbus-userdb-util.c: split out part of dbus-userdb.c
1904
1905         * dbus/dbus-sysdeps.c (_dbus_uid_from_string): move here to pave
1906         way for stripping down dbus-userdb.c stuff included in libdbus.
1907         Rename _dbus_parse_uid for consistency.
1908
1909 2005-01-16  Havoc Pennington  <hp@redhat.com>
1910
1911         * dbus/dbus-internals.c (_dbus_real_assert): print the function
1912         name the assertion failed in
1913
1914         * dbus/dbus-internals.h (_dbus_return_if_fail) 
1915         (_dbus_return_val_if_fail): assert that the name of the function
1916         containing the check doesn't start with '_', since we only want to 
1917         use checks on public functions
1918         
1919         * dbus/dbus-connection.c (_dbus_connection_ref_unlocked): change
1920         checks to assertions
1921
1922         * dbus/dbus-marshal-header.c (_dbus_header_set_field_basic):
1923         change checks to asserts for private function
1924
1925         * dbus/dbus-message.c (_dbus_message_set_serial): checks
1926         to asserts for private function
1927
1928         * dbus/dbus-marshal-recursive.c (skip_one_complete_type): remove
1929         broken assertion that was breaking make check
1930         (_dbus_type_reader_array_is_empty): remove this rather than fix
1931         it, was only used in assertions
1932
1933 2005-01-16  Havoc Pennington  <hp@redhat.com>
1934
1935         * test/unused-code-gc.py: hacky script to find code that's used
1936         only by the bus (not libdbus) or used only by tests or not used at
1937         all. It has some false alarms, but looks like we can clean up a
1938         lot of size from libdbus.
1939
1940         * dbus/dbus-sysdeps.c, dbus/dbus-sysdeps-utils.c,
1941         dbus/Makefile.am: initially move 10K of binary size out of libdbus
1942         
1943 2005-01-16  Havoc Pennington  <hp@redhat.com>
1944
1945         * Add and fix docs according to Doxygen warnings throughout
1946         source.
1947         
1948         * dbus/dbus-marshal-recursive.c
1949         (_dbus_type_reader_array_is_empty): change this to just call
1950         array_reader_get_array_len() and make it static
1951
1952         * dbus/dbus-message.c (dbus_message_iter_get_element_type): rename
1953         from get_array_type
1954         (dbus_message_iter_init_append): rename from append_iter_init
1955
1956         * dbus/dbus-marshal-recursive.c
1957         (_dbus_type_reader_get_element_type): rename from
1958         _dbus_type_reader_get_array_type
1959
1960 2005-01-15  Havoc Pennington  <hp@redhat.com>
1961
1962         * test/glib/test-profile.c (with_bus_server_filter): fix crash
1963
1964         * dbus/dbus-marshal-basic.c (_dbus_unpack_uint32): inline as macro
1965         when DBUS_DISABLE_ASSERT
1966         (_dbus_marshal_set_basic): be sure we align for the string length
1967
1968         * dbus/dbus-marshal-recursive.c (skip_one_complete_type): make
1969         this look faster
1970
1971         * dbus/dbus-string.c (_dbus_string_get_const_data_len): add an
1972         inline macro version
1973         (_dbus_string_set_byte): provide inline macro version
1974
1975 2005-01-15  Havoc Pennington  <hp@redhat.com>
1976
1977         * Land the new message args API and type system.
1978
1979         This patch is huge, but the public API change is not 
1980         really large. The set of D-BUS types has changed somewhat, 
1981         and the arg "getters" are more geared toward language bindings;
1982         they don't make a copy, etc.
1983
1984         There are also some known issues. See these emails for details
1985         on this huge patch:
1986         http://lists.freedesktop.org/archives/dbus/2004-December/001836.html
1987         http://lists.freedesktop.org/archives/dbus/2005-January/001922.html
1988         
1989         * dbus/dbus-marshal-*: all the new stuff
1990
1991         * dbus/dbus-message.c: basically rewritten
1992
1993         * dbus/dbus-memory.c (check_guards): with "guards" enabled, init
1994         freed blocks to be all non-nul bytes so using freed memory is less
1995         likely to work right
1996
1997         * dbus/dbus-internals.c (_dbus_test_oom_handling): add
1998         DBUS_FAIL_MALLOC=N environment variable, so you can do
1999         DBUS_FAIL_MALLOC=0 to skip the out-of-memory checking, or
2000         DBUS_FAIL_MALLOC=10 to make it really, really, really slow and
2001         thorough.
2002
2003         * qt/message.cpp: port to the new message args API
2004         (operator<<): use str.utf8() rather than str.unicode()
2005         (pretty sure this is right from the Qt docs?)
2006
2007         * glib/dbus-gvalue.c: port to the new message args API
2008
2009         * bus/dispatch.c, bus/driver.c: port to the new message args API
2010
2011         * dbus/dbus-string.c (_dbus_string_init_const_len): initialize the
2012         "locked" flag to TRUE and align_offset to 0; I guess we never
2013         looked at these anyhow, but seems cleaner.
2014
2015         * dbus/dbus-string.h (_DBUS_STRING_ALLOCATION_PADDING):
2016         move allocation padding macro to this header; use it to implement
2017         (_DBUS_STRING_STATIC): ability to declare a static string.
2018
2019         * dbus/dbus-message.c (_dbus_message_has_type_interface_member):
2020         change to return TRUE if the interface is not set.
2021
2022         * dbus/dbus-string.[hc]: move the D-BUS specific validation stuff
2023         to dbus-marshal-validate.[hc]
2024
2025         * dbus/dbus-marshal-basic.c (_dbus_type_to_string): move here from
2026         dbus-internals.c
2027
2028         * dbus/Makefile.am: cut over from dbus-marshal.[hc]
2029         to dbus-marshal-*.[hc]
2030
2031         * dbus/dbus-object-tree.c (_dbus_decompose_path): move this
2032         function here from dbus-marshal.c
2033
2034 2005-01-12  Joe Shaw  <joeshaw@novell.com>
2035
2036         * NEWS: Update for 0.23.
2037
2038         * configure.in: Release 0.23.
2039
2040 2005-01-12  Joe Shaw  <joeshaw@novell.com>
2041
2042         * mono/Makefile.am, mono/example/Makefile.am: Always build the 
2043         dbus DLL with --debug.  Clean up after the .mdb files this leaves
2044         behind.
2045
2046         * mono/doc/Makefile.am: Need to uninstall the docs on "make
2047         uninstall"
2048
2049         * mono/Arguments.cs (GetDBusTypeConstructor): If the type
2050         is an enum, get the enum's underlying type.  Another mono
2051         1.1.3 fix.
2052
2053 2005-01-11  Joe Shaw  <joeshaw@novell.com>
2054
2055         Patch from Sjoerd Simons <sjoerd@luon.net>
2056
2057         * mono/Makefile.am, mono/example/Makefile.am: Don't redefine
2058         DESTDIR.  It breaks stuff.
2059
2060 2005-01-11  Joe Shaw  <joeshaw@novell.com>
2061
2062         Patch from Tambet Ingo <tambet@ximian.com>
2063
2064         * mono/DBusType/Array.cs (Get): Get the underlying element type by
2065         calling type.GetElementType().  The code previously depended on
2066         broken Mono behavior, which was fixed in Mono 1.1.3.
2067
2068         * mono/DBusType/Dict.cs (constructor): Fix the parameters for
2069         Activator.CreateInstance() so that the class's constructor is
2070         called with the right parameters.
2071
2072 2005-01-11  Joe Shaw  <joeshaw@novell.com>
2073
2074         Patch from Timo Teräs <ext-timo.teras@nokia.com>
2075
2076         * dbus/dbus-connection.c
2077         (_dbus_connection_queue_received_message_link): Call
2078         _dbus_connection_remove_timeout() instead of the _locked()
2079         variant, since it's always called from
2080         _dbus_connection_handle_watch(), which handles the locking.
2081         Removed the _locked() variant since it's no longer used.
2082
2083 2005-01-03  Havoc Pennington  <hp@redhat.com>
2084
2085         * dbus/dbus-internals.h: I'm an idiot, _dbus_assert certainly can
2086         return
2087         
2088 2004-12-26  Havoc Pennington  <hp@redhat.com>
2089
2090         * dbus/dbus-internals.h: add _DBUS_GNUC_NORETURN to _dbus_assert
2091
2092 2005-01-03  Havoc Pennington  <hp@redhat.com>
2093
2094         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): fix using == on
2095         floating point
2096
2097         * dbus/dbus-string.c (_dbus_string_insert_alignment): new function
2098
2099 2005-01-02  Havoc Pennington  <hp@redhat.com>
2100
2101         * dbus/dbus-internals.h (_DBUS_ALIGN_OFFSET): new macro
2102
2103 2005-01-01  Havoc Pennington  <hp@redhat.com>
2104
2105         * configure.in: add -Wfloat-equal
2106
2107 2005-01-01  Havoc Pennington  <hp@redhat.com>
2108
2109         * dbus/dbus-sysdeps.h: add _DBUS_DOUBLES_BITWISE_EQUAL macro, 
2110         for a variety of reasons '==' doesn't do this.
2111
2112 2004-12-31  Havoc Pennington  <hp@redhat.com>
2113
2114         * dbus/dbus-string.c (_dbus_string_equal_substrings): new function
2115         I keep wishing I had
2116
2117 2004-12-30  John (J5) Palmieri  <johnp@redhat.com>
2118
2119         * python/dbus.py: s/ACTIVATION_REPLY_ACTIVE/ACTIVATION_REPLY_ACTIVATED
2120
2121 2004-12-30  John (J5) Palmieri  <johnp@redhat.com>
2122
2123         * python/dbus_bindings.pyx.in: Change DBUS_ACTIVATION_REPLY_ACTIVATED
2124         and DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE to match the values in
2125         dbus-protocol.h.  Because they are defines and not enums they are not
2126         autogenerated.
2127
2128 2004-12-26  John (J5) Palmieri  <johnp@redhat.com>
2129
2130         * python/dbus_bindings.pyx.in (bus_activate_service): Bind
2131         dbus_bus_activate_service
2132
2133         * python/dbus.py (Bus.activate_service): activate a service on the
2134         bus.
2135
2136 2004-12-24  Havoc Pennington  <hp@redhat.com>
2137
2138         * test/decode-gcov.c: change to use .gcno and .gcda files, but the
2139         file format has also changed and I haven't adapted to that yet
2140         
2141         * Makefile.am: load .gcno files from latest gcc
2142
2143 2004-12-23  John (J5) Palmieri  <johnp@redhat.com>
2144         * Patch from Rob Taylor <robtaylor@fastmail.fm>
2145
2146         * python/dbus_bindings.pyx.in (bus_get_unix_user): New
2147         lowlevel binding
2148
2149         * python/dbus.py (get_unix_user): Added binding to 
2150         call dbus_bindings.bus_get_unix_user
2151
2152         * python/extract.py: Modified the proto_pat regex to
2153         handle unsigned long
2154
2155 2004-12-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2156
2157         * dbus/make-dbus-glib-error-enum.sh: omit the function keyword for
2158         better POSIX compliance.
2159
2160 2004-12-19  Havoc Pennington  <hp@redhat.com>
2161
2162         * dbus/dbus-string.c (_dbus_string_insert_4_aligned) 
2163         (_dbus_string_insert_8_aligned): new functions
2164
2165         * dbus/dbus-string.c (_dbus_string_alloc_space): new function
2166
2167 2004-12-18  Havoc Pennington  <hp@redhat.com>
2168
2169         * dbus/dbus-string.c (_dbus_string_validate_ascii): use ISASCII
2170         macro
2171
2172         * dbus/dbus-message.c: fix a comment, and add a still-unused
2173         not-implemented function
2174
2175         * dbus/dbus-marshal.h: fix comment
2176
2177         * dbus/dbus-internals.h (_DBUS_ISASCII): new macro
2178
2179 2004-12-17  Joe Shaw  <joeshaw@novell.com>
2180
2181         * mono/DBusType/Byte.cs, mono/DBusType/Int32.cs,
2182         mono/DBusType/Int64.cs, mono/DBusType/UInt32.cs,
2183         mono/DBusType/UInt64.cs: Use Enum.GetUnderlyingType() instead of
2184         Type.UnderlyingSystemType to get the actual system type
2185         underneath.  This code previously depended on the broken Mono
2186         behavior, which was fixed in 1.1.3.
2187
2188 2004-11-27  Havoc Pennington  <hp@redhat.com>
2189
2190         * dbus/dbus-string.h (_dbus_string_get_byte): inline when asserts
2191         are disabled
2192         (_dbus_string_get_const_data): inline when asserts are disabled
2193
2194         * dbus/dbus-message.c: record the _dbus_current_generation of
2195         creation so we can complain if dbus_shutdown() is used improperly.
2196         Do this only if checks are enabled.
2197
2198         * dbus/dbus-connection.c: ditto
2199         
2200 2004-11-26  Havoc Pennington  <hp@redhat.com>
2201
2202         * test/glib/test-profile.c: add with_bus mode to profile echoes
2203         that go through the bus.
2204
2205         * test/glib/run-test.sh: add ability to run test-profile
2206
2207         * bus/dbus-daemon-1.1.in: fix to say that SIGHUP causes partial
2208         config file reload.
2209
2210 2004-11-26  Havoc Pennington  <hp@redhat.com>
2211
2212         * test/glib/test-profile.c: clean up how the fake_malloc_overhead
2213         thing was implemented
2214
2215 2004-11-26  Havoc Pennington  <hp@redhat.com>
2216
2217         * test/glib/test-profile.c: tweak a bit, add support for some
2218         made-up minimal malloc overhead with plain sockets, since in 
2219         real life some sort of buffers are unavoidable thus we could 
2220         count them in the theoretical best case
2221
2222 2004-11-26  Havoc Pennington  <hp@redhat.com>
2223
2224         * dbus/dbus-message.c (dbus_message_cache_or_finalize): fix bug
2225         where I was trying to cache one too many messages
2226
2227 2004-11-26  Havoc Pennington  <hp@redhat.com>
2228
2229         * dbus/dbus-message.c: reimplement message cache as an array which 
2230         makes the cache about twice as fast and saves maybe 1.5% overall
2231
2232 2004-11-26  Havoc Pennington  <hp@redhat.com>
2233
2234         * dbus/dbus-threads.c (init_global_locks): forgot to put the
2235         message cache lock here
2236
2237 2004-11-26  Havoc Pennington  <hp@redhat.com>
2238
2239         * dbus/dbus-message.c (struct DBusMessage): put the locked bit and
2240         the "char byte_order" next to each other to save 4 bytes
2241         (dbus_message_new_empty_header): reduce preallocation, since the
2242         message cache should achieve a similar effect
2243         (dbus_message_cache_or_finalize, dbus_message_get_cached): add a
2244         message cache that keeps a few DBusMessage around in a pool,
2245         another 8% speedup or so.
2246
2247         * dbus/dbus-dataslot.c (_dbus_data_slot_list_clear): new function
2248
2249 2004-11-25  Havoc Pennington  <hp@redhat.com>
2250
2251         * dbus/dbus-transport-unix.c (unix_do_iteration): if we're going
2252         to write, without reading or blocking, try it before the poll()
2253         and skip the poll() if nothing remains to write. This is about a
2254         3% speedup in the echo client/server
2255
2256 2004-11-25  Havoc Pennington  <hp@redhat.com>
2257
2258         The primary change here is to always write() once before adding
2259         the write watch, which gives us about a 10% performance increase.
2260         
2261         * dbus/dbus-transport-unix.c: a number of modifications to cope
2262         with removing messages_pending
2263         (check_write_watch): properly handle
2264         DBUS_AUTH_STATE_WAITING_FOR_MEMORY; adapt to removal of
2265         messages_pending stuff
2266         (check_read_watch): properly handle WAITING_FOR_MEMORY and
2267         AUTHENTICATED cases
2268         (unix_handle_watch): after writing, see if the write watch can be
2269         removed
2270         (unix_do_iteration): assert that write_watch/read_watch are
2271         non-NULL rather than testing that they aren't, since they 
2272         aren't allowed to be NULL. check_write_watch() at the end so 
2273         we add the watch if we did not finish writing (e.g. got EAGAIN)
2274
2275         * dbus/dbus-transport-protected.h: remove messages_pending call,
2276         since it resulted in too much inefficient watch adding/removing; 
2277         instead we now require that the transport user does an iteration 
2278         after queueing outgoing messages, and after trying the first
2279         write() we add a write watch if we got EAGAIN or exceeded our 
2280         max bytes to write per iteration setting
2281
2282         * dbus/dbus-string.c (_dbus_string_validate_signature): add this
2283         function
2284
2285         * dbus/dbus-server-unix.c (unix_finalize): the socket name was
2286         freed and then accessed, valgrind flagged this bug, fix it
2287
2288         * dbus/dbus-message.c: fix several bugs where HEADER_FIELD_LAST was taken
2289         as the last valid field plus 1, where really it is equal to the
2290         last valid field. Corrects some message corruption issues.
2291
2292         * dbus/dbus-mainloop.c: verbosity changes
2293
2294         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): handle OOM
2295         instead of aborting in one of the test codepaths
2296
2297         * dbus/dbus-internals.c (_dbus_verbose_real): fix a bug that
2298         caused not printing the pid ever again if a verbose was missing
2299         the newline at the end
2300         (_dbus_header_field_to_string): add HEADER_FIELD_SIGNATURE
2301
2302         * dbus/dbus-connection.c: verbosity changes; 
2303         (dbus_connection_has_messages_to_send): new function
2304         (_dbus_connection_message_sent): no longer call transport->messages_pending
2305         (_dbus_connection_send_preallocated_unlocked): do one iteration to
2306         try to write() immediately, so we can avoid the write watch. This
2307         is the core purpose of this patchset
2308         (_dbus_connection_get_dispatch_status_unlocked): if disconnected,
2309         dump the outgoing message queue, so nobody will get confused
2310         trying to send them or thinking stuff is pending to be sent
2311
2312         * bus/test.c: verbosity changes
2313
2314         * bus/driver.c: verbosity/assertion changes
2315
2316         * bus/dispatch.c: a bunch of little tweaks to get it working again
2317         because this patchset changes when/where you need to block.
2318
2319 2004-11-23  Havoc Pennington  <hp@redhat.com>
2320
2321         * test/glib/test-profile.c: modify to accept a plain_sockets
2322         argument in which case it will bench plain sockets instead of
2323         libdbus, for comparison purposes.
2324
2325 2004-11-22  Havoc Pennington  <hp@redhat.com>
2326
2327         * test/glib/test-profile.c (N_CLIENT_THREADS): run multiple
2328         threads for more time, so sysprof can get a grip on it.
2329
2330         * dbus/dbus-string.c (_dbus_string_validate_utf8): remove
2331         pointless variable
2332
2333 2004-11-13  Havoc Pennington  <hp@redhat.com>
2334
2335         * test/glib/test-profile.c: fix this thing up a bit
2336
2337         * dbus/dbus-message.c (dbus_message_new_empty_header): increase
2338         preallocation sizes by a fair bit; not sure if this will be an
2339         overall performance win or not, but it does reduce reallocs.
2340
2341         * dbus/dbus-string.c (set_length, reallocate_for_length): ignore
2342         the test hack that forced constant realloc if asserts are
2343         disabled, so we can profile sanely. Sprinkle in some
2344         _DBUS_UNLIKELY() which are probably pointless, but before I
2345         noticed the real performance problem I put them in.
2346         (_dbus_string_validate_utf8): micro-optimize this thing a little
2347         bit, though callgrind says it didn't help; then special-case
2348         ascii, which did help a lot; then be sure we detect nul bytes as
2349         invalid, which is a bugfix.
2350         (align_length_then_lengthen): add some more _DBUS_UNLIKELY
2351         superstition; use memset to nul the padding instead of a manual
2352         loop.
2353         (_dbus_string_get_length): inline this as a
2354         macro; it showed up in the profile because it's used for loop
2355         tests and so forth
2356
2357 2004-11-10  Colin Walters  <walters@verbum.org>
2358
2359         * dbus/dbus-spawn.c (check_babysit_events): Handle EINTR,
2360         for extra paranoia.
2361
2362 2004-11-09  Colin Walters  <walters@verbum.org>
2363
2364         * dbus/dbus-string.c (_dbus_string_get_length): New
2365         function, writes DBusString to C buffer.
2366
2367         * dbus/dbus-string.h: Prototype it.
2368
2369         * dbus/dbus-message.c (dbus_message_type_to_string): New
2370         function, converts message type into C string.
2371
2372         * dbus/dbus-message.h: Prototype it.
2373
2374         * bus/selinux.c (bus_selinux_check): Take source pid,
2375         target pid, and audit data.  Pass audit data to
2376         avc_has_perm.
2377         (log_audit_callback): New function, appends extra
2378         audit information.
2379         (bus_selinux_allows_acquire_service): Also take
2380         service name, add it to audit data.
2381         (bus_selinux_allows_send): Also take message
2382         type, interface, method member, error name,
2383         and destination, and add them to audit data.
2384         (log_cb): Initialize func_audit.
2385         
2386         * bus/selinux.h (bus_selinux_allows_acquire_service)
2387         (bus_selinux_allows_send): Update prototypes 
2388
2389         * bus/services.c (bus_registry_acquire_service): Pass
2390         service name to bus_selinux_allows_acquire_service.
2391
2392         * bus/bus.c (bus_context_check_security_policy): Pass
2393         additional audit data.  Move assignment of dest
2394         to its own line.
2395
2396 2004-11-07  Colin Walters  <walters@verbum.org>
2397
2398         * dbus/dbus-transport-unix.c (do_authentication): Always
2399         initialize auth_completed.
2400         
2401 2004-11-07  Colin Walters  <walters@verbum.org>
2402
2403         * bus/bus.c (load_config): Break into three
2404         separate functions: process_config_first_time_only,
2405         process_config_every_time, and process_config_postinit.
2406         (process_config_every_time): Move call of
2407         bus_registry_set_service_context_table into
2408         process_config_postinit.
2409         (process_config_postinit): New function, does
2410         any processing that needs to happen late
2411         in initialization (and also on reload).
2412         (bus_context_new): Instead of calling load_config,
2413         open config parser here and call process_config_first_time_only
2414         and process_config_every_time directly.  Later, after
2415         we have forked but before changing UID,
2416         invoke bus_selinux_full_init, and then call
2417         process_config_postinit.
2418         (bus_context_reload_config): As in bus_context_new,
2419         load parse file inside here, and call process_config_every_time
2420         and process_config_postinit.
2421
2422         * bus/services.h, bus/services.c
2423         (bus_registry_set_service_context_table): Rename
2424         from bus_registry_set_sid_table.  Take string hash from config
2425         parser, and convert them here into SIDs.
2426
2427         * bus/config-parser.c (struct BusConfigParser): Have
2428         config parser only store a mapping of service->context
2429         string.
2430         (merge_service_context_hash): New function.
2431         (merge_included): Merge context string hashes instead
2432         of using bus_selinux_id_table_union.
2433         (bus_config_parser_new): Don't use bus_selinux_id_table_new;
2434         simply create a new string hash.
2435         (bus_config_parser_unref): Unref it.
2436         (start_selinux_child): Simply insert strings into hash,
2437         don't call bus_selinux_id_table_copy_over.
2438
2439         * bus/selinux.h, bus/selinux.c (bus_selinux_id_table_union)
2440         (bus_selinux_id_table_copy_over): Delete.
2441
2442 2004-11-03  Colin Walters  <walters@verbum.org>
2443
2444         * bus/selinux.c (bus_selinux_pre_init): Kill some unused
2445         variables.
2446         
2447 2004-11-03  Colin Walters  <walters@verbum.org>
2448
2449         * bus/test-main.c (test_pre_hook): Fix test logic,
2450         thanks Joerg Barfurth <Joerg.Barfurth@Sun.COM>.
2451
2452 2004-11-02  Colin Walters  <walters@redhat.com>
2453
2454         * bus/selinux.c (bus_selinux_init): Split into two functions,
2455         bus_selinux_pre_init and bus_selinux_post_init.
2456         (bus_selinux_pre_init): Just determine whether SELinux is
2457         enabled.
2458         (bus_selinux_post_init): Do everything else.
2459
2460         * bus/main.c (main): Call bus_selinux_pre_init before parsing
2461         config file, and bus_selinux_post_init after.  This ensures that
2462         we don't lose the policyreload notification thread that
2463         bus_selinux_init created before forking previously.
2464         
2465         * bus/test-main.c (test_pre_hook): Update for split.
2466
2467 2004-10-31  Owen Fraser-Green  <owen@discobabe.net>
2468
2469         Patch from Johan Fischer <linux@fischaz.com>
2470         
2471         * mono/doc/Makefile.am (install-data-local): Added directory
2472         install for DESTDIR
2473
2474 2004-10-29  Colin Walters  <walters@redhat.com>
2475
2476         * dbus/dbus-sysdeps.h (_dbus_become_daemon): Also take
2477         parameter for fd to write pid to.       
2478
2479         * dbus/dbus-sysdeps.c (_dbus_become_daemon): Implement it.
2480         
2481         * bus/bus.c (bus_context_new): Pass print_pid_fd
2482         to _dbus_become_daemon (bug #1720)
2483
2484 2004-10-29  Colin Walters  <walters@redhat.com>
2485
2486         Patch from Ed Catmur <ed@catmur.co.uk>
2487
2488         * mono/doc/Makefile.am (install-data-local): Handle
2489         DESTDIR.
2490
2491 2004-10-29  Colin Walters  <walters@redhat.com>
2492
2493         * bus/.cvsignore, qt/.cvsignore: Update.
2494
2495 2004-10-29  Colin Walters  <walters@redhat.com>
2496
2497         Patch from Kristof Vansant <de_lupus@pandora.be>
2498
2499         * configure.in: Detect Slackware.
2500         * bus/Makefile.am (SCRIPT_IN_FILES): Add rc.messagebus.in.
2501         * bus/rc.messagebus.in: New file.
2502
2503 2004-10-29  Colin Walters  <walters@redhat.com>
2504
2505         * tools/dbus-monitor.c (filter_func): Return
2506         DBUS_HANDLER_RESULT_HANDLED in filter function
2507         for now.  See:
2508         http://freedesktop.org/pipermail/dbus/2004-August/001433.html
2509
2510 2004-10-29  Colin Walters  <walters@redhat.com>
2511
2512         Patch from Matthew Rickard <mjricka@epoch.ncsc.mil>
2513
2514         * bus/services.c (bus_registry_acquire_service): 
2515         Correctly retrieve service name from DBusString
2516         for printing.
2517
2518 2004-10-29  Colin Walters  <walters@redhat.com>
2519
2520         * dbus/dbus-glib.h: Update documentation to not
2521         refer to internal APIs.
2522
2523 2004-10-27  Joe Shaw  <joeshaw@novell.com>
2524
2525         * mono/Arguments.cs (GetDBusTypeConstructor):
2526         type.UnderlyingSystemType will return "System.Byte" if you do it
2527         on "byte[]", which is not what we want.  So check the type.IsArray
2528         property and use System.Array instead.
2529
2530 2004-10-25  John (J5) Palmieri  <johnp@redhat.com>
2531
2532         * dbus/dbus-sysdeps.c (fill_user_info): On errors do not free
2533         the DBusUserInfo structure since this is passed into the function.
2534         This would cause a double free when the function that allocated
2535         the structure would try to free it when an error occured.
2536
2537         * (bus/session.conf.in, bus/Makefile.am, dbus/configure.in):
2538         use /usr/share/dbus-1/services instead of /usr/lib/dbus-1.0/services
2539         for service activation to avoid 32bit/64bit parallel install issues
2540
2541 2004-10-21  Colin Walters  <walters@verbum.org>
2542
2543         * AUTHORS: Fix my email address, the @gnu.org one
2544         has been bouncing for some time.  Also add J5.
2545         
2546 2004-10-21  Colin Walters  <walters@verbum.org>
2547
2548         * dbus/dbus-transport-unix.c (do_authentication): Return
2549         authentication status to callers.
2550         (unix_handle_watch): If we completed authentication this round,
2551         don't do another read.  Instead wait until the next iteration,
2552         after we've read any pending data in the auth buffer.
2553         (unix_do_iteration): Ditto.
2554         (unix_handle_watch): Updated for new do_authentication prototype.
2555
2556 2004-10-18  Colin Walters  <walters@verbum.org>
2557
2558         * bus/selinux.c (bus_selinux_enabled): Handle
2559         --disable-selinux case.
2560         
2561 2004-10-18  Colin Walters  <walters@verbum.org>
2562
2563         * bus/selinux.h: Add bus_selinux_enabled.
2564         
2565         * bus/selinux.c (bus_selinux_enabled): Implement it.
2566         
2567         * bus/config-parser.c (struct include): Add
2568         if_selinux_enabled member.
2569         (start_busconfig_child): Parse if_selinux_enabled
2570         attribute for include.
2571         (bus_config_parser_content): Handle it.
2572
2573         * bus/session.conf.in, bus/system.conf.in: Add
2574         inclusion of context mapping to default config files;
2575         conditional on SELinux being enabled.
2576         
2577         * doc/busconfig.dtd: Add to if_selinux_enabled to default DTD.
2578         
2579         * test/data/invalid-config-files/badselinux-1.conf, 
2580         test/data/invalid-config-files/badselinux-2.conf:
2581         Test files for bad syntax.
2582         
2583 2004-10-17  Colin Walters  <walters@verbum.org>
2584
2585         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug, check_guards)
2586         (dbus_malloc, dbus_malloc0, dbus_realloc): Fix up printf
2587         format specifier mismatches.
2588
2589 2004-10-07  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2590
2591         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): fix an incorrect
2592         format string.
2593
2594         * glib/dbus-dbus-gmain.c (dbus_g_bus_get): do not mangle NULL
2595         pointer (bug #1540, Leonardo Boiko).
2596
2597 2004-09-28  Jon Trowbridge  <trow@ximian.com>
2598
2599         * mono/BusDriver.cs: Changed BusDriver struct to remove
2600         the ServiceCreated and ServiceDeleted events and replace them
2601         with the new ServiceOwnerChanged event.
2602
2603         * mono/example/BusListener.cs: Added a new example program,
2604         which listens for and reports any ServiceOwnerChanged events
2605         on the bus driver.
2606
2607         * mono/example/Makefile.am (DESTDIR): Build changes for the
2608         new BusListener.cs example.
2609
2610 2004-09-27  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2611
2612         * bus/signals.c (bus_match_rule_parse): validate the components of
2613         match rules (bug #1439).
2614
2615         * dbus/dbus-bus.c (dbus_bus_add_match): add a missing OOM test.
2616
2617 2004-09-24  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2618
2619         * doc/dbus-specification.xml: document ServiceOwnerChanged
2620         signal.
2621         
2622         * bus/driver.c, bus/driver.h, bus/services.c: Use
2623         ServiceOwnerChanged signal instead of ServiceCreated and
2624         ServiceDeleted.
2625         
2626         * bus/dispatch.c: update testcase for the new signal.
2627
2628 2004-09-20  Jon Trowbridge  <trow@ximian.com>
2629
2630         Patch from Nat Friedman <nat@novell.com>
2631
2632         * mono/Makefile.am: A number of small build fixes to allow "make
2633         distcheck" to succeed.
2634
2635         * mono/example/Makefile.am: "make distcheck" fixes.
2636
2637         * mono/AssemblyInfo.cs.in: When signing the assembly, look for the
2638         key in @srcdir@.
2639
2640         * test/Makefile.am: "make distcheck" fixes.
2641
2642 2004-09-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2643
2644         * dbus/dbus-sysdeps.c (_dbus_user_at_console): fix memleak in OOM.
2645
2646         * doc/busconfig.dtd: update the DTD for the at_console attribute.
2647
2648         * bus/driver.c (bus_driver_handle_hello): correctly handle Hello
2649         messages after the first one (bug #1389).
2650         
2651         * bus/dispatch.c (check_double_hello_message): add a test case for
2652         the double hello message bug.
2653         (check_existent_service_activation): fix check of spawning error.
2654         
2655 2004-09-16  David Zeuthen  <david@fubar.dk>
2656
2657         * python/dbus_bindings.pyx.in: Add support for int64 and uint64
2658
2659 2004-09-12  David Zeuthen  <david@fubar.dk>
2660
2661         Patch from Kay Sievers <kay.sievers@vrfy.org>
2662
2663         * bus/bus.c (bus_context_new):
2664         * bus/bus.h:
2665         * bus/main.c (usage)
2666         (main):
2667         Add commandline option --nofork to override configuration file
2668         setting.
2669
2670 2004-09-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2671
2672         * dbus/dbus-*.h: remove the ; after DBUS_(BEGIN|END)_DECLS. Some C
2673         compilers don't like it (bug #974).
2674
2675 2004-09-04  Harald Fernengel  <harry@kdevelop.org>
2676
2677         * qt/connection.*: Applied patch by Jérôme Lodewyck
2678         <lodewyck@clipper.ens.fr> to integrate an existing
2679         connection into the Qt eventloop
2680
2681 2004-08-30  Jon Trowbridge  <trow@ximian.com>
2682
2683         * mono/BusDriver.cs: Added.  This is a class for interacting with
2684         the org.freedesktop.DBus service.
2685
2686         * mono/Message.cs: Added a mechanism to expose the message that is
2687         currently being dispatched via the static Message.Current
2688         property.  Added Message.Sender and Message.Destination
2689         properties.
2690
2691         * mono/Handler.cs: Expose the dispatched message via
2692         Message.Current when handling method calls.
2693
2694         * mono/Service.cs: Expose the dispatched message via
2695         Message.Current when handling signal emissions.
2696         
2697         * mono/Connection.cs: Bind dbus_bus_get_base_service via the
2698         Connection.BaseService property.
2699
2700 2004-08-28  Havoc Pennington  <hp@redhat.com>
2701
2702         * dbus/dbus-userdb.c (_dbus_is_console_user): remove unused variable
2703
2704         More fixes from Steve Grubb
2705         
2706         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix fd leak
2707         (_dbus_listen_tcp_socket): fix fd leak
2708
2709         * dbus/dbus-spawn.c (read_pid, read_ints): move the "again:" for
2710         EINTR to a bit lower in the code
2711
2712 2004-08-26  Jon Trowbridge  <trow@ximian.com>
2713
2714         * bus/driver.c (bus_driver_handle_service_exists): Respond with
2715         TRUE if we are inquiring about the existence of the built-in
2716         org.freedesktop.DBus service.
2717
2718 2004-08-25  John Palmieri  <johnp@redhat.com>
2719         * bus/config-parser.c:
2720         (struct PolicyType): Add POLICY_CONSOLE
2721         (struct Element.d.policy): s/gid_or_uid/gid_uid_or_at_console
2722         (start_busconfig_child): Sets up console element when
2723         <policy at_console=""> is encountered in a policy file
2724         (append_rule_from_element): Convert console elements to console
2725         rules.
2726
2727         * bus/policy.c: 
2728         (bus_policy_create_client_policy): Add console rules to the client
2729         policy based on if the client is at the console
2730         (bus_policy_append_console_rule): New function for adding a
2731         console rule to a policy
2732         (bus_policy_merge): Handle console rule merging
2733
2734         * dbus/dbus-sysdeps.h: Added the DBUS_CONSOLE_DIR constant
2735         where we check for console user files
2736         
2737         * dbus/dbus-sysdeps.c:
2738         (_dbus_file_exists): New function which checks if the given
2739         file exists
2740         (_dbus_user_at_console): New function which does the system
2741         specific process of checking if the user is at the console
2742
2743         * dbus/dbus-userdb.c:
2744         (_dbus_is_console_user): New function converts a UID to user name
2745         and then calls the system specific _dbus_user_at_console to 
2746         see if the user is at the console and therefor a console user
2747
2748 2004-08-25  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2749
2750         * bus/config-parser.c (set_limit):
2751         * bus/dbus-daemon-1.1.in:
2752         * test/data/valid-config-files/many-rules.conf: set the
2753         max_match_rules_per_connection limt from the config file. 
2754
2755         * doc/busconfig.dtd: update the DTD.
2756
2757         * bus/driver.c: remove some unused variables.
2758
2759 2004-08-24  Mikael Hallendal  <micke@imendio.com>
2760
2761         * dbus/dbus-glib-lowlevel.h: Removed dbus_bus_get_with_g_main since 
2762         it's been replaced by dbus_g_bus_get
2763
2764 2004-08-23  Colin Walters  <walters@redhat.com>
2765
2766         Updated SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
2767
2768         * bus/selinux.h: Prototype bus_selinux_get_policy_root.
2769
2770         * bus/selinux.c: Create a thread for policy reload notification.
2771         (bus_selinux_get_policy_root): Implement.
2772
2773         * bus/config-parser.c (start_busconfig_child)
2774         (bus_config_parser_content): Support SELinux-root relative
2775         inclusion.
2776
2777         * configure.in <HAVE_SELINUX>: Add -lpthread.
2778         
2779         * bus/test-main.c (test_pre_hook, test_post_hook): New.
2780         (test_post_hook): Move memory checking into here.
2781         (test_pre_hook, test_post_hook): Move SELinux checks in
2782         here, but conditional on a DBUS_TEST_SELINUX environment
2783         variable.  Unfortunately we can't run the SELinux checks
2784         as a normal user, since they won't have any permissions
2785         for /selinux.  So this will have to be tested manually
2786         for now, until we have virtualization for most of
2787         libselinux.
2788         
2789 2004-08-23  Havoc Pennington  <hp@redhat.com>
2790
2791         * dbus/dbus-sysdeps.c (_dbus_change_identity): add setgroups() to
2792         drop supplementary groups, suggested by Steve Grubb
2793
2794 2004-08-20  Colin Walters  <walters@redhat.com>
2795
2796         * bus/config-parser.c (start_busconfig_child): Remove some unused
2797         variables.
2798         
2799         * bus/selinux.c (bus_selinux_id_table_insert): Avoid compiler
2800         warning.
2801
2802 2004-08-17  Joe Shaw  <joeshaw@novell.com>
2803
2804         * configure.in: If --enable-mono is passed in, if we can't find
2805         mono error out.
2806
2807         * mono/Makefile.am: Use /gacutil to install assemblies into the
2808         GAC and not /root.
2809
2810 2004-08-12  Havoc Pennington  <hp@redhat.com>
2811
2812         * NEWS: update for 0.22
2813
2814         * configure.in: release 0.22
2815
2816 2004-08-11  Colin Walters  <walters@redhat.com>
2817
2818         * tools/dbus-send.c (main, usage): Add --reply-timeout
2819         argument.
2820
2821 2004-08-10  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2822
2823         * bus/bus.c (process_config_first_time_only): get rid of an unused
2824         DBusError that was causing a memoy leak (bug #989).
2825
2826         * dbus/dbus-keyring.c, dbus/dbus-message.c:
2827         fix compilation on Solaris/Forte C (bug #974)
2828
2829         * bus/main.c (main): plug two minuscule memleaks.
2830
2831 2004-08-10  Havoc Pennington  <hp@redhat.com>
2832
2833         * doc/dbus-tutorial.xml: add some more info on GLib bindings
2834
2835 2004-08-09  Havoc Pennington  <hp@redhat.com>
2836
2837         * COPYING: switch to Academic Free License version 2.1 instead of
2838         2.0, to resolve complaints about patent termination clause.
2839
2840 2004-07-31  John (J5) Palmieri  <johnp@redhat.com>
2841
2842         * README: added documentation for the --enable-python 
2843         configure switch.
2844
2845 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2846
2847         * bus/config-parser.c (bus_config_parser_new): fix an invalid
2848         _unref in the SELinux support.
2849
2850         * doc/busconfig.dtd: update DTD for SELinux support.
2851
2852         * bus/config-loader-libxml.c: fix error handler and parser
2853         initialisation/cleanup. OOM test now works with libxml2 HEAD.
2854
2855         * configure.in: remove the warning about libxml2.
2856
2857         * dbus/dbus-bus.c: silence doxygen warning.
2858
2859 2004-07-31  Colin Walters  <walters@redhat.com>
2860
2861         * configure.in: Move #error in SELinux check to its own line.
2862
2863 2004-07-31  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2864
2865         * dbus/dbus-internals.h (_DBUS_SET_OOM):
2866         * bus/utils.h (BUS_SET_OOM): use dbus_error_set_const instead of
2867         dbus_error_set.
2868
2869         * bus/dispatch.c (check_send_exit_to_service): fix the test case,
2870         broken by the change in the _SET_OOM macros.
2871
2872 2004-07-31  Colin Walters  <walters@redhat.com>
2873
2874         * bus/selinux.c <HAVE_SELINUX>: Include utils.h to get
2875         BUS_SET_OOM.
2876
2877 2004-07-31  Colin Walters  <walters@redhat.com>
2878
2879         * configure.in: Use AC_TRY_COMPILE instead of AC_EGREP_HEADER
2880         to correctly detect DBUS__ACQUIRE_SVC.  Also add an
2881         AC_MSG_CHECKING.
2882
2883 2004-07-24  Havoc Pennington  <hp@redhat.com>
2884
2885         SELinux support from Matthew Rickard <mjricka@epoch.ncsc.mil>
2886
2887         * bus/selinux.c, bus/selinux.h: new file encapsulating selinux
2888         functionality
2889
2890         * configure.in: add --enable-selinux
2891         
2892         * bus/policy.c (bus_policy_merge): add FIXME to a comment
2893
2894         * bus/main.c (main): initialize and shut down selinux
2895
2896         * bus/connection.c: store SELinux ID on each connection, to avoid 
2897         repeated getting of the string context and converting it into 
2898         an ID
2899
2900         * bus/bus.c (bus_context_get_policy): new accessor, though it
2901         isn't used
2902         (bus_context_check_security_policy): check whether the security
2903         context of sender connection can send to the security context of
2904         recipient connection
2905
2906         * bus/config-parser.c: add parsing for <selinux> and <associate>
2907         
2908         * dbus/dbus-transport.c (_dbus_transport_get_unix_fd): to
2909         implement dbus_connection_get_unix_fd()
2910
2911         * dbus/dbus-connection.c (dbus_connection_get_unix_fd): new
2912         function, used by the selinux stuff
2913         
2914 2004-07-29  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2915
2916         * bus/config-loader-libxml.c: complete the implementation of
2917         libxml backend for config file loader. Doesn't work with full OOM
2918         test yet. 
2919         
2920         * configure.in: change error when selecting libxml into a warning.
2921         
2922         * test/data/invalid-config-files: add two non-well-formed XML
2923         files. 
2924         
2925         * glib/Makefile.am: libdbus_gtool always uses expat, not libxml.
2926         
2927         * dbus/dbus-transport-unix.c (unix_handle_watch): do not
2928         disconnect in case of DBUS_WATCH_HANGUP, several do_reading() may
2929         be necessary to read all the buffer. (bug #894)
2930
2931         * bus/activation.c (bus_activation_activate_service): fix a
2932         potential assertion failure (bug #896). Small optimization in the
2933         case of auto-activation messages.
2934
2935         * dbus/dbus-message.c (verify_test_message, _dbus_message_test):
2936         add test case for byte-through-vararg bug (#901). patch by Kimmo
2937         Hämäläinen. 
2938
2939 2004-07-28  Anders Carlsson  <andersca@gnome.org>
2940
2941         * python/dbus.py:
2942         * python/dbus_bindings.pyx.in:
2943         Add dbus.init_gthreads (), allow emit_signal to pass
2944         arguments to the signal.
2945         
2946 2004-07-24  Havoc Pennington  <hp@redhat.com>
2947
2948         * AUTHORS: add some people, not really comprehensively, let me
2949         know if I missed you
2950
2951 2004-07-24  Havoc Pennington  <hp@redhat.com>
2952
2953         * Makefile.am (DIST_SUBDIRS): add DIST_SUBDIRS, problem solved by
2954         Owen
2955
2956         * test/Makefile.am (DIST_SUBDIRS): here also
2957
2958 2004-07-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
2959
2960         * dbus/dbus-sysdeps.c (fill_user_info): fix inexistent label name,
2961         breaking build on Solaris, reported by Farhad Saberi on the ML.
2962
2963         * dbus/dbus-message.c (dbus_message_append_args_valist): fix the
2964         va_arg invocation to account for integer promotion in the case of
2965         DBUS_TYPE_BYTE (unsigned char is promoted to int). (bug #901)
2966
2967         * bus/services.c (bus_service_remove_owner): fix bug #902, use
2968         _dbus_list_get_first_link, not _dbus_list_get_first.
2969
2970         * dbus/dbus-bus.c (dbus_bus_service_exists): plug a memory leak.
2971
2972         * dbus/dbus-object-tree.c (free_subtree_recurse): always null
2973         handler functions so that the asserts in _dbus_object_subtree_unref
2974         do not fail.
2975
2976         * dbus/dbus-transport-unix.c (do_reading):
2977         _dbus_transport_queue_messages return value is of type
2978         dbus_bool_t, not DBusDispatchStatus.
2979         
2980 2004-07-19  David Zeuthen  <david@fubar.dk>
2981
2982         * dbus/dbus-protocol.h: Add DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN
2983
2984         * bus/dispatch.c:
2985         (check_get_connection_unix_user): Debug says GetProperty; but the
2986         method is called GetConnectionUnixUser
2987         (check_get_connection_unix_process_id): New function
2988         (bus_dispatch_test): Actually call check_get_connection_unix_user();
2989         also call check_get_connection_unix_process_id()
2990         
2991         * bus/driver.c:
2992         (bus_driver_handle_get_connection_unix_process_id): New function,
2993         handles GetConnectionUnixProcessID on the org.freedesktop.DBus
2994         interface
2995         
2996         * dbus/dbus-auth.c:
2997         (handle_server_data_external_mech): Set pid from the credentials
2998         obtained from the socket
2999         
3000         * dbus/dbus-connection.c:
3001         (dbus_connection_get_unix_process_id): New function
3002         
3003         * dbus/dbus-connection.h: 
3004         Add prototype for dbus_connection_get_unix_process_id
3005         
3006         * dbus/dbus-transport.c:
3007         (_dbus_transport_get_unix_process_id): New function
3008         
3009         * dbus/dbus-transport.h:
3010         Add prototype for _dbus_transport_get_unix_process_id
3011         
3012 2004-07-19  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3013
3014         * dbus/dbus-message.c: Message counter fix, patch by Christian
3015         Hammond <chipx86@gnupdate.org>
3016
3017 2004-07-18  Seth Nickell  <seth@gnome.org>
3018
3019         * python/dbus.py:
3020         * python/dbus_bindings.pyx.in:
3021         * python/tests/test-client.py:
3022
3023         Add dbus.ByteArray and dbus_bindings.ByteArray
3024         types so that byte streams can be passed back.
3025
3026         Give jdahlin the heaps of credit that are so
3027         rightfully his.
3028         
3029 2004-07-12  Seth Nickell  <seth@gnome.org>
3030
3031         * python/dbus.py:
3032
3033         Add message argument to the default object_method_handler
3034         function.
3035         
3036         * python/dbus_bindings.pyx.in:
3037
3038         Automatically return NIL when passed an empty list
3039         (we can't pass back a list since lists are typed
3040         and we don't have any idea what type the the client
3041         intended the list to be... :-( )
3042         
3043 2004-07-10  Seth Nickell  <seth@gnome.org>
3044
3045         * python/examples/Makefile.am:
3046
3047         Fix distcheck breakage caused by new examples.
3048
3049 2004-07-10  Seth Nickell  <seth@gnome.org>
3050
3051         * python/dbus.py:
3052
3053         Add "message" argument to service-side dbus.Object
3054         methods. This will break existing services written
3055         using the python bindings, but will allow extraction
3056         of all the message information (e.g. who its from).
3057
3058         Add improved "object oriented" signal handling/emission.
3059         
3060         * python/examples/example-service.py:
3061
3062         Nix this example.
3063         
3064         * python/examples/example-signal-emitter.py:
3065         * python/examples/example-signal-recipient.py:
3066
3067         Two new examples that show how to emit and receive
3068         signals using the new APIs.
3069         
3070         * python/examples/example-signals.py:
3071         * python/examples/gconf-proxy-service.py:
3072         * python/examples/gconf-proxy-service2.py:
3073
3074         Add "message" argument to service methods.
3075
3076 2004-06-28  Kay Sievers <kay.sievers@vrfy.org>
3077
3078         * bus/driver.c (bus_driver_handle_get_connection_unix_user)
3079         * dbus/bus.c (dbus_bus_get_unix_user)
3080         * doc/dbus-specification.xml: implement GetConnectionUnixUser
3081         method of org.freedesktop.DBus interface.
3082
3083         * bus/dispatch.c: test case
3084
3085 2004-06-23  John (J5) Palmieri  <johnp@redhat.com>
3086
3087         * python/Makefile.am: switched include directory from glib/ to dbus/
3088         since dbus-glib.h moved
3089  
3090 2004-06-22  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3091
3092         * configure.in: prevent building the gcj stuff and libxml loader
3093         since they are broken.
3094
3095 2004-06-20  Havoc Pennington  <hp@redhat.com>
3096
3097         * dbus/dbus-glib-error-enum.h: autogenerate the GError enum 
3098         codes from the dbus error names
3099         
3100         * glib/dbus-glib.h: move to subdir dbus/ since it's included 
3101         as dbus/dbus-glib.h and that breakage is now visible due to 
3102         including dbus/dbus-glib.h in dbus-glib-lowlevel.h
3103         
3104         * glib/dbus-glib.h: s/gproxy/g_proxy/
3105
3106         * dbus/dbus-shared.h: new header to hold stuff shared with
3107         binding APIs
3108         
3109         * dbus/dbus-protocol.h (DBUS_ERROR_*): move errors here rather
3110         than dbus-errors.h
3111
3112         * glib/dbus-glib.h (dbus_set_g_error): move to
3113         dbus-glib-lowlevel.h
3114
3115         * glib/dbus-glib.h: remove dbus/dbus.h from here; change a bunch
3116         of stuff to enable this
3117
3118         * dbus/dbus-glib-lowlevel.h: put dbus/dbus.h here
3119
3120         * a bunch of other changes with the same basic "separate glib 
3121         bindings from dbus.h" theme
3122         
3123 2004-06-10  Owen Fraser-Green  <owen@discobabe.net>
3124
3125         * dbus-sharp.pc.in: Removed glib-sharp inclusion in Libs.
3126
3127         * python/examples/Makefile.am: Fixed typo in EXTRA_DIST.
3128
3129 2004-06-09  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3130
3131         * bus/driver.c, dbus/dbus-bus.c: use BOOLEAN instead of UINT32 for
3132         the reply value of the ServiceExists message.
3133
3134 2004-06-07  John (J5) Palmieri  <johnp@redhat.com>
3135
3136         * python/dbus_bindings.pyx.in: No longer need to parse path
3137         elements and pass them as arrays of strings.  The C API now
3138         accepts plain path strings.
3139         (_build_parsed_path): removed 
3140
3141 2004-06-07  Havoc Pennington  <hp@redhat.com>
3142
3143         * doc/TODO: remove auto-activation item since it's done; sort
3144         items by importance/milestone
3145
3146 2004-06-07  Havoc Pennington  <hp@redhat.com>
3147
3148         * dbus/dbus-message-builder.c (_dbus_message_data_load): append
3149         random signature when using REQUIRED_FIELDS (this hack won't work
3150         in the long term)
3151
3152         * dbus/dbus-message.c: change the signature to be a header field,
3153         instead of message->signature special-case string. Incremental
3154         step forward. Then we can fix up code to send the signature in the
3155         message, then fix up code to validate said signature, then fix up
3156         code to not put the typecodes inline, etc.
3157         (load_one_message): don't make up the signature after the fact
3158         (decode_header_data): require signature field for the known
3159         message types
3160
3161         * dbus/dbus-marshal.c (_dbus_marshal_string_len): new
3162
3163         * dbus/dbus-protocol.h: add DBUS_HEADER_FIELD_SIGNATURE
3164
3165 2004-06-07  Owen Fraser-Green  <owen@discobabe.net>
3166
3167         * mono/DBusType/ObjectPath.cs: Renamed PathName argument to Path
3168
3169         * mono/Handler.cs: Updated to follow new path argument for
3170         (un-)registering objects.
3171
3172         * mono/example/Makefile.am:
3173         * mono/Makefile.am:
3174         * configure.in: Bumped required version for mono and use new -pkg
3175         syntax for deps
3176
3177 2004-06-05  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3178
3179         * dbus/dbus-connection.h, dbus/dbus-connection.c: have object path
3180         registration functions take the path argument as char* instead of
3181         char**.
3182
3183         * dbus/dbus-marshal.h, dbus/dbus-marshal.c (_dbus_decompose_path):
3184         split off the path decompostion part of
3185         _dbus_demarshal_object_path. Some misc. fixes to silence compiler
3186         warnings. 
3187
3188         * glib/dbus-gobject.c, test/test-service.c: update accordingly.
3189         
3190 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
3191  
3192         * dbus/dbus-auth.c: Rewrite auth protocol handling to use a state
3193         machine approach.  A state is implemented as a function that
3194         handles incoming events as specified for that state.
3195         
3196         * doc/dbus-specification.xml: Update auth protocol state machine
3197         specification to match implementation.  Remove some leftover
3198         base64 examples.
3199
3200 2004-06-02  Kristian Høgsberg  <krh@redhat.com>
3201
3202         * glib/dbus-gproxy.c, glib/dbus-gmain.c, dbus/dbus-string.c,
3203         dbus/dbus-object-tree.c, dbus/dbus-message.c: add comments to
3204         quiet doxygen.
3205
3206         * Doxyfile.in: remove deprecated options.
3207
3208         * dbus/dbus-message-handler.c, dbus/dbus-message-handler.h,
3209         glib/test-thread.h, glib/test-thread-client.c,
3210         glib/test-thread-server.c, glib/test-profile.c,
3211         glib/test-dbus-glib.c: remove these unused files.
3212
3213 2004-06-01  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3214
3215         * dbus/dbus-object-tree.c
3216         (_dbus_object_tree_dispatch_and_unlock): fix dispatch for
3217         non-fallback handlers (bug #684).
3218         (_dbus_object_subtree_new): initialize invoke_as_fallback field.
3219         (find_subtree_recurse): report wether the returned subtree is an
3220         exact match or a "fallback" match higher up in the tree.
3221         (object_tree_test_iteration): update test case.
3222
3223 2004-06-01  Seth Nickell  <seth@gnome.org>
3224
3225         * python/dbus_bindings.pyx.in:
3226         * python/tests/test-client.py:
3227
3228         Round off basic type support. Add dicts (yay!), and 
3229         remaining array types.
3230
3231         Make MessageIter more general so it works for dicts too.
3232
3233         Mark all loop variables as C integers.
3234         
3235 2004-05-31  Havoc Pennington  <hp@redhat.com>
3236
3237         * glib/dbus-gidl.c (method_info_add_arg): keep args sorted with
3238         "in" before "out"
3239
3240         * glib/dbus-gobject.c (dbus_type_to_string): move to dbus-gutils.c
3241
3242         * glib/dbus-glib-tool.c (main): set up to have a --self-test
3243         option that runs the tests, and start filling in some code
3244         including for starters just dumping the interfaces to stdout
3245
3246         * glib/Makefile.am (INCLUDES): define DBUS_LOCALEDIR
3247
3248         * test/data/valid-introspection-files/lots-of-types.xml: test of
3249         an example introspection file
3250
3251         * glib/dbus-gparser.c (parser_check_doctype): doctype should be
3252         "node" (I think...)
3253
3254 2004-05-31  Seth Nickell  <seth@gnome.org>
3255
3256         * python/dbus_bindings.pyx.in:
3257         * python/tests/test-client.py:
3258
3259         Test Suite: 1
3260         Python Bindings: 0
3261
3262         Fix string array memory trashing bug... oops...
3263
3264 2004-05-30  Seth Nickell  <seth@gnome.org>
3265
3266         * python/dbus.py:
3267
3268         Add a nicer-but-less-flexible alternate API for handling 
3269         calls to virtual objects in dbus.ObjectTree.
3270
3271         Screw up the argument order to the dbus.Object constructor
3272         for consistency with dbus.ObjectTree (and to make dbus_methods
3273         optional for future extension)
3274         
3275         * python/examples/Makefile.am:
3276         * python/examples/gconf-proxy-service.py:
3277         * python/examples/gconf-proxy-service2.py:
3278
3279         Alternate implementation of gconf-proxy-service using the
3280         nicer dbus.ObjectTree API.
3281         
3282         * python/examples/example-service.py:
3283         * python/tests/test-server.py
3284
3285         Reverse the argument order to deal with dbus.Object constructor
3286         changes.
3287         
3288 2004-05-30  Seth Nickell  <seth@gnome.org>
3289
3290         * python/examples/example-client.py:
3291         * python/examples/example-service.py:
3292
3293         Take it back. Lists seem to work but they're broken
3294         in the test suite. Make the base examples use
3295         lists (works fine).
3296
3297 2004-05-30  Seth Nickell  <seth@gnome.org>
3298
3299         * python/dbus_bindings.pyx.in:
3300         * python/tests/test-client.py:
3301
3302         Add some more tests and fix errors that crop up.
3303         Unfortunately, currently it seems like marshalling
3304         and unmarshalling of lists is completely broken :-(
3305
3306 2004-05-30  Seth Nickell  <seth@gnome.org>
3307
3308         * python/dbus_bindings.pyx.in:
3309
3310         Add support for ObjectPath type.
3311
3312         * python/dbus.py:
3313
3314         Refactor message handling code to a common function.
3315         
3316         * python/tests/test-client.py:
3317         * python/tests/test-server.py:
3318
3319         Add tests that check to make sure values of all types
3320         can be echoed from a service w/o mangling.
3321         
3322 2004-05-29  Seth Nickell  <seth@gnome.org>
3323
3324         * python/dbus.py:
3325
3326         Add ObjectTree class which allows implementation
3327         of trees of "virtual" objects. Basically the python
3328         wrapper for "register_fallback".
3329         
3330         * python/examples/Makefile.am
3331         * python/examples/gconf-proxy-client.py:
3332         * python/examples/gconf-proxy-service.py:
3333
3334         Implement a simple GConf proxy service that supports
3335         get/set on string and int GConf keys using the ObjectTree.
3336         
3337 2004-05-29  Seth Nickell  <seth@gnome.org>
3338
3339         * python/dbus.py:
3340         * python/examples/example-client.py:
3341         * python/examples/example-service.py:
3342         * python/examples/list-system-services.py:
3343
3344         Add SessionBus, SystemBus and ActivationBus classes
3345         so you don't need to know the special little BUS_TYPE
3346         flag.
3347         
3348 2004-05-29  Havoc Pennington  <hp@redhat.com>
3349
3350         * bus/config-parser.c (process_test_valid_subdir): temporarily
3351         stop testing config parser OOM handling, since expat has issues
3352         http://freedesktop.org/pipermail/dbus/2004-May/001153.html
3353
3354         * bus/dbus-daemon-1.1.in: change requested_reply to
3355         send_requested_reply/receive_requested_reply so we can send the
3356         replies, not just receive them.
3357
3358         * bus/config-parser.c: parse the new
3359         send_requested_reply/receive_requested_reply
3360
3361         * bus/policy.c (bus_client_policy_check_can_send): add
3362         requested_reply argument and use it
3363
3364         * bus/bus.c (bus_context_check_security_policy): pass through
3365         requested_reply status to message send check
3366
3367         * bus/system.conf.in: adapt to requested_reply change
3368         
3369 2004-05-28  Havoc Pennington  <hp@redhat.com>
3370
3371         * test/glib/test-service-glib.c (main): remove unused variable
3372
3373         * glib/dbus-gidl.c (base_info_ref): fix a silly compiler warning
3374
3375         * dbus/dbus-auth.h (enum): remove AUTHENTICATED_WITH_UNUSED_BYTES
3376         from the enum, no longer in use.
3377
3378         * dbus/dbus-sysdeps.h: include config.h so DBUS_VA_COPY actually
3379         works right.
3380
3381         * dbus/dbus-message.c: add various _dbus_return_val_if_fail for
3382         whether error_name passed in is a valid error name.
3383
3384 2004-05-28  John (J5) Palmieri  <johnp@redhat.com>
3385
3386         * dbus/dbus-message.c (dbus_message_get_args): Added support for
3387         OBJECT_PATH and OBJECT_PATH_ARRAY
3388
3389 2004-05-28  Seth Nickell  <seth@gnome.org>
3390
3391         * python/examples/Makefile.am:
3392
3393         Forget to add Makefile.am. Do not pass go.
3394
3395 2004-05-28  Michael Meeks  <michael@ximian.com>
3396
3397         * glib/dbus-gvalue.c (dbus_gvalue_marshal, dbus_gvalue_demarshal): 
3398         fix no int64 case.
3399
3400         * dbus/dbus-string.c (_dbus_string_parse_basic_type): impl.
3401
3402         * dbus/dbus-message.c (_dbus_message_iter_get_basic_type),
3403         (_dbus_message_iter_get_basic_type_array): impl.
3404         drastically simplify ~all relevant _get methods to use these.
3405         (_dbus_message_iter_append_basic_array),
3406         (dbus_message_iter_append_basic): impl
3407         drastically simplify ~all relevant _append methods to use these.
3408
3409         * dbus/dbus-message-builder.c (parse_basic_type) 
3410         (parse_basic_array, lookup_basic_type): impl.
3411         (_dbus_message_data_load): prune scads of duplicate /
3412         cut & paste coding.
3413
3414         * dbus/dbus-marshal.c (_dbus_demarshal_basic_type_array) 
3415         (_dbus_demarshal_basic_type): implement,
3416         (demarshal_and_validate_len/arg): beef up debug.
3417         (_dbus_marshal_basic_type, _dbus_marshal_basic_type_array): impl.
3418
3419 2004-05-27  Seth Nickell  <seth@gnome.org>
3420
3421         * configure.in:
3422         * python/Makefile.am:
3423
3424         Include the example python apps in the tarball.
3425         
3426         * python/examples/list-system-services.py
3427
3428         Add a python new example that fetches the list of services
3429         from the system bus.
3430         
3431 2004-05-27  Seth Nickell  <seth@gnome.org>
3432
3433         * python/dbus.py:
3434         * python/dbus_bindings.pyx.in:
3435
3436         Fix failure to notify that a signal was not handled,
3437         resulted in hung functions.
3438         
3439 2004-05-25  Colin Walters  <walters@redhat.com>
3440
3441         * tools/dbus-monitor.c (main): Monitor all types of messages.
3442
3443 2004-05-23  Owen Fraser-Green  <owen@discobabe.net>
3444
3445         * mono/Handler.cs, mono/Service.cs: Added UnregisterObject method
3446         which unregisters the object path and disposes the handler.
3447
3448 2004-05-23  Kristian Høgsberg  <krh@redhat.com>
3449  
3450         Patch from Timo Teräs <ext-timo.teras@nokia.com> (#614):
3451          
3452         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): Swap
3453         operands to && so we call dbus_message_iter_next () for the last
3454         argument also.
3455
3456 2004-05-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3457
3458         * dbus/dbus-object-tree.c
3459         (_dbus_object_tree_list_registered_unlock, lookup_subtree): return
3460         children even if the requested path isn't registered.
3461         (object_tree_test_iteration): test object_tree_list_registered.
3462
3463         * configure.in: undefine HAVE_ABSTRACT_SOCKETS instead of defining
3464         it to 0.
3465         
3466 2004-05-20  Kristian Høgsberg  <krh@redhat.com>
3467
3468         * doc/TODO: Remove resolved items.
3469
3470         * bus/expirelist.h (struct BusExpireList): remove unused n_items
3471         field.
3472         
3473         * bus/connection.c (bus_connections_expect_reply): Enforce the
3474         per-connection limit on pending replies.
3475         
3476         Patch from Jon Trowbridge <trow@ximian.com>:
3477  
3478         * bus/main.c (setup_reload_pipe): Added.  Creates a pipe and sets
3479         up a watch that triggers a config reload when one end of the pipe
3480         becomes readable.
3481         (signal_handler): Instead of doing the config reload in our SIGHUP
3482         handler, just write to the reload pipe and let the associated
3483         watch handle the reload when control returns to the main loop.
3484  
3485         * bus/driver.c (bus_driver_handle_reload_config): Added.
3486         Implements a ReloadConfig method for requesting a configuration
3487         file reload via the bus driver.
3488  
3489 2004-05-19  Owen Fraser-Green  <owen@discobabe.net>
3490
3491         * HACKING: Updated release instructions concerning the wiki page.
3492
3493 2004-05-18  Kristian Høgsberg  <krh@redhat.com>
3494
3495         * dbus/dbus-auth.c (client_try_next_mechanism): Remove logic to
3496         filter against auth->allowed_mechs; we only add allowed mechs in
3497         record_mechanisms().
3498  
3499         * dbus/dbus-auth-script.c (_dbus_auth_script_run): Add an
3500         ALLOWED_MECHS to auth-script format so we can set the list of
3501         allowed mechanisms.
3502  
3503         * data/auth/client-out-of-mechanisms.auth-script: New test to
3504         check client disconnects when it is out of mechanisms to try.
3505  
3506         * dbus/dbus-auth.c (process_command): Remove check for lines
3507         longer that 1 MB; we only buffer up maximum 16 kB.
3508  
3509         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
3510         dbus/dbus-auth-script.c, dbus/dbus-auth.c, dbus/dbus-auth.h:
3511         Remove auth state AUTHENTICATED_WITH_UNUSED_BYTES, instead always
3512         assume there might be unused bytes.
3513  
3514         * dbus/dbus-auth.c (_dbus_auth_do_work): Remove check for
3515         client-out-of-mechs, it is handled in process_reject(). Move check
3516         for max failures to send_rejected(), as it's a server-only thing.
3517
3518         * dbus/dbus-auth.c: Factor out protocol reply code into functions
3519         send_auth(), send_data(), send_rejected(), send_error(),
3520         send_ok(), send_begin() and send_cancel().
3521
3522 2004-05-17  Kristian Høgsberg  <krh@redhat.com>
3523
3524         Remove base64 encoding, replace with hex encoding. Original patch
3525         from trow@ximian.com, added error handling.
3526
3527         * dbus/dbus-string.c (_dbus_string_base64_encode)
3528         (_dbus_string_base64_decode): Remove.
3529         (_dbus_string_hex_decode): Add end_return argument so we can
3530         distinguish between OOM and invalid hex encoding.
3531         (_dbus_string_test): Remove base64 tests and add test case for
3532         invalid hex.
3533
3534         * dbus/dbus-keyring.c, dbus/dbus-auth-script.c, dbus/dbus-auth.c:
3535         Replace base64 with hex.
3536
3537         * test/data/auth/invalid-hex-encoding.auth-script: New test case
3538         for invalid hex encoded data in auth protocol.
3539
3540 2004-05-17  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3541
3542         * dbus/dbus-connection.c (check_for_reply_unlocked): plug a memory
3543         leak.
3544
3545 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
3546
3547         * mono/dbus-sharp.dll.config.in: Added for GAC
3548         * mono/dbus-sharp.snk: Added for GAC
3549         * mono/Assembly.cs.in: Added for GAC
3550         * mono/Makefile.am: Changes for GAC installation        
3551         * configure.in: Added refs for dbus-sharp.dll.config.in and
3552         Assembly.cs.in. More fixes for mono testing
3553         * mono/example/Makefile.am: Changed var to CSC
3554         * Makefile.am: Changed flag name to DBUS_USE_CSC
3555
3556 2004-05-15  Owen Fraser-Green  <owen@discobabe.net>
3557
3558         * mono/Makefile.am: Added SUBDIRS for docs. Changed SUBDIRS order
3559         * mono/doc/*: Added documentation framework
3560         * configure.in: Added monodoc check
3561         * README: Added description of mono configure flags
3562
3563 2004-05-11  John (J5) Palmieri  <johnp@redhat.com>:
3564
3565         * doc/dbus-specification.xml: Added a "Required" column to the 
3566         header fields table and changed the "zero or more" verbage in
3567         the above paragraph to read "The header must contain the required 
3568         named header fields and zero or more of the optional named header 
3569         fields".
3570         * test/data/invalid-messages/*.message: Added the required PATH 
3571         named header field to the tests so that they don't fail on 
3572         'Missing path field'
3573
3574 2004-05-07  John (J5) Palmieri  <johnp@redhat.com>
3575
3576         * python/dbus-bindings.pyx.in: Stopped the bindings from trashing
3577         the stack by implicitly defining variable and parameter types and
3578         removing the hack of defining C pointers as python objects and later
3579         casting them.
3580
3581 2004-05-02  Owen Fraser-Green  <owen@discobabe.net>
3582
3583         * mono/Makefile.am: Removed test-dbus-sharp.exe from all target
3584
3585 2004-05-01  Owen Fraser-Green  <owen@discobabe.net>
3586
3587         * mono/DBusType/Dict.cs: Handle empty dicts
3588         * mono/DBusType/Array.cs: Handle empty arrays
3589         * mono/Arguments.cs: Handle empty arguments
3590
3591 2004-04-30  Owen Fraser-Green  <owen@discobabe.net>
3592
3593         * dbus-sharp.pc.in: Modified to include include Libs and Requires
3594         field
3595
3596 2004-04-25  Kristian Høgsberg  <krh@redhat.com>
3597
3598         * test/data/valid-messages/standard-*.message: Update message
3599         test scripts to new header field names.
3600
3601 2004-04-22  John (J5) Palmieri  <johnp@redhat.com>
3602
3603         * test/break-loader.c (randomly_do_n_things): tracked down buffer
3604         overflow to times_we_did_each_thing array which would chop off the
3605         first character of the failure_dir string. Increased the size of
3606         the array to 7 to reflect the number of random mutation functions
3607         we have.
3608
3609 2004-04-21  Kristian Høgsberg  <krh@redhat.com>
3610
3611         * dbus/dbus-server-unix.c (unix_finalize): Don't unref
3612         unix_server->watch here, it is unreffed in disconnect.
3613         (_dbus_server_new_for_tcp_socket): convert NULL host to
3614         "localhost" here so we don't append NULL to address.
3615         
3616         * dbus/dbus-server.c (_dbus_server_test): Add test case for
3617         various addresses, including tcp with no explicit host.
3618
3619 2004-04-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3620
3621         * dbus/dbus-message.c (decode_header_data, decode_string_field):
3622         fix incorrect setting of .name_offset in the HeaderField (it was
3623         off by two bytes, positioned right after the name and typecode)
3624
3625         * bus/bus.c (bus_context_new, bus_context_unref): test before
3626         calling dbus_server_free_data_slot and _dbus_user_database_unref
3627         in case of an error.
3628
3629         * tools/Makefile.am: add $(DBUS_GLIB_TOOL_LIBS), xml libs needed
3630         by libdbus-gtool.
3631
3632 2004-04-19  Kristian Høgsberg  <krh@redhat.com>
3633
3634         * dbus/dbus-transport-unix.c (unix_do_iteration): Rewrite to use
3635         _dbus_poll() instead of select().
3636
3637 2004-04-15  Jon Trowbridge  <trow@ximian.com>
3638
3639         * bus/main.c (signal_handler): Reload the configuration files
3640         on SIGHUP.
3641         (main): Set up our SIGHUP handler.
3642
3643         * bus/bus.c (struct BusContext): Store the config file, user and
3644         fork flag in the BusContext.
3645         (process_config_first_time_only): Added.  Contains the code
3646         (previously in bus_context_new) for setting up the BusContext from
3647         the BusConfigParser that should only be run the first time the
3648         config files are read.
3649         (process_config_every_time): Added.  Contains the code (previously
3650         in bus_context_new) for setting up the BusContext from the
3651         BusConfigParser that should be run every time the config files are
3652         read.
3653         (load_config): Added.  Builds a BusConfigParser from the config
3654         files and passes the resulting structure off to
3655         process_config_first_time_only (assuming this is the first time)
3656         and process_config_every_time.
3657         (bus_context_new): All of the config-related code has been moved
3658         to process_config_first_time_only and process_config_every_time.
3659         Now this function just does the non-config-related initializations
3660         and calls load_config.
3661         (bus_context_reload_config): Added.
3662
3663 2004-04-15  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3664
3665         * bus/driver.c (bus_driver_handle_get_service_owner):
3666         implement a GetServiceOwner method.
3667         * doc/dbus-specification.xml: document it.
3668         * dbus/dbus-errors.h: add a 'ServiceHasNoOwner' error.
3669         
3670         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service_owner):
3671         implement, using the bus GetServiceOwner method.
3672
3673         * test/glib/test-dbus-glib.c:
3674         use dbus_gproxy_new_for_service_owner so that we can receive the
3675         signal. 
3676
3677 2004-04-15  John (J5) Palmieri  <johnp@redhat.com>
3678
3679         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
3680         dbus/dbus-message.c, dbus/dbus-protocol.h
3681         (DBUS_HEADER_FIELD_SERVICE): renamed DBUS_HEADER_FIELD_DESTINATION
3682
3683         * dbus/dbus-internals.c, dbus/dbus-message-builder.c,
3684         dbus/dbus-message.c, dbus/dbus-protocol.h
3685         (DBUS_HEADER_FIELD_SENDER_SERVICE): renamed DBUS_HEADER_FIELD_SENDER
3686
3687         * dbus/dbus-internals.c (_dbus_header_field_to_string):
3688         DBUS_HEADER_FIELD_DESTINATION resolves to "destination"
3689         DBUS_HEADER_FIELD_SENDER resolves to "sender"
3690
3691         * doc/dbus-specification.xml (Header Fields Table):
3692         s/SERVICE/DESTINATION
3693         s/SENDER_SERVICE/SENDER
3694
3695
3696 2004-04-14  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3697
3698         * test/glib/test-dbus-glib.c (timed_exit): fail the test after
3699         a few seconds.
3700
3701 2004-04-13  Michael Meeks  <michael@ximian.com>
3702
3703         * glib/dbus-gobject.c (handle_introspect): split out
3704         (introspect_properties): this.
3705         (handle_introspect): implement this.
3706
3707         * test/glib/Makefile.am: use the absolute path so the bus
3708         daemon's chdir ("/") doesn't kill us dead.
3709
3710         * configure.in: subst ABSOLUTE_TOP_BUILDDIR
3711
3712 2004-04-12  Jon Trowbridge  <trow@ximian.com>
3713
3714         * bus/config-parser.c (struct BusConfigParser): Added
3715         included_files field.
3716         (seen_include): Added.  Checks whether or not a file has already
3717         been included by any parent BusConfigParser.
3718         (bus_config_parser_new): Copy the parent's included_files.
3719         (include_file): Track which files have been included, and fail on
3720         circular inclusions.
3721         (process_test_valid_subdir): Changed printf to report if we are
3722         testing valid or invalid conf files.
3723         (all_are_equiv): Changed printf to be a bit clearer about
3724         what we are actually doing.
3725         (bus_config_parser_test): Test invalid configuration files.
3726
3727 2004-04-09  Jon Trowbridge  <trow@ximian.com>
3728
3729         * bus/config-parser.c (bus_config_parser_new): Added a 'parent'
3730         argument.  If non-null, the newly-constructed BusConfigParser will
3731         be initialized with the parent's BusLimits instead of the default
3732         values.
3733         (include_file): When including a config file, pass in
3734         the current parser as the parent and then copy the BusLimits
3735         from the included BusConfigParser pack to the current parser.
3736         (process_test_valid_subdir): Renamed from process_test_subdir.
3737         (process_test_equiv_subdir): Added.  Walks through a directory,
3738         descending into each subdirectory and loading the config files
3739         it finds there.  If any subdirectory contains two config files
3740         that don't produce identical BusConfigParser structs, fail.
3741         For now, the BusConfigParser's BusPolicies are not compared.
3742         (bus_config_parser_test): Call both process_test_valid_subdir and
3743         process_test_equiv_subdir.
3744
3745         * bus/config-loader-libxml.c (bus_config_load): Take a parent
3746         argument and pass it along to the call to bus_config_parser_new.
3747         Also made a few small changes to allow this code to compile.
3748
3749         * bus/config-loader-expat.c (bus_config_load): Take a parent
3750         argument and pass it along to the call to bus_config_parser_new.
3751
3752         * bus/bus.c (bus_context_new): Load the config file
3753         with a NULL parent argument.
3754
3755 2004-03-29  Michael Meeks  <michael@ximian.com>
3756
3757         * glib/dbus-gobject.c (introspect_properties): split
3758         out, fix mangled 'while' flow control.
3759         (introspect_signals): implement.
3760         (handle_introspect): update.
3761
3762 2004-03-29  Michael Meeks  <michael@ximian.com>
3763
3764         * glib/dbus-gobject.c (set_object_property): split out / 
3765         re-work, use the property type, and not the message type(!)
3766         (get_object_property): ditto.
3767
3768         * glib/dbus-gvalue.c (dbus_gvalue_demarshal),
3769         (dbus_gvalue_marshal): make this code re-usable, needed
3770         for signals too, also on both proxy and server side.
3771         Re-write for more efficiency / readability.
3772
3773 2004-03-29  Michael Meeks  <michael@ximian.com>
3774
3775         * dbus/dbus-message.c
3776         (dbus_message_new_error_printf): impl.
3777
3778         * dbus/dbus-connection.c
3779         (dbus_connection_unregister_object_path): fix warning.
3780
3781         * configure.in: fix no-mono-installed situation.
3782
3783 2004-03-27  Havoc Pennington  <hp@redhat.com>
3784
3785         Patch from Timo Teräs:
3786         
3787         * tools/dbus-send.c (main): if --print-reply, assume type is
3788         method call; support boolean type args
3789         
3790         * dbus/dbus-connection.c (dbus_connection_send_with_reply): fix a
3791         bunch of memleak and logic bugs
3792         
3793 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
3794
3795         * mono/Arguments.cs:
3796         * mono/Introspector.cs:
3797         * mono/Handler.cs:
3798         * mono/InterfaceProxy.cs:
3799         * mono/Message.cs
3800         * mono/ProxyBuilder.cs:
3801         * mono/Service.cs:
3802         Added InterfaceProxy class to avoid building proxies for every
3803         object.
3804
3805         * dbus-message.h:
3806         * dbus-message.c (dbus_message_append_args_valist)
3807         (dbus_message_iter_get_object_path)
3808         (dbus_message_iter_get_object_path_array)
3809         (dbus_message_iter_append_object_path)
3810         (dbus_message_iter_append_object_path_array):
3811         Added object_path iter functions to handle OBJECT_PATH arguments
3812         
3813 2004-03-23  Owen Fraser-Green  <owen@discobabe.net>
3814
3815         First checkin of mono bindings.
3816         * configure.in:
3817         * Makefile.am:
3818         Build stuff for the bindings
3819         * dbus-sharp.pc.in: Added for pkgconfig
3820         
3821 2004-03-21  Havoc Pennington  <hp@redhat.com>
3822
3823         * test/test-service.c (main): remove debug spew
3824
3825 2004-03-21  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3826
3827         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): accept empty
3828         arrays
3829
3830         * dbus/dbus-message.h, bus/dbus-message.c (dbus_message_iter_init)
3831         (dbus_message_iter_init_array_iterator)
3832         (dbus_message_iter_init_dict_iterator): return a dbus_bool_t to
3833         indicate whether the iterator is empty
3834
3835         * dbus/dbus-pending-call.c, dbus/dbus-server.c: silence compiler
3836         warnings
3837
3838 2004-03-19  Havoc Pennington  <hp@redhat.com>
3839
3840         * NEWS: 0.21 updates
3841
3842         * configure.in: 0.21
3843
3844         * doc/Makefile.am: add all XMLTO usage to DBUS_XML_DOCS_ENABLED
3845         
3846         * python/Makefile.am: change to avoid dist of dbus_bindings.c so
3847         you don't need pyrex to make dist
3848
3849         * qt/Makefile.am (libdbus_qt_1_la_SOURCES): add integrator.h to
3850         sources; run moc
3851         
3852 2004-03-18  Richard Hult  <richard@imendio.com>
3853
3854         * dbus/dbus-message.c (dbus_message_get_auto_activation) 
3855         (dbus_message_set_auto_activation): Add doxygen docs.
3856
3857 2004-03-16  Richard Hult  <richard@imendio.com>
3858
3859         * bus/activation.c: (bus_activation_service_created),
3860         (bus_activation_send_pending_auto_activation_messages),
3861         (bus_activation_activate_service):
3862         * bus/activation.h:
3863         * bus/dispatch.c: (bus_dispatch),
3864         (check_nonexistent_service_auto_activation),
3865         (check_service_auto_activated),
3866         (check_segfault_service_auto_activation),
3867         (check_existent_service_auto_activation), (bus_dispatch_test):
3868         * bus/driver.c: (bus_driver_handle_activate_service):
3869         * bus/services.c: (bus_registry_acquire_service):
3870         * dbus/dbus-message.c: (dbus_message_set_auto_activation),
3871         (dbus_message_get_auto_activation):
3872         * dbus/dbus-message.h:
3873         * dbus/dbus-protocol.h: Implement auto-activation.
3874         
3875         * doc/dbus-specification.xml: Add auto-activation to the spec.
3876
3877 2004-03-12  Olivier Andrieu  <oliv__a@users.sourceforge.net>
3878
3879         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos):
3880         fix a bug with CUSTOM types.
3881
3882         * dbus/dbus-message.c (message_iter_test, _dbus_message_test): add
3883         a unit test for this bug (used to fail).
3884
3885 2004-03-12  Mikael Hallendal  <micke@imendio.com>
3886
3887         * bus/activation.c:
3888         (babysitter_watch_callback): notify all pending activations waiting for
3889           the same exec that the activation failed.
3890         (bus_activation_activate_service): shortcut the activation if we 
3891           already waiting for the same executable to start up.
3892
3893 2004-03-12  Mikael Hallendal  <micke@imendio.com>
3894
3895         * bus/activation.c: 
3896         - Added service file reloading. 
3897           Each service files directory is kept in an hash table in 
3898           BusActivation and each BusActivationEntry knows what .service-file it
3899           was read from. So when you try to activate a service the bus will 
3900           check if it's been updated, removed or if new .service-files has 
3901           been installed.
3902         - Test code at the bottom for the service file reloading.
3903         * bus/test-main.c: (main):
3904         * bus/test.h:
3905         - added service reloading test.
3906         * dbus/dbus-sysdeps.c: 
3907         * dbus/dbus-sysdeps.h: (_dbus_delete_directory): Added.
3908
3909 2004-03-08  Michael Meeks  <michael@ximian.com>
3910
3911         * dbus/dbus-connection.c (_dbus_connection_block_for_reply): 
3912         bail immediately if disconnected, to avoid busy loop.
3913
3914         * dbus/dbus-message.c (dbus_message_iter_get_args_valist):
3915         cleanup cut/paste/inefficiency.
3916
3917 2004-03-01  David Zeuthen  <david@fubar.dk>
3918
3919         * dbus/dbus-string.c (_dbus_string_append_printf_valist): Fix a
3920         bug where args were used twice. This bug resulted in a segfault
3921         on a Debian/PPC system when starting the messagebus daemon. Include
3922         dbus-sysdeps.h for DBUS_VA_COPY
3923
3924         * dbus/dbus-sysdeps.h: Define DBUS_VA_COPY if neccessary. From GLib
3925
3926         * configure.in: Check for va_copy; define DBUS_VA_COPY to the
3927         appropriate va_copy implementation. From GLib
3928         
3929 2004-02-24  Joe Shaw  <joe@ximian.com>
3930
3931         * bus/services.c (bus_registry_acquire_service): We need to pass
3932         in the service name to dbus_set_error() to prevent a crash.
3933
3934 2003-12-26  Anders Carlsson  <andersca@gnome.org>
3935
3936         * AUTHORS: Reveal my True identity.
3937
3938 2003-12-17  Mikael Hallendal  <micke@imendio.com>
3939
3940         * dbus/dbus-message.c: (dbus_message_append_args_valist): 
3941         - Added case for DBUS_TYPE_BYTE, patch from Johan Hedberg.
3942
3943 2003-12-13  Mikael Hallendal  <micke@imendio.com>
3944
3945         * doc/TODO: Added not about better error check of configuration files.
3946
3947 2003-12-02  Richard Hult  <richard@imendio.com>
3948
3949         * Update AFL version to 2.0 throughout the source files to reflect
3950         the update that was done a while ago.
3951
3952 2003-12-02  Richard Hult  <richard@imendio.com>
3953
3954         * dbus/dbus-message.c (dbus_message_iter_append_dict): Set
3955         wrote_dict_key to FALSE on the iter that the dict is appended to,
3956         just like when appending other types. Fixes a bug where a dict
3957         couldn't be put inside a dict.
3958         (dbus_message_iter_append_dict_key): Fix typo in warning message.
3959         (message_iter_test, _dbus_message_test): Add test case for dict
3960         inside dict.
3961
3962 2003-12-01  David Zeuthen  <david@fubar.dk>
3963
3964         * python/dbus.py: Add the actual message when calling the reciever
3965         of a signal such that parameters can be inspected. Add the method
3966         remove_signal_receiver
3967         
3968 2003-11-26  Mikael Hallendal  <micke@imendio.com>
3969
3970         * bus/*.[ch]:
3971         * dbus/*.[ch]:
3972         * glib/*.[ch]: Made ref functions return the pointer
3973
3974 2003-11-25  Zack Rusin  <zack@kde.org>
3975
3976         * qt/integrator.h, qt/integrator.cpp: Adding handling of DBusServer,
3977
3978         * qt/server.h, qt/server.cpp, qt/Makefile.am: Adding DBusServer 
3979         wrappers,
3980
3981         * qt/connection.h, qt/connection.cpp: Adjusting to changes in 
3982         the Integrator and to better fit with the server,
3983
3984 2003-11-24  Zack Rusin  <zack@kde.org>
3985
3986         * qt/connection.h, qt/connection.cpp: removing initDbus method since
3987         the integrator handles it now
3988
3989         * qt/integrator.h, qt/integrator.cpp: reworking handling of timeouts,
3990         since QTimer wasn't really meant to be used the way DBusTimeout is
3991
3992 2003-11-24  Zack Rusin  <zack@kde.org>
3993
3994         * qt/integrator.h, qt/integrator.cpp, Makefile.am: Adding 
3995         Integrator class which integrates D-BUS with the Qt event loop,
3996
3997         * qt/connection.h, qt/connection.cpp: Move all the code which
3998         was dealing with D-BUS integration to the Integrator class,
3999         and start using Integrator,
4000
4001 2003-11-23  Zack Rusin  <zack@kde.org>
4002
4003         * qt/connection.h, qt/connection.cpp: Adding the DBusConnection 
4004         wrapper
4005
4006         * qt/message.h, qt/message.cpp: updating to the current D-BUS api,
4007         switching namespaces to DBusQt, reworking the class,
4008
4009         * Makefile.cvs: switching dependencies so that it matches KDE 
4010         schematics,
4011         
4012         * qt/Makefile.am: adding connection.{h,cpp} and message.{h,cpp} to 
4013         the library
4014
4015 2003-11-19  Havoc Pennington  <hp@redhat.com>
4016
4017         * NEWS: update
4018
4019         * configure.in: bump version to 0.20
4020
4021         * configure.in (have_qt): add yet another place to look for qt
4022         (someone hand trolltech a .pc file...)
4023
4024 2003-11-01  Havoc Pennington  <hp@redhat.com>
4025
4026         * doc/dbus-specification.xml: add state machine docs on the auth
4027         protocol; just a first draft, I'm sure it's wrong.      
4028
4029 2003-10-28  David Zeuthen  <david@fubar.dk>
4030
4031         * python/dbus_bindings.pyx.in: add get_dict to handle dictionaries
4032         return types. Fixup TYPE_* to reflect changes in dbus/dbus-protocol.h
4033         
4034 2003-10-28  Havoc Pennington  <hp@redhat.com>
4035
4036         * dbus/dbus-message.c (get_next_field): delete unused function
4037
4038 2003-10-28  Havoc Pennington  <hp@redhat.com>
4039
4040         * bus/expirelist.c (do_expiration_with_current_time): detect
4041         failure of the expire_func due to OOM
4042
4043         * bus/connection.c (bus_pending_reply_expired): return FALSE on OOM
4044
4045         * bus/dispatch.c (check_send_exit_to_service): fix to handle the
4046         NoReply error that's now created by the bus when the service exits
4047
4048 2003-10-28  Havoc Pennington  <hp@redhat.com>
4049
4050         * dbus/dbus-message.c (_dbus_message_test): enable and fix the
4051         tests for set_path, set_interface, set_member, etc.
4052
4053         * dbus/dbus-string.c (_dbus_string_insert_bytes): allow 0 bytes
4054
4055         * dbus/dbus-message.c (set_string_field): always just delete and
4056         re-append the field; accept NULL for deletion
4057         (re_align_fields_recurse): reimplement
4058         
4059 2003-10-26  Havoc Pennington  <hp@redhat.com>
4060
4061         * dbus/dbus-connection.c: fix docs to properly describe the
4062         disconnected message
4063         (_dbus_connection_notify_disconnected): remove this function; 
4064         we can't synchronously add the disconnected message, we have to 
4065         do it after we've queued any remaining real messages
4066         (_dbus_connection_get_dispatch_status_unlocked): queue the
4067         disconnect message only if the transport has finished queueing all
4068         its real messages and is disconnected.
4069         (dbus_connection_disconnect): update the dispatch status here
4070
4071 2003-10-22  Havoc Pennington  <hp@redhat.com>
4072
4073         * bus/bus.c (bus_context_check_security_policy): fix up assertion
4074
4075         * bus/connection.c (bus_transaction_send_from_driver): set the
4076         destination to the connection's base service
4077
4078 2003-10-20  Havoc Pennington  <hp@redhat.com>
4079
4080         hmm, make check is currently not passing.
4081         
4082         * doc/dbus-specification.xml: add requirement that custom type
4083         names follow the same rules as interface names.
4084
4085         * dbus/dbus-protocol.h: change some of the byte codes, to avoid
4086         duplication and allow 'c' to be 'custom'; dict is now 'm' for
4087         'map'
4088
4089         * doc/dbus-specification.xml: update type codes to match
4090         dbus-protocol.h, using the ASCII byte values. Rename type NAMED to
4091         CUSTOM. Add type OBJECT_PATH to the spec.
4092
4093 2003-10-17  Havoc Pennington  <hp@redhat.com>
4094
4095         * bus/driver.c (create_unique_client_name): use "." as separator
4096         in base service names instead of '-'
4097
4098         * dbus/dbus-string.c (_dbus_string_get_byte): allow getting nul
4099         byte at the end of the string
4100
4101         * dbus/dbus-internals.h (_DBUS_LIKELY, _DBUS_UNLIKELY): add
4102         optimization macros since string validation seems to be a slow
4103         point.
4104         
4105         * doc/dbus-specification.xml: restrict valid
4106         service/interface/member/error names. Add test suite code for the
4107         name validation.
4108
4109         * dbus/dbus-string.c: limit service/interface/member/error names 
4110         to [0-9][A-Z][a-z]_
4111
4112         * dbus/dbus-connection.c (dbus_connection_dispatch): add missing
4113         format arg to verbose spew
4114
4115         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): if not out of
4116         memory, return instead of g_error
4117
4118         * test/test-service.c (path_message_func): support emitting a
4119         signal on request
4120
4121         * dbus/dbus-bus.c (init_connections_unlocked): only fill in
4122         activation bus type if DBUS_BUS_ACTIVATION was set; default to
4123         assuming the activation bus was the session bus so that services
4124         started manually will still register.
4125         (init_connections_unlocked): fix so that in OOM situation we get
4126         the same semantics when retrying the function
4127         
4128         * test/test-service.c (main): change to use path registration, to
4129         test those codepaths; register with DBUS_BUS_ACTIVATION rather
4130         than DBUS_BUS_SESSION
4131
4132 2003-10-16  Havoc Pennington  <hp@redhat.com>
4133
4134         * glib/dbus-gtest-main.c: bracket with #ifdef DBUS_BUILD_TESTS
4135
4136         * Makefile.am (GCOV_DIRS): remove "test", we don't care about test
4137         coverage of the tests
4138         (coverage-report.txt): don't move the .da and .bbg files around
4139
4140 2003-10-16  Havoc Pennington  <hp@redhat.com>
4141
4142         * bus/bus.c (struct BusContext): remove struct field I didn't mean
4143         to put there
4144
4145 2003-10-16  Havoc Pennington  <hp@redhat.com>
4146
4147         * bus/connection.c (bus_pending_reply_expired): either cancel or
4148         execute, not both
4149         (bus_connections_check_reply): use unlink, not remove_link, as we
4150         don't want to free the link; fixes double free mess
4151
4152         * dbus/dbus-pending-call.c (dbus_pending_call_block): fix in case
4153         where no reply was received
4154
4155         * dbus/dbus-connection.c (_dbus_pending_call_complete_and_unlock):
4156         fix a refcount leak
4157
4158         * bus/signals.c (match_rule_matches): add special cases for the
4159         bus driver, so you can match on sender/destination for it.
4160
4161         * dbus/dbus-sysdeps.c (_dbus_abort): print backtrace if
4162         DBUS_PRINT_BACKTRACE is set
4163
4164         * dbus/dbus-internals.c: add pid to assertion failure messages
4165
4166         * dbus/dbus-connection.c: add message type code to the debug spew
4167
4168         * glib/dbus-gproxy.c (gproxy_get_match_rule): match rules want
4169         sender=foo not service=foo
4170
4171         * dbus/dbus-bus.c (dbus_bus_get): if the activation bus is the
4172         session bus but DBUS_SESSION_BUS_ADDRESS isn't set, use 
4173         DBUS_ACTIVATION_ADDRESS instead
4174
4175         * bus/activation.c: set DBUS_SESSION_BUS_ADDRESS,
4176         DBUS_SYSTEM_BUS_ADDRESS if appropriate
4177
4178         * bus/bus.c (bus_context_new): handle OOM copying bus type into
4179         context struct
4180
4181         * dbus/dbus-message.c (dbus_message_iter_get_object_path): new function
4182         (dbus_message_iter_get_object_path_array): new function (half
4183         finished, disabled for the moment)
4184         
4185         * glib/dbus-gproxy.c (dbus_gproxy_end_call): properly handle
4186         DBUS_MESSAGE_TYPE_ERROR
4187
4188         * tools/dbus-launch.c (babysit): support DBUS_DEBUG_OUTPUT to
4189         avoid redirecting stderr to /dev/null
4190         (babysit): close stdin if not doing the "exit_with_session" thing
4191
4192         * dbus/dbus-sysdeps.c (_dbus_become_daemon): delete some leftover
4193         debug code; change DBUS_DEBUG_OUTPUT to only enable stderr, not
4194         stdout/stdin, so things don't get confused
4195         
4196         * bus/system.conf.in: fix to allow replies, I modified .conf
4197         instead of .conf.in again.
4198
4199 2003-10-14  David Zeuthen  <david@fubar.dk>
4200
4201         * python/dbus_bindings.pyx.in (MessageIter.get): fixed typo in
4202         argtype to arg_type when raising unknown arg type exception.
4203         Changed type list to reflect the changes in dbus-protocol.h so 
4204         the bindings actually work.
4205
4206 2003-10-14  Havoc Pennington  <hp@redhat.com>
4207
4208         * test/decode-gcov.c: support gcc 3.3 also, though gcc 3.3 seems
4209         to have a bug keeping it from outputting the .da files sometimes
4210         (string_get_string): don't append garbage nul bytes to the string.
4211
4212 2003-10-15  Seth Nickell  <seth@gnome.org>
4213
4214         * python/Makefile.am:
4215
4216         Include dbus_h_wrapper.h in the dist tarball.
4217
4218 2003-10-14  Havoc Pennington  <hp@redhat.com>
4219
4220         * bus/bus.c (bus_context_check_security_policy): revamp this to
4221         work more sanely with new policy-based requested reply setup
4222
4223         * bus/connection.c (bus_transaction_send_from_driver): set bus
4224         driver messages as no reply
4225
4226         * bus/policy.c (bus_client_policy_check_can_receive): handle a
4227         requested_reply attribute on allow/deny rules
4228
4229         * bus/system.conf: add <allow requested_reply="true"/>
4230
4231         * bus/driver.c (bus_driver_handle_message): fix check for replies
4232         sent to the bus driver, which was backward. How did this ever work
4233         at all though? I think I'm missing something.
4234
4235         * dbus/dbus-message.c (decode_header_data): require error and
4236         method return messages to have a reply serial field to be valid
4237         (_dbus_message_loader_queue_messages): break up this function;
4238         validate that reply serial and plain serial are nonzero; 
4239         clean up the OOM/error handling.
4240         (get_uint_field): don't return -1 from this
4241         (dbus_message_create_header): fix signed/unsigned bug
4242
4243         * bus/connection.c (bus_connections_expect_reply): save serial of
4244         the incoming message, not reply serial
4245
4246 2003-10-14  Havoc Pennington  <hp@redhat.com>
4247
4248         * bus/connection.c: implement pending reply tracking using
4249         BusExpireList
4250
4251         * bus/bus.c (bus_context_check_security_policy): verify that a
4252         reply is pending in order to allow a reply to be sent. Deny 
4253         messages of unknown type.
4254
4255         * bus/dbus-daemon-1.1.in: update to mention new resource limits
4256
4257         * bus/bus.c (bus_context_get_max_replies_per_connection): new
4258         (bus_context_get_reply_timeout): new
4259
4260 2003-10-13  Seth Nickell  <seth@gnome.org>
4261
4262         * python/Makefile.am:
4263
4264         Pass "make distcheck": remove a couple files from DIST_FILES
4265         that weren't included in the final version.
4266
4267 2003-10-12  Havoc Pennington  <hp@pobox.com>
4268
4269         Added test code that 1) starts an actual bus daemon and 2) uses
4270         DBusGProxy; fixed bugs that were revealed by the test. Lots 
4271         more testing possible, but this is the basic framework.
4272         
4273         * glib/dbus-gproxy.c (dbus_gproxy_manager_unregister): remove
4274         empty proxy lists from the proxy list hash
4275
4276         * dbus/dbus-message.c (dbus_message_iter_get_args_valist): add a
4277         couple of return_if_fail checks
4278
4279         * dbus/dbus-pending-call.c (_dbus_pending_call_new): use dbus_new0
4280         to allocate, so everything is cleared to NULL as it should be.
4281
4282         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): pass
4283         source as data to dbus_connection_set_timeout_functions() as the 
4284         timeout functions expected
4285
4286         * test/glib/run-test.sh: add a little script to start up a message
4287         bus and run tests using it
4288
4289         * tools/dbus-launch.1: updates
4290
4291         * tools/dbus-launch.c (main): add --config-file option
4292
4293         * tools/dbus-launch.c (main): remove confusing else if (runprog)
4294         that could never be reached.
4295
4296         * dbus/dbus-message.c (dbus_message_new_method_return) 
4297         (dbus_message_new_error, dbus_message_new_signal): set the
4298         no-reply-expected flag on all these. Redundant, but may
4299         as well be consistent.
4300
4301 2003-10-11  Havoc Pennington  <hp@pobox.com>
4302
4303         * test/decode-gcov.c (function_solve_graph): make broken block
4304         graph a nonfatal error since it seems to be broken. Need to debug
4305         this.
4306
4307         * dbus/dbus-marshal.c (_dbus_type_is_valid): new function since we
4308         can't just check type > INVALID < LAST anymore
4309
4310         * dbus/dbus-message.c (dbus_message_get_signature): new function
4311         (dbus_message_has_signature): new function
4312         (struct DBusMessage): add signature field (right now it isn't sent
4313         over the wire, just generated on the fly)
4314         (dbus_message_copy): copy the signature, and init strings to
4315         proper length to avoid some reallocs
4316         (dbus_message_iter_init_array_iterator): return void, since it
4317         can't fail
4318         (dbus_message_iter_init_dict_iterator): return void since it can't fail
4319         (_dbus_message_loader_queue_messages): add silly temporary hack to
4320         fill in message->signature on load
4321
4322         * dbus/dbus-protocol.h: change DBUS_TYPE_* values to be ASCII
4323         characters, so they are relatively human-readable.
4324
4325 2003-10-11  Havoc Pennington  <hp@pobox.com>
4326
4327         * dbus/dbus-message.c (_dbus_message_test): add more test
4328         coverage, but #if 0 for now since they uncover a bug 
4329         not fixed yet; I think in re_align_field_recurse()
4330         (re_align_field_recurse): add FIXME about broken assertion
4331
4332         * dbus/dbus-sysdeps.c (_dbus_sysdeps_test): add more test coverage
4333
4334         * bus/connection.c: share a couple code bits with expirelist.c
4335
4336         * bus/expirelist.h, bus/expirelist.c: implement a generic
4337         expire-items-after-N-seconds facility, was going to share between
4338         expiring connections and replies, decided not to use for expiring
4339         connections for now.
4340
4341         * COPYING: include AFL 2.0 (still need to change all the file headers)
4342
4343 2003-10-09  Havoc Pennington  <hp@redhat.com>
4344
4345         * configure.in: define DBUS_HAVE_GCC33_GCOV if we have
4346         gcc 3.3. Not that we do anything about it yet.
4347
4348         * bus/signals.c (bus_match_rule_parse): impose max length on the
4349         match rule text
4350
4351         * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
4352
4353 2003-10-09  Havoc Pennington  <hp@redhat.com>
4354
4355         Make matching rules theoretically work (add parser).
4356         
4357         * bus/bus.c (bus_context_check_security_policy): fix up to handle
4358         the case where destination is explicitly specified as bus driver
4359         and someone else is eavesdropping.
4360         
4361         * bus/policy.c (bus_client_policy_check_can_receive): fix up
4362         definition of eavesdropping and assertion
4363
4364         * tools/dbus-send.c (main): use dbus_message_type_from_string
4365
4366         * bus/signals.c (bus_match_rule_parse): implement
4367
4368         * dbus/dbus-message.c (dbus_message_type_from_string): new
4369
4370         * dbus/dbus-errors.h (DBUS_ERROR_MATCH_RULE_INVALID): add
4371
4372 2003-10-02  Havoc Pennington  <hp@pobox.com>
4373
4374         * glib/dbus-gproxy.c (dbus_gproxy_call_no_reply): rename from
4375         dbus_gproxy_oneway_call
4376
4377         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main) 
4378         (dbus_server_setup_with_g_main): fix to allow calling them more
4379         than once on the same args
4380         (dbus_bus_get_with_g_main): new function
4381
4382 2003-10-02  Havoc Pennington  <hp@redhat.com>
4383
4384         * doc/dbus-tutorial.xml: write some stuff
4385
4386 2003-09-29  Havoc Pennington  <hp@pobox.com>
4387
4388         * configure.in: split checks for Doxygen from XML docs, check for
4389         xmlto
4390
4391         * doc/Makefile.am: XML-ify all the docs, and add a blank
4392         dbus-tutorial.xml
4393
4394 2003-09-29  Havoc Pennington  <hp@pobox.com>
4395
4396         * Merge dbus-object-names branch. To see the entire patch 
4397         do cvs diff -r DBUS_OBJECT_NAMES_BRANCHPOINT -r dbus-object-names,
4398         it's huuuuge though.
4399         To revert, I tagged DBUS_BEFORE_OBJECT_NAMES_MERGE.
4400         
4401 2003-09-28  Havoc Pennington  <hp@pobox.com>
4402
4403         * HACKING: update to reflect new server
4404
4405 2003-09-26  Seth Nickell  <seth@gnome.org>
4406
4407         * python/dbus.py:
4408         * python/examples/example-signals.py:
4409
4410         Start implementing some notions of signals. The API
4411         is really terrible, but they sort of work (with the
4412         exception of being able to filter by service, and to
4413         transmit signals *as* a particular service). Need to
4414         figure out how to make messages come from the service
4415         we registered :-(
4416         
4417         * python/dbus_bindings.pyx.in:
4418
4419         Removed duplicate message_handler callbacks.
4420         
4421 2003-09-25  Havoc Pennington  <hp@redhat.com>
4422
4423         * bus/session.conf.in: fix my mess
4424
4425 2003-09-25  Havoc Pennington  <hp@pobox.com>
4426
4427         * bus/session.conf.in: fix security policy, reported by Seth Nickell
4428
4429 2003-09-25  Seth Nickell  <seth@gnome.org>
4430
4431         * python/examples/example-service.py:
4432
4433         Johan notices complete wrong code in example-service, but
4434         completely wrong in a way that works exactly the same (!).
4435         Johan is confused, how could this possibly work? Example
4436         code fails to serve purpose of making things clear.
4437         Seth fixes.
4438
4439 2003-09-25  Mark McLoughlin  <mark@skynet.ie>
4440
4441         * doc/dbus-specification.sgml: don't require header fields
4442         to be 4-byte aligned and specify that fields should be
4443         distinguished from padding by the fact that zero is not
4444         a valid field name.
4445         
4446         * doc/TODO: remove re-alignment item and add item to doc
4447         the OBJECT_PATH type.
4448         
4449         * dbus/dbus-message.c:
4450         (HeaderField): rename the original member to value_offset
4451         and introduce a name_offset member to keep track of where
4452         the field actually begins.
4453         (adjust_field_offsets): remove.
4454         (append_int_field), (append_uint_field),
4455         (append_string_field): don't align the start of the header
4456         field to a 4-byte boundary.
4457         (get_next_field): impl finding the next marhsalled field
4458         after a given field.
4459         (re_align_field_recurse): impl re-aligning a number of
4460         already marshalled fields.
4461         (delete_field): impl deleting a field of any type and
4462         re-aligning any following fields.
4463         (delete_int_or_uint_field), (delete_string_field): remove.
4464         (set_int_field), (set_uint_field): no need to re-check
4465         that we have the correct type for the field.
4466         (set_string_field): ditto and impl re-aligning any
4467         following fields.
4468         (decode_header_data): update to take into account that
4469         the fields aren't 4-byte aligned any more and the new
4470         way to distinguish padding from header fields. Also,
4471         don't exit when there is too much header padding.
4472         (process_test_subdir): print the directory.
4473         (_dbus_message_test): add test to make sure a following
4474         field is re-aligned correctly after field deletion.
4475         
4476         * dbus/dbus-string.[ch]:
4477         (_dbus_string_insert_bytes): rename from insert_byte and
4478         allow the insert of multiple bytes.
4479         (_dbus_string_test): test inserting multiple bytes.
4480
4481         * dbus/dbus-marshal.c: (_dbus_marshal_set_string): add
4482         warning note to docs about having to re-align any
4483         marshalled values following the string.
4484         
4485         * dbus/dbus-message-builder.c:
4486         (append_string_field), (_dbus_message_data_load):
4487         don't align the header field.
4488         
4489         * dbus/dbus-auth.c: (process_test_subdir): print the
4490         directory.
4491         
4492         * test/break-loader.c: (randomly_add_one_byte): upd. for
4493         insert_byte change.
4494         
4495         * test/data/invalid-messages/bad-header-field-alignment.message:
4496         new test case.
4497         
4498         * test/data/valid-messages/unknown-header-field.message: shove
4499         a dict in the unknown field.
4500
4501 2003-09-25  Seth Nickell  <seth@gnome.org>
4502
4503         * python/dbus.py:
4504         * python/dbus_bindings.pyx.in:
4505
4506         Handle return values.
4507         
4508         * python/examples/example-client.py:
4509         * python/examples/example-service.py:
4510
4511         Pass back return values from the service to the client.
4512         
4513 2003-09-24  Seth Nickell  <seth@gnome.org>
4514
4515         * python/dbus.py:
4516
4517         Connect Object methods (when you are sharing an object) up... pass
4518         in a list of methods to be shared. Sharing all the methods just
4519         worked out too weird. You can now create nice Services over the
4520         DBus in Python. :-)
4521         
4522         * python/dbus_bindings.pyx.in:
4523
4524         Keep references to user_data tuples passed into C functions so 
4525         Python doesn't garbage collect on us.
4526
4527         Implement MethodReturn and Error subclasses of Message for creating
4528         DBusMessage's of those types.
4529         
4530         * python/examples/example-client.py:
4531         * python/examples/example-service.py:
4532
4533         Simple example code showing both how create DBus services and objects,
4534         and how to use them.
4535
4536 2003-09-23  Havoc Pennington  <hp@pobox.com>
4537
4538         * glib/dbus-gproxy.c (dbus_gproxy_manager_filter): implement
4539
4540 2003-09-23  Havoc Pennington  <hp@redhat.com>
4541
4542         * glib/dbus-gproxy.c (dbus_gproxy_connect_signal): implement
4543         (dbus_gproxy_disconnect_signal): implement
4544         (dbus_gproxy_manager_remove_signal_match): implement
4545         (dbus_gproxy_manager_add_signal_match): implement
4546         (dbus_gproxy_oneway_call): implement
4547
4548 2003-09-23  Havoc Pennington  <hp@pobox.com>
4549
4550         * glib/dbus-gproxy.c (struct DBusGProxy): convert to a GObject
4551         subclass. This means dropping the transparent thread safety of the
4552         proxy; you now need a separate proxy per-thread, or your own
4553         locking on the proxy. Probably right anyway.
4554         (dbus_gproxy_ref, dbus_gproxy_unref): nuke, just use g_object_ref
4555
4556 2003-09-22  Havoc Pennington  <hp@redhat.com>
4557
4558         * glib/dbus-gproxy.c (dbus_gproxy_manager_get): implement
4559
4560 2003-09-21  Seth Nickell  <seth@gnome.org>
4561
4562         First checkin of the Python bindings.
4563         
4564         * python/.cvsignore:
4565         * python/Makefile.am:
4566         * python/dbus_bindings.pyx.in:
4567         * python/dbus_h_wrapper.h:
4568
4569         Pieces for Pyrex to operate on, building a dbus_bindings.so
4570         python module for low-level access to the DBus APIs.
4571         
4572         * python/dbus.py:
4573
4574         High-level Python module for accessing DBus objects.
4575
4576         * configure.in:
4577         * Makefile.am:
4578
4579         Build stuff for the python bindings.
4580
4581         * acinclude.m4:
4582
4583         Extra macro needed for finding the Python C header files.
4584
4585 2003-09-21  Havoc Pennington  <hp@pobox.com>
4586
4587         * glib/dbus-gproxy.c (dbus_gproxy_manager_new): start
4588         implementing the proxy manager, didn't get very far.
4589
4590         * dbus/dbus-bus.c (dbus_bus_add_match): new
4591         (dbus_bus_remove_match): new
4592
4593         * glib/dbus-gproxy.c (dbus_gproxy_new_for_service): add a
4594         path_name argument; adjust the other not-yet-implemented 
4595         gproxy constructors to be what I think they should be.
4596
4597 2003-09-21  Havoc Pennington  <hp@pobox.com>
4598
4599         * dbus/dbus-bus.c (dbus_bus_get): set exit_on_disconnect to TRUE
4600         by default for message bus connections.
4601
4602         * dbus/dbus-connection.c (dbus_connection_dispatch): exit if
4603         exit_on_disconnect flag is set and we process the disconnected
4604         signal.
4605         (dbus_connection_set_exit_on_disconnect): new function
4606
4607 2003-09-21  Havoc Pennington  <hp@pobox.com>
4608
4609         Get matching rules mostly working in the bus; only actually
4610         parsing the rule text remains. However, the client side of
4611         "signal connections" hasn't been started, this patch is only the
4612         bus side.
4613         
4614         * dbus/dispatch.c: fix for the matching rules changes
4615         
4616         * bus/driver.c (bus_driver_handle_remove_match)
4617         (bus_driver_handle_add_match): send an ack reply from these
4618         method calls
4619
4620         * glib/dbus-gproxy.c (dbus_gproxy_begin_call): fix order of
4621         arguments, reported by Seth Nickell
4622
4623         * bus/config-parser.c (append_rule_from_element): support
4624         eavesdrop=true|false attribute on policies so match rules 
4625         can be prevented from snooping on the system bus.
4626
4627         * bus/dbus-daemon-1.1.in: consistently use terminology "sender"
4628         and "destination" in attribute names; fix some docs bugs; 
4629         add eavesdrop=true|false attribute
4630
4631         * bus/driver.c (bus_driver_handle_add_match)
4632         (bus_driver_handle_remove_match): handle AddMatch, RemoveMatch
4633         messages
4634
4635         * dbus/dbus-protocol.h (DBUS_SERVICE_ORG_FREEDESKTOP_BROADCAST): get
4636         rid of broadcast service concept, signals are just always broadcast
4637
4638         * bus/signals.c, bus/dispatch.c, bus/connection.c, bus/bus.c:
4639         mostly implement matching rules stuff (currently only exposed as signal
4640         connections)
4641
4642 2003-09-21  Mark McLoughlin  <mark@skynet.ie>
4643
4644         * doc/dbus-specification.sgml: Change the header field name
4645         to be an enum and update the rest of the spec to reference
4646         the fields using the conventinal name.
4647
4648         * dbus/dbus-protocol.h: update to reflect the spec.
4649
4650         * doc/TODO: add item to remove the 4 byte alignment requirement.
4651         
4652         * dbus/dbus-message.c: Remove the code to generalise the
4653         header/body length and serial number header fields as named
4654         header fields so we can reference field names using the 
4655         protocol values.
4656         (append_int_field), (append_uint_field), (append_string_field):
4657         Append the field name as a byte rather than four chars.
4658         (delete_int_or_uint_field), (delete_string_field): reflect the
4659         fact that the field name and typecode now occupy 4 bytes instead
4660         of 8.
4661         (decode_string_field), (decode_header_data): update to reflect
4662         protocol changes and move the field specific encoding from
4663         decode_string_field() back into decode_header_data().
4664         
4665         * dbus/dbus-internals.[ch]: (_dbus_header_field_to_string):
4666         Add utility to aid debugging.
4667         
4668         * dbus/dbus-message-builder.c:
4669         (append_string_field), (_dbus_message_data_load): Update to
4670         reflect protocol changes; Change the FIELD_NAME directive
4671         to HEADER_FIELD and allow it to take the field's conventional
4672         name rather than the actual value.
4673         
4674         * test/data/*/*.message: Update to use HEADER_FIELD instead
4675         of FIELD_NAME; Always align the header on an 8 byte boundary
4676         *before* updating the header length.
4677
4678 2003-09-15  Havoc Pennington  <hp@pobox.com>
4679
4680         * dbus/dbus-pending-call.c: add the get/set object data
4681         boilerplate as for DBusConnection, etc. Use generic object data
4682         for the notify callback.
4683
4684         * glib/dbus-gparser.c (parse_node): parse child nodes
4685
4686         * tools/dbus-viewer.c: more hacking on the dbus-viewer
4687         
4688         * glib/dbus-gutils.c (_dbus_gutils_split_path): add a file to
4689         contain functions shared between the convenience lib and the
4690         installed lib
4691
4692         * glib/Makefile.am (libdbus_glib_1_la_LDFLAGS): add
4693         -export-symbols-regex to the GLib library
4694
4695         * dbus/dbus-object-tree.c (_dbus_object_tree_dispatch_and_unlock):
4696         fix the locking in here, and add a default handler for
4697         Introspect() that just returns sub-nodes.
4698
4699 2003-09-14  Havoc Pennington  <hp@pobox.com>
4700
4701         * glib/dbus-gthread.c (dbus_g_thread_init): rename to make g_foo
4702         rather than gfoo consistent
4703
4704         * glib/dbus-gproxy.h: delete for now, move contents to
4705         dbus-glib.h, because the include files don't work right since we
4706         aren't in the dbus/ subdir.
4707         
4708         * glib/dbus-gproxy.c (dbus_gproxy_send): finish implementing
4709         (dbus_gproxy_end_call): finish
4710         (dbus_gproxy_begin_call): finish
4711
4712         * glib/dbus-gmain.c (dbus_set_g_error): new
4713
4714         * glib/dbus-gobject.c (handle_introspect): include information
4715         about child nodes in the introspection
4716
4717         * dbus/dbus-connection.c (dbus_connection_list_registered): new
4718         function to help in implementation of introspection
4719
4720         * dbus/dbus-object-tree.c
4721         (_dbus_object_tree_list_registered_and_unlock): new function
4722
4723 2003-09-12  Havoc Pennington  <hp@pobox.com>
4724
4725         * glib/dbus-gidl.h: add common base class for all the foo_info
4726         types
4727
4728         * tools/dbus-viewer.c: add GTK-based introspection UI thingy
4729         similar to kdcop
4730
4731         * test/Makefile.am: try test srcdir -ef . in addition to test
4732         srcdir = ., one of them should work (yeah lame)
4733         
4734         * glib/Makefile.am: build the "idl" parser stuff as a convenience
4735         library
4736         
4737         * glib/dbus-gparser.h: make description_load routines return
4738         NodeInfo* not Parser*
4739
4740         * Makefile.am (SUBDIRS): build test dir after all library dirs
4741
4742         * configure.in: add GTK+ detection
4743
4744 2003-09-07  Havoc Pennington  <hp@pobox.com>
4745
4746         * Make Doxygen contented.
4747
4748 2003-09-07  Havoc Pennington  <hp@pobox.com>
4749
4750         * doc/dbus-specification.sgml: more updates
4751
4752 2003-09-06  Havoc Pennington  <hp@pobox.com>
4753
4754         * doc/dbus-specification.sgml: partial updates
4755
4756         * bus/dbus-daemon-1.1.in: fix the config file docs for the
4757         zillionth time; hopefully I edited the right file this time.
4758
4759         * bus/config-parser.c (append_rule_from_element): support
4760         send_type, send_path, receive_type, receive_path
4761
4762         * bus/policy.c: add message type and path to the list of things
4763         that can be "firewalled"
4764
4765 2003-09-06  Havoc Pennington  <hp@pobox.com>
4766
4767         * dbus/dbus-connection.c (dbus_connection_register_fallback): add this
4768         (dbus_connection_register_object_path): make this not handle
4769         messages to paths below the given path
4770
4771 2003-09-03  Havoc Pennington  <hp@pobox.com>
4772
4773         * test/glib/Makefile.am: add this with random glib-linked test
4774         programs
4775
4776         * glib/Makefile.am: remove the random test programs from here,
4777         leave only the unit tests
4778
4779         * glib/dbus-gobject.c (_dbus_gobject_test): add test for 
4780         uscore/javacaps conversion, and fix     
4781         (get_object_property, set_object_property): change to .NET
4782         convention for mapping props to methods, set_FooBar/get_FooBar, 
4783         since one language has such a convention we may as well copy it. 
4784         Plus real methods in either getFooBar or get_foo_bar style won't 
4785         collide with this convention.
4786
4787 2003-09-01  Havoc Pennington  <hp@pobox.com>
4788
4789         * glib/dbus-gparser.c: implement
4790
4791         * glib/dbus-gobject.c: start implementing skeletons support
4792
4793         * configure.in: when disabling checks/assert, also define
4794         G_DISABLE_ASSERT and G_DISABLE_CHECKS
4795
4796 2003-09-01  Havoc Pennington  <hp@pobox.com>
4797
4798         * glib/Makefile.am: rearrange a bunch of files and get "make
4799         check" framework set up
4800
4801 2003-08-31  Havoc Pennington  <hp@pobox.com>
4802
4803         * fix build with --disable-tests
4804
4805 2003-08-30  Havoc Pennington  <hp@pobox.com>
4806
4807         * dbus/dbus-connection.c: purge DBusMessageHandler
4808
4809         * dbus/dbus-message-handler.c: remove DBusMessageHandler, just 
4810         use callbacks everywhere
4811
4812 2003-08-30  Havoc Pennington  <hp@pobox.com>
4813
4814         * test/data/valid-config-files/system.d/test.conf: change to 
4815         root for the user so warnings don't get printed
4816
4817         * dbus/dbus-message.c: add dbus_message_get_path,
4818         dbus_message_set_path
4819         
4820         * dbus/dbus-object-tree.c (do_test_dispatch): add test of
4821         dispatching to a path
4822
4823         * dbus/dbus-string.c (_dbus_string_validate_path): add
4824
4825         * dbus/dbus-marshal.c (_dbus_demarshal_object_path): implement
4826         (_dbus_marshal_object_path): implement
4827
4828         * dbus/dbus-protocol.h (DBUS_HEADER_FIELD_PATH): new header field 
4829         to contain the path to the target object
4830         (DBUS_HEADER_FIELD_SENDER_SERVICE): rename
4831         DBUS_HEADER_FIELD_SENDER to explicitly say it's the sender service
4832
4833 2003-08-30  Havoc Pennington  <hp@pobox.com>
4834
4835         * dbus/dbus-object-tree.c: write tests and fix the discovered bugs
4836
4837 2003-08-29  Havoc Pennington  <hp@pobox.com>
4838
4839         * dbus/dbus-object-tree.c: modify to allow overlapping paths to be
4840         registered
4841         (struct DBusObjectSubtree): shrink this
4842         a lot, since we may have a lot of them
4843         (_dbus_object_tree_free_all_unlocked): implement
4844         (_dbus_object_tree_dispatch_and_unlock): implement
4845
4846 2003-08-29  Havoc Pennington  <hp@pobox.com>
4847
4848         * dbus/dbus-internals.h: fix _DBUS_N_GLOBAL_LOCKS
4849
4850 2003-08-28  Havoc Pennington  <hp@pobox.com>
4851
4852         purge DBusObjectID
4853         
4854         * dbus/dbus-connection.c: port to no ObjectID, create a
4855         DBusObjectTree, rename ObjectTree to ObjectPath in public API
4856
4857         * dbus/dbus-connection.h (struct DBusObjectTreeVTable): delete 
4858         everything except UnregisterFunction and MessageFunction
4859         
4860         * dbus/dbus-marshal.c: port away from DBusObjectID, 
4861         add DBUS_TYPE_OBJECT_PATH
4862         
4863         * dbus/dbus-object-registry.[hc], dbus/dbus-object.[hc], 
4864         dbus/dbus-objectid.[hc]: remove these, we are moving to 
4865         path-based object IDs
4866
4867 2003-08-25  Havoc Pennington  <hp@pobox.com>
4868
4869         Just noticed that dbus_message_test is hosed, I wonder when I
4870         broke that. I thought make check was passing earlier...
4871         
4872         * dbus/dbus-object-tree.c: add new "object tree" to match DCOP 
4873         container tree, will replace most of dbus-object-registry
4874
4875         * dbus/dbus-string.c (_dbus_string_append_printf_valist): fix C99
4876         screwup
4877
4878 2003-08-19  Havoc Pennington  <hp@pobox.com>
4879
4880         * dbus/dbus-message.c (decode_string_field): support FIELD_SENDER
4881         (dbus_message_is_error): fix this function
4882
4883         * bus/dbus-daemon-1.1: clarify logic on when <deny>/<allow> rules
4884         match
4885
4886         * bus/policy.c (bus_client_policy_check_can_receive): fix code to
4887         reflect clarified man page
4888         (bus_client_policy_check_can_send): ditto
4889         
4890         * bus/session.conf.in: fixup
4891
4892         * bus/system.conf.in: fixup
4893
4894 2003-08-18  Havoc Pennington  <hp@redhat.com>
4895
4896         * dbus/dbus-hash.c (_dbus_hash_table_insert_two_strings): fix
4897
4898         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
4899         dumb bug created earlier (wrong order of args to
4900         decode_header_data())
4901         
4902         * tools/dbus-send.c: port
4903
4904         * tools/dbus-print-message.c (print_message): port
4905
4906         * test/data/*messages: port all messages over
4907         
4908         * dbus/dbus-message-builder.c: support including 
4909         message type
4910         
4911         * bus/driver.c: port over
4912         
4913         * bus/dispatch.c: port over to new stuff
4914
4915         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
4916         rename disconnect signal to "Disconnected"
4917
4918 2003-08-17  Havoc Pennington  <hp@pobox.com>
4919
4920         This doesn't compile yet, but syncing up so I can hack on it from
4921         work. What are branches for if not broken code? ;-)
4922         
4923         * dbus/dbus-protocol.h: remove DBUS_HEADER_FIELD_NAME, add
4924         DBUS_HEADER_FIELD_INTERFACE, DBUS_HEADER_FIELD_MEMBER,
4925         DBUS_HEADER_FIELD_ERROR_NAME
4926         
4927         * dbus/dbus-hash.c: Introduce DBUS_HASH_TWO_STRINGS as hack to use
4928         for the interface+member pairs
4929         (string_hash): change to use g_str_hash algorithm
4930         (find_direct_function, find_string_function): refactor these to
4931         share most code.
4932         
4933         * dbus/dbus-message.c: port all of this over to support 
4934         interface/member fields instead of name field
4935
4936         * dbus/dbus-object-registry.c: port over
4937         
4938         * dbus/dbus-string.c (_dbus_string_validate_interface): rename
4939         from _dbus_string_validate_name
4940
4941         * bus/dbus-daemon-1.1: change file format for the 
4942         <deny>/<allow> stuff to match new message naming scheme
4943
4944         * bus/policy.c: port over
4945
4946         * bus/config-parser.c: parse new format
4947         
4948 2003-08-16  Havoc Pennington  <hp@pobox.com>
4949
4950         * dbus/dbus-object-registry.c (add_and_remove_objects): remove
4951         broken assertion
4952
4953         * glib/dbus-gproxy.c: some hacking
4954
4955 2003-08-15  Havoc Pennington  <hp@redhat.com>
4956
4957         * dbus/dbus-pending-call.c (dbus_pending_call_block): implement
4958
4959         * dbus/dbus-connection.c
4960         (dbus_connection_send_with_reply_and_block): factor out internals;
4961         change to convert any error replies to DBusError instead of 
4962         returning them as a message
4963
4964 2003-08-15  Havoc Pennington  <hp@pobox.com>
4965
4966         * dbus/dbus-connection.c, 
4967         dbus/dbus-pending-call.c: Finish the pending call stuff
4968
4969 2003-08-14  Havoc Pennington  <hp@redhat.com>
4970
4971         * dbus/dbus-pending-call.c: start on new object that will replace
4972         DBusMessageHandler and ReplyHandlerData for tracking outstanding
4973         replies
4974
4975         * dbus/dbus-gproxy.c: start on proxy object used to communicate
4976         with remote interfaces
4977
4978         * dbus/dbus-gidl.c: do the boring boilerplate in here
4979         
4980 2003-08-12  Havoc Pennington  <hp@pobox.com>
4981
4982         * bus/dispatch.c (bus_dispatch): make this return proper 
4983         DBusHandlerResult to avoid DBUS_ERROR_UNKNOWN_METHOD
4984
4985         * dbus/dbus-errors.c (dbus_set_error): use
4986         _dbus_string_append_printf_valist
4987
4988         * dbus/dbus-string.c (_dbus_string_append_printf_valist)
4989         (_dbus_string_append_printf): new
4990
4991         * dbus/dbus-errors.h (DBUS_ERROR_UNKNOWN_MESSAGE): change to
4992         UNKNOWN_METHOD
4993
4994         * dbus/dbus-connection.c (dbus_connection_dispatch): handle
4995         DBUS_HANDLER_RESULT_NEED_MEMORY; send default error reply if a
4996         message is unhandled.
4997
4998 2003-08-11  Havoc Pennington  <hp@pobox.com>
4999
5000         * bus/test.c (client_disconnect_handler): change to return
5001         HANDLED (would have been REMOVE_MESSAGE)
5002
5003         * dbus/dbus-object.h (enum DBusHandlerResult): rename to
5004         HANDLED/NOT_YET_HANDLED instead of
5005         REMOVE_MESSAGE/ALLOW_MORE_HANDLERS to make it clearer how it 
5006         should be used.
5007
5008 2003-08-10  Havoc Pennington  <hp@pobox.com>
5009
5010         * tools/dbus-send.c (main): add --type argument, for now
5011         supporting only method_call and signal types.
5012
5013         * tools/dbus-print-message.c: print message type
5014
5015         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
5016         init connection->objects
5017
5018         * doc/dbus-specification.sgml: fix sgml
5019
5020         * bus/*.c: port over to object-instance API changes
5021
5022         * test/test-service.c: ditto
5023         
5024         * dbus/dbus-message.c (dbus_message_create_header): allow #NULL
5025         name, we will have to fix up the rest of the code to also handle
5026         this
5027         (dbus_message_new): generic message-creation call
5028         (set_string_field): allow appending name field
5029
5030 2003-08-06  Havoc Pennington  <hp@pobox.com>
5031
5032         * dbus/dbus-object-registry.c: implement signal connection 
5033         and dispatch
5034
5035         * dbus/dbus-connection.c (_dbus_connection_unref_unlocked): new
5036
5037         * dbus/dbus-internals.c (_dbus_memdup): new function
5038
5039 2003-08-02  Havoc Pennington  <hp@pobox.com>
5040
5041         * dbus/dbus-message.c (dbus_message_get_no_reply)
5042         (dbus_message_set_no_reply): add these and remove
5043         set_is_error/get_is_error
5044
5045         * dbus/dbus-protocol.h, doc/dbus-specification.sgml: 
5046         remove the ERROR flag, since there's now an ERROR type
5047
5048 2003-08-01  Havoc Pennington  <hp@pobox.com>
5049
5050         * dbus/dbus-object-registry.c (_dbus_object_registry_handle_and_unlock):
5051         implement
5052
5053         * dbus/dbus-message.c (dbus_message_get_type): new function
5054
5055         * doc/dbus-specification.sgml: add "type" byte to messages
5056
5057 2003-08-01  Havoc Pennington  <hp@pobox.com>
5058
5059         * dbus/dbus-protocol.h (DBUS_MESSAGE_TYPE_*): introduce
5060         a message type enum to distinguish kinds of message
5061         (DBUS_HEADER_FLAG_NO_REPLY_EXPECTED): flag for a message 
5062         that need not be replied to
5063
5064 2003-08-01  Havoc Pennington  <hp@pobox.com>
5065
5066         * dbus/dbus-marshal.c: adapt to DBusObjectID changes
5067         (unpack_8_octets): fix no-64-bit-int bug
5068
5069         * dbus/dbus-object-registry.c (validate_id): validate the 
5070         connection ID bits, not just the instance ID.
5071
5072         * dbus/dbus-connection.c (_dbus_connection_init_id): initialize
5073         the connection-global 33 bits of the object ID
5074
5075         * dbus/dbus-object-registry.c (info_from_entry): fill in 
5076         object ID in the new way
5077
5078         * dbus/dbus-objectid.h: rather than high/low bits, specifically 
5079         define server/client/instance bits.
5080
5081 2003-07-30  Havoc Pennington  <hp@pobox.com>
5082
5083         * dbus/dbus-connection.c (dbus_connection_register_object): fix
5084         build
5085
5086 2003-07-13  Havoc Pennington  <hp@pobox.com>
5087
5088         * dbus/dbus-object.h (struct DBusObjectVTable): add padding
5089         fields to DBusObjectVTable and DBusObjectInfo
5090
5091 2003-07-12  Havoc Pennington  <hp@pobox.com>
5092
5093         * dbus/dbus-object-registry.c: implement unit test,
5094         fix bugs discovered in process
5095
5096         * dbus/dbus-connection.c: remove handler_table and
5097         register_handler(), add DBusObjectRegistry usage
5098
5099         * dbus/dbus-objectid.c (dbus_object_id_is_null)
5100         (dbus_object_id_set_null): new functions
5101
5102 2003-07-08  Havoc Pennington  <hp@pobox.com>
5103
5104         * dbus/dbus-object.c: implement some of this
5105
5106         * dbus/dbus-object-registry.c
5107         (_dbus_object_registry_add_and_unlock): fill in the object_id out
5108         param
5109         (_dbus_object_registry_new): handle OOM
5110
5111 2003-07-08  Havoc Pennington  <hp@pobox.com>
5112
5113         * dbus/dbus-object.h: sketch out an API for registering objects
5114         with a connection, that allows us to use as little as 24 bytes
5115         per object and lets application code represent an object in 
5116         any conceivable way.
5117
5118         * dbus/dbus-object-registry.c: implement the hard bits of the
5119         DBusConnection aspect of object API. Not yet wired up.
5120         
5121 2003-07-06  Havoc Pennington  <hp@pobox.com>
5122
5123         * dbus/dbus-marshal.c (_dbus_marshal_set_object_id): new function
5124         (_dbus_marshal_object_id): new
5125         (_dbus_demarshal_object_id): new
5126         (_dbus_marshal_get_arg_end_pos): support object ID type, and
5127         consolidate identical switch cases. Don't conditionalize handling
5128         of DBUS_TYPE_UINT64, need to handle the type always.
5129         (_dbus_marshal_validate_arg): consolidate identical cases, and
5130         handle DBUS_TYPE_OBJECT_ID
5131
5132         * dbus/dbus-objectid.c: new file with DBusObjectID data type.
5133
5134         * dbus/dbus-protocol.h: add DBUS_TYPE_OBJECT_ID
5135
5136 2003-09-28  Havoc Pennington  <hp@pobox.com>
5137
5138         * real 0.13 release
5139
5140 2003-09-28  Havoc Pennington  <hp@pobox.com>
5141
5142         * doc/Makefile.am (dbus-specification.html): testing a funky hack
5143         to work with Debian db2html
5144
5145 2003-09-28  Havoc Pennington  <hp@pobox.com>
5146
5147         * configure.in: 0.13
5148
5149         * doc/Makefile.am (dbus-test-plan.html): accept nonexistence of
5150         stylesheet-images for benefit of Debian
5151         
5152         Change back to using filesystem-linked sockets for the system
5153         bus, so only root can create the default system bus address.
5154         
5155         * bus/system.conf.in: change to use
5156         DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
5157
5158         * dbus/Makefile.am (INCLUDES): remove DBUS_SYSTEM_BUS_PATH define
5159         from here.
5160
5161         * configure.in: define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
5162         here, and AC_DEFINE DBUS_SYSTEM_PATH
5163
5164 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
5165
5166         * doc/TODO:
5167         * doc/busconfig.dtd:
5168         Add busconfig DTD.
5169         
5170 2003-08-09  Anders Carlsson  <andersca@codefactory.se>
5171
5172         * doc/dbus-specification.sgml:
5173         Add activation reply values.
5174         
5175 2003-08-05  Havoc Pennington  <hp@redhat.com>
5176
5177         * configure.in: 0.12
5178
5179 2003-08-05  Anders Carlsson  <andersca@codefactory.se>
5180
5181         * glib/dbus-gmain.c: (watch_fd_new), (watch_fd_ref),
5182         (watch_fd_unref), (dbus_gsource_check), (dbus_gsource_dispatch),
5183         (add_watch), (remove_watch), (create_source):
5184         Refcount fds, fixes some reentrancy issues.
5185         
5186 2003-07-30  Havoc Pennington  <hp@redhat.com>
5187
5188         * dbus/dbus-bus.c (init_connections_unlocked): fix default system
5189         bus address to be abstract if we have abstract sockets
5190
5191         * NEWS: update
5192
5193 2003-07-28  Havoc Pennington  <hp@redhat.com>
5194
5195         * bus/messagebus.in: fix to avoid processname/servicename 
5196         confusion, from Michael Kearey
5197         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=100965
5198         
5199 2003-07-23  Havoc Pennington  <hp@pobox.com>
5200
5201         * dbus/dbus-message.c (dbus_message_iter_get_named): 
5202         fix from Andy Hanton to remove broken "+1"
5203
5204 2003-07-16  Havoc Pennington  <hp@pobox.com>
5205
5206         * tools/dbus-launch.c (babysit): close stdout/stderr in the
5207         babysitter process, as suggested by Thomas Leonard, so 
5208         an "eval `dbus-launch --exit-with-session`" will actually 
5209         return
5210
5211 2003-07-16  Havoc Pennington  <hp@pobox.com>
5212
5213         * configure.in: print out EXPANDED_* variables in the summary at
5214         the end; clean up the code that computes EXPANDED_ variables and
5215         get the ones using exec_prefix right. Should make things work
5216         when you build without --prefix
5217
5218 2003-06-29  Havoc Pennington  <hp@pobox.com>
5219
5220         * mono/Test.cs (class Test): fire up a main loop and run it
5221
5222         * mono/DBus.cs (DBus): don't g_thread_init since it can only be
5223         done once, the app has to do it
5224
5225 2003-06-26  Havoc Pennington  <hp@pobox.com>
5226
5227         * mono/Connection.cs: set up connection with the glib main loop
5228
5229 2003-07-01  Havoc Pennington  <hp@redhat.com>
5230
5231         * doc/dbus-specification.sgml: clarify the format of a type code,
5232         change suggested by Jim Blandy
5233
5234 2003-06-29  Miloslav Trmac  <mitr@volny.cz>
5235
5236         * doc/Makefile.am:
5237         * tools/Makefile.am: Don't assume srcdir == builddir.
5238
5239         * dbus/dbus-memory.c (dbus_realloc): Don't check guards after shrinking
5240         the allocated block.
5241         (_dbus_memory_test): New function.
5242         * dbus/dbus-test.h: Add _dbus_memory_test ().
5243         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): Call it.
5244
5245         * dbus/dbus-message.c (decode_header_data): Use %.4s instead
5246         of %c%c%c%c.
5247         (dbus_message_new): Remove obsolete @todo.
5248
5249         * dbus/dbus-marshal.c (_dbus_marshal_set_int64)
5250         (_dbus_marshal_set_uint64): Fix comment.
5251
5252         * dbus/dbus-message.c (append_int_field, append_uint_field): Don't
5253         hardcode FIELD_REPLY_SERIAL.
5254
5255         * dbus/dbus-mainloop.c (_dbus_loop_remove_watch)
5256         (_dbus_loop_remove_timeout): Cast function pointers to (void *) for %p
5257
5258         * configure.in: Add -D_POSIX_C_SOURCE=199309L -DBSD_SOURCE to CFLAGS
5259         and disable DBUS_USE_ATOMIC_INT_486 when --enable-ansi is used
5260
5261 2003-06-24  Havoc Pennington  <hp@pobox.com>
5262
5263         * mono/*.cs: Use IntPtr.Zero instead of ((IntPtr) 0)
5264
5265 2003-06-23  Anders Carlsson  <andersca@codefactory.se>
5266
5267         * configure.in:
5268         * gcj/.cvsignore:
5269         * gcj/Hello.java:
5270         * gcj/Makefile.am:
5271         * gcj/TestMessage.java: (TestMessage), (TestMessage.main):
5272         * gcj/org/.cvsignore:
5273         * gcj/org/Makefile.am:
5274         * gcj/org/freedesktop/.cvsignore:
5275         * gcj/org/freedesktop/Makefile.am:
5276         * gcj/org/freedesktop/dbus/.cvsignore:
5277         * gcj/org/freedesktop/dbus/Makefile.am:
5278         * gcj/org/freedesktop/dbus/Message.java: (Message),
5279         (Message.Message):
5280         * gcj/org/freedesktop/dbus/natMessage.cc:
5281         Fix the build system.
5282
5283 2003-06-22  Havoc Pennington  <hp@pobox.com>
5284
5285         * mono/Connection.cs: add more bindings
5286
5287         * dbus/dbus-threads.c (dbus_threads_init): allow calling this
5288         more than once.
5289
5290 2003-06-22  Havoc Pennington  <hp@pobox.com>
5291
5292         * mono/Connection.cs, mono/DBus.cs, mono/Error.cs:
5293         Start wrapping more stuff.
5294
5295 2003-06-22  Havoc Pennington  <hp@pobox.com>
5296
5297         * mono/Message.cs: implement Message.Wrap() that ensures we only
5298         have a single C# wrapper per DBusMessage, assuming it works which
5299         it probably doesn't.
5300
5301         * dbus/dbus-message.c (dbus_message_allocate_data_slot): new
5302         (dbus_message_free_data_slot): new
5303         (dbus_message_set_data): new
5304         (dbus_message_get_data): new
5305
5306 2003-06-22  Havoc Pennington  <hp@pobox.com>
5307
5308         * dbus/dbus-dataslot.c (_dbus_data_slot_allocator_unref)
5309         (_dbus_data_slot_allocator_alloc): rework these to keep a
5310         reference count on each slot and automatically manage a global
5311         slot ID variable passed in by address
5312
5313         * bus/bus.c: convert to new dataslot API
5314
5315         * dbus/dbus-bus.c: convert to new dataslot API
5316
5317         * dbus/dbus-connection.c: convert to new dataslot API
5318
5319         * dbus/dbus-server.c: convert to new dataslot API
5320
5321         * glib/dbus-gmain.c: ditto
5322
5323         * bus/test.c: ditto
5324
5325         * bus/connection.c: ditto
5326
5327 2003-06-22  Anders Carlsson  <andersca@codefactory.se>
5328
5329         * configure.in: Add AM_PROG_GCJ and move AM_PROG_LIBTOOL
5330         after the gcj checks so that the correct configuration tags
5331         will be added to libtool.
5332
5333         * dbus-glib-1.pc.in: No need to specify any includes since
5334         dbus-1.pc.in has those.
5335
5336 2003-06-22  Havoc Pennington  <hp@pobox.com>
5337
5338         * mono/*, gcj/*, configure.in, Makefile.am:
5339         Check in makefiles and subdirs for mono and gcj bindings.
5340         Neither binding actually exists, just trying to get through
5341         all the build and other boring bits.
5342
5343 2003-06-21  Philip Blundell  <philb@gnu.org>
5344
5345         * tools/dbus-monitor.1: Updated.
5346
5347         * tools/dbus-send.1: Likewise.
5348
5349 2003-06-20  Anders Carlsson  <andersca@codefactory.se>
5350
5351         * dbus/dbus-transport-unix.c (unix_handle_watch): Check
5352         for hangup and error after checking read so we won't discard
5353         pending data if both hangup and read are set.
5354
5355 2003-06-19  Philip Blundell  <philb@gnu.org>
5356
5357         * tools/dbus-print-message.c (print_message): Handle BOOLEAN.
5358
5359         * tools/dbus-send.c: Accept both --system and --session.
5360
5361         * tools/dbus-monitor.c: Same here.
5362
5363 2003-06-19  Anders Carlsson  <andersca@codefactory.se>
5364
5365         * glib/dbus-glib.h: Fix so that dbus-glib.h can be used
5366         from C++ (Patch by Miloslav Trmac).
5367
5368 2003-06-15  Joe Shaw  <joe@assbarn.com>
5369
5370         * configure.in: Check for socklen_t.
5371
5372         * dbus/dbus-sysdeps.c: Define socklen_t if it's not defined.
5373
5374         * test/test-segfault.c: Add #include <sys/time.h>
5375
5376         * tools/Makefile.am: Add DBUS_X_CFLAGS to the INCLUDES since
5377         dbus-launch needs it.
5378
5379 2003-06-09  Havoc Pennington  <hp@redhat.com>
5380
5381         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): don't use
5382         SUN_LEN, it breaks abstract socket usage
5383
5384         * dbus/dbus-internals.c (_dbus_verbose_real): only print PID at
5385         starts of lines.
5386
5387 2003-06-04  Havoc Pennington  <hp@pobox.com>
5388
5389         * dbus/dbus-server.c (dbus_server_listen): allow abstract sockets
5390         using unix:abstract=/foo, and when listening in a tmpdir
5391         i.e. unix:tmpdir=/tmp, always use abstract sockets if we can.
5392
5393         * dbus/dbus-transport.c (_dbus_transport_open): support
5394         unix:abstract=/foo
5395
5396         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
5397         support abstract sockets
5398
5399         * dbus/dbus-transport-unix.c
5400         (_dbus_transport_new_for_domain_socket): support abstract sockets
5401
5402         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket): add "abstract"
5403         toggle as an argument, implement abstract namespace support
5404         (_dbus_listen_unix_socket): ditto
5405
5406         * configure.in: add --enable-abstract-sockets and implement
5407         a configure check for autodetection of the right value.
5408
5409 2003-06-01  Havoc Pennington  <hp@pobox.com>
5410
5411         * tools/dbus-cleanup-sockets.c: add utility to clean up sockets
5412         in /tmp (though on Linux this will end up being useless,
5413         when we add abstract namespace support)
5414
5415         * configure.in: define DBUS_SESSION_SOCKET_DIR in addition to
5416         subst'ing it
5417
5418 2003-05-28  Colin Walters  <walters@verbum.org>
5419
5420         * tools/dbus-monitor.c (main): Fix silly typo (s/--session/--system/).
5421
5422 2003-05-18  Anders Carlsson  <andersca@codefactory.se>
5423
5424         * dbus/dbus-message.c (dbus_message_new): Remove @todo.
5425
5426 2003-05-17  Colin Walters  <walters@gnu.org>
5427
5428         * tools/dbus-send.c: Don't exit with an error code if --help was
5429         passed.  Default to using the session bus instead of the system
5430         one.
5431
5432         * tools/dbus-launch.c: Ditto.
5433
5434         * tools/dbus-monitor.c: Ditto.
5435
5436         * tools/dbus-send.1: Update with new arguments.
5437
5438         * tools/dbus-launch.c: Emit code to export variables.  New
5439         arguments -s and -c to specify shell syntax, and a bit of code to
5440         autodetect syntax.  Also, allow specifying a program to run.
5441
5442         * tools/dbus-launch.1: Update with new arguments.
5443
5444         * tools/dbus-send.1: Ditto.
5445
5446         * tools/dbus-monitor.1: Ditto.
5447
5448 2003-05-17  Havoc Pennington  <hp@pobox.com>
5449
5450         * bus/config-parser.c (merge_included): merge in policies from
5451         child configuration file.
5452
5453         * bus/policy.c (bus_policy_merge): function to merge two policies
5454         together
5455
5456 2003-05-16  Havoc Pennington  <hp@redhat.com>
5457
5458         * dbus/dbus-connection.c: disable verbose lock spew
5459
5460         * tools/dbus-send.c: add --print-reply command line option
5461
5462         * tools/dbus-print-message.h (print_message): new util function
5463         shared by dbus-send and dbus-monitor
5464
5465         * tools/dbus-monitor.c (handler_func): exit on disconnect
5466
5467         * dbus/dbus-transport-unix.c (do_reading): if the transport is
5468         disconnected, don't try to use the read_watch
5469
5470         * dbus/dbus-watch.c (dbus_watch_get_enabled): assert watch != NULL
5471         so we can find this bug more easily
5472
5473 2003-05-16  Havoc Pennington  <hp@redhat.com>
5474
5475         * bus/policy.c (free_rule_list_func): avoid a crash when passed
5476         NULL as DBusHashTable is annoyingly likely to do.
5477
5478 2003-05-16  Colin Walters  <walters@verbum.org>
5479
5480         * tools/dbus-monitor.c: Add --session argument and usage()
5481         function.
5482
5483         * tools/dbus-monitor.1: Update with new --session arg.
5484
5485         * bus/Makefile.am (install-data-hook): Create
5486         $(libdir)/dbus-1.0/services so that the session bus is happy.
5487
5488 2003-05-15  Havoc Pennington  <hp@redhat.com>
5489
5490         * dbus/dbus-sysdeps.c (_dbus_atomic_dec, _dbus_atomic_inc): work
5491         on non-x86. ifdef's are evil.
5492
5493 2003-05-15  Havoc Pennington  <hp@redhat.com>
5494
5495         * configure.in: 0.11
5496
5497         * NEWS: update
5498
5499         * bus/Makefile.am (initddir): apparently we are supposed to put
5500         init scripts in /etc/rc.d/init.d not /etc/init.d
5501
5502         * bus/Makefile.am: remove the "you must --enable-tests to make
5503         check" as it broke distcheck
5504
5505         * bus/Makefile.am (install-data-hook): create /etc/dbus-1/system.d
5506
5507 2003-05-13  James Willcox  <jwillcox@gnome.org>
5508
5509         * configure.in:
5510         * bus/activation.c: (bus_activation_service_created),
5511         (bus_activation_activate_service):
5512         * bus/driver.c: (bus_driver_send_service_deleted),
5513         (bus_driver_send_service_created), (bus_driver_send_service_lost),
5514         (bus_driver_send_service_acquired),
5515         (bus_driver_send_welcome_message),
5516         (bus_driver_handle_list_services):
5517         * bus/session.conf.in:
5518         * dbus/dbus-bus.c: (dbus_bus_acquire_service),
5519         (dbus_bus_service_exists), (dbus_bus_activate_service):
5520         * dbus/dbus-bus.h:
5521
5522         Add some convenience API which lets you activate a service, and did a
5523         bunch of s/0/DBUS_TYPE_INVALID/ in calls to dbus_message_append_args()
5524         and dbus_message_get_args()
5525
5526 2003-05-11  Havoc Pennington  <hp@pobox.com>
5527
5528         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix to avoid
5529         calling _dbus_marshal_validate_arg() for every byte in a byte
5530         array, etc.
5531
5532         * dbus/dbus-message-handler.c: use atomic reference counting to
5533         reduce number of locks slightly; the global lock in here sucks
5534
5535         * dbus/dbus-connection.c
5536         (_dbus_connection_update_dispatch_status_and_unlock): variant of
5537         update_dispatch_status that can be called with lock held; then use
5538         in a couple places to reduce locking/unlocking
5539         (dbus_connection_send): hold the lock over the whole function
5540         instead of acquiring it twice.
5541
5542         * dbus/dbus-timeout.c (_dbus_timeout_new): handle OOM
5543
5544         * bus/connection.c (bus_connections_setup_connection): fix access
5545         to already-freed memory.
5546
5547         * dbus/dbus-connection.c: keep a little cache of linked list
5548         nodes, to avoid using the global linked list alloc lock in the
5549         normal send-message case. Instead we just use the connection lock
5550         that we already have to take.
5551
5552         * dbus/dbus-list.c (_dbus_list_find_last): new function
5553
5554         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec):
5555         change to use a struct for the atomic type; fix docs,
5556         they return value before increment, not after increment.
5557
5558         * dbus/dbus-string.c (_dbus_string_append_4_aligned)
5559         (_dbus_string_append_8_aligned): new functions to try to
5560         microoptimize this operation.
5561         (reallocate_for_length): break this out of set_length(), to
5562         improve profile info, and also so we can consider inlining the
5563         set_length() part.
5564
5565         * dbus/dbus-message.c (dbus_message_new_empty_header): init data
5566         strings with some preallocation, cuts down on our calls to realloc
5567         a fair bit. Though if we can get the "move entire string to empty
5568         string" optimization below to kick in here, it would be better.
5569
5570         * dbus/dbus-string.c (_dbus_string_move): just call
5571         _dbus_string_move_len
5572         (_dbus_string_move_len): add a special case for moving
5573         an entire string into an empty string; we can just
5574         swap the string data instead of doing any reallocs.
5575         (_dbus_string_init_preallocated): new function
5576
5577 2003-05-11  Havoc Pennington  <hp@pobox.com>
5578
5579         Write a "test-profile" that does echo client-server with threads;
5580         profile reveals lock contention, memcpy/realloc of buffers, and
5581         UTF-8 validation as hot spots. 20% of lock contention eliminated
5582         with dbus_atomic_inc/dec implementation on x86.  Much remaining
5583         contention is global mempool locks for GList and DBusList.
5584
5585         * dbus/dbus-sysdeps.c (_dbus_atomic_inc, _dbus_atomic_dec): add
5586         x86 implementation
5587
5588         * dbus/dbus-connection.c (struct DBusConnection): use
5589         dbus_atomic_t for the reference count
5590
5591         * dbus/dbus-message.c (struct DBusMessage): declare
5592         dbus_atomic_t values as volatile
5593
5594         * configure.in: code to detect ability to use atomic integer
5595         operations in assembly, from GLib patch
5596
5597         * dbus/dbus-internals.c (_dbus_verbose_real): call getpid every
5598         time, tired of it being wrong in threads and forked processes
5599
5600         * glib/test-profile.c: a little program to bounce messages back
5601         and forth between threads and eat CPU
5602
5603         * dbus/dbus-connection.c: add debug spew macros for debugging
5604         thread locks; include config.h at top; fix deadlock in
5605         dbus_connection_flush()
5606
5607 2003-05-08  Havoc Pennington  <hp@pobox.com>
5608
5609         * dbus/dbus-spawn.c: s/_exit/exit/ because it was keeping gcov
5610         data from getting written, and there wasn't a good reason to
5611         use _exit really.
5612
5613         * test/decode-gcov.c (mark_inside_dbus_build_tests): don't count
5614         dbus_verbose lines in test coverage
5615         (main): add list of functions sorted by # of untested blocks
5616         to the coverage report
5617
5618         * dbus/dbus-mempool.c: put some test-only code in DBUS_BUILD_TESTS
5619
5620         * dbus/dbus-marshal.c (_dbus_marshal_test): extend test coverage
5621
5622         * dbus/dbus-message-handler.c (_dbus_message_handler_test):
5623         extend test coverage
5624
5625         * test/data/auth/cancel.auth-script: test canceling an
5626         authentication
5627
5628         * dbus/Makefile.am: remove dbus-server-debug.[hc] for now, as they
5629         aren't used. in CVS history if we end up needing them.
5630
5631 2003-05-04  Havoc Pennington  <hp@pobox.com>
5632
5633         * dbus/dbus-message-handler.c (_dbus_message_handler_test): add
5634         unit test
5635
5636         * dbus/dbus-marshal.c (_dbus_demarshal_string_array): fix this
5637         function, which assumed length was in # of strings, not bytes
5638
5639         * dbus/dbus-message.c (_dbus_message_test): add tests for some
5640         missing coverage
5641
5642         * dbus/dbus-connection.c
5643         (_dbus_connection_queue_received_message): disable function for
5644         now, we are only using it in test mode
5645
5646         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
5647         remove a mistaken FIXME
5648
5649 2003-05-04  Havoc Pennington  <hp@pobox.com>
5650
5651         * dbus/dbus-connection.c (dbus_connection_preallocate_send):
5652         unlock mutex on successful return, patch from Anders Gustafsson
5653
5654 2003-05-04  Havoc Pennington  <hp@pobox.com>
5655
5656         * dbus-glib-1.pc.in (Requires): fix dependencies, from
5657         Anders Gustafsson
5658
5659 2003-05-04  Havoc Pennington  <hp@pobox.com>
5660
5661         * tools/dbus-launch.c: implement
5662
5663         * bus/main.c (main), bus/bus.c (bus_context_new):
5664         implement --print-pid and --fork
5665
5666 2003-05-03  Havoc Pennington  <hp@redhat.com>
5667
5668         * dbus/dbus-address.c (dbus_parse_address): fix bug when a key in
5669         the address had no value, and add to test suite. Fix and
5670         regression test from Miloslav Trmac
5671
5672 2003-05-03  Havoc Pennington  <hp@pobox.com>
5673
5674         * dbus/dbus-watch.c (dbus_watch_handle): warn and return if a
5675         watch is invalid when handled
5676
5677         * tools/Makefile.am, tools/dbus-launch.c, tools/dbus-launch.1: add
5678         dbus-launch utility to launch the bus from a shell script.  Didn't
5679         actually implement dbus-launch yet, it's just a placeholder still.
5680
5681 2003-05-03  Havoc Pennington  <hp@pobox.com>
5682
5683         * bus/Makefile.am, bus/dbus-daemon-1.1.in: man page for the
5684         daemon; also documents daemon config file, so replaces
5685         doc/config-file.txt. Corrected some stuff from config-file.txt in
5686         the process of moving it.
5687
5688 2003-05-03  Havoc Pennington  <hp@pobox.com>
5689
5690         * tools/Makefile.am, tools/dbus-send.1, tools/dbus-monitor.1:
5691         add some man pages
5692
5693 2003-05-03  Colin Walters  <walters@verbum.org>
5694
5695         * dbus/dbus-sysdeps.c (fill_user_info): Test against
5696         DBUS_UID_UNSET to determine whether to do a uid lookup or not.
5697
5698         * Makefile.am: Update to use new .pc versioning scheme.
5699
5700 2003-05-02  Havoc Pennington  <hp@redhat.com>
5701
5702         * bus/system.conf.in: allow send/receive to/from message bus
5703         service
5704
5705 2003-04-30  Havoc Pennington  <hp@redhat.com>
5706
5707         * configure.in: print a note when building with unit tests and
5708         without assertions
5709
5710 2003-04-30  Havoc Pennington  <hp@redhat.com>
5711
5712         * Makefile.am: add a check-local that complains if you didn't
5713         configure with --enable-tests
5714
5715 2003-04-29  Havoc Pennington  <hp@redhat.com>
5716
5717         * glib/dbus-gmain.c: docs cleanups
5718
5719         * dbus/dbus-types.h: add docs on int64 types
5720
5721         * dbus/dbus-memory.c: fix docs to avoid putting private API in
5722         public API docs section
5723
5724 2003-04-29  Havoc Pennington  <hp@redhat.com>
5725
5726         * dbus-1.pc.in, dbus-glib-1.pc.in: rename these from
5727         dbus-1.0.pc.in, dbus-glib-1.0.pc.in. As these change with the
5728         parallel install API version, not with the D-BUS package version.
5729
5730         * HACKING: move some of README over here
5731
5732         * README: updates, and document API/ABI policy
5733
5734         * configure.in: reindentation
5735
5736 2003-04-29  Havoc Pennington  <hp@redhat.com>
5737
5738         * dbus/dbus.h: add "you have to define DBUS_API_SUBJECT_TO_CHANGE
5739         to use this library" to be sure people have the right
5740         expectations.
5741
5742 2003-04-28  Havoc Pennington  <hp@redhat.com>
5743
5744         * configure.in: add --enable-docs which by default is auto yes if
5745         doxygen and db2html found, no otherwise; but can be forced on/off
5746
5747         * doc/Makefile.am: conditionalize whether to build docs on
5748         --enable-docs
5749
5750 2003-04-28  Havoc Pennington  <hp@redhat.com>
5751
5752         * configure.in: 0.10
5753
5754         * NEWS: update
5755
5756         * bus/system.conf.in: add <includedir>system.d</includedir>
5757
5758         * dbus/dbus-userdb.c (_dbus_user_database_lookup): fix bug when
5759         username was provided but not uid
5760
5761         * bus/config-parser.c (struct BusConfigParser): keep track of
5762         whether the parser is toplevel or was included; change some
5763         of the error handling if it's included.
5764
5765 2003-04-27  Havoc Pennington  <hp@pobox.com>
5766
5767         Unbreak my code...
5768
5769         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
5770         report correct status if we finish processing authentication
5771         inside this function.
5772
5773         * bus/activation.c (try_send_activation_failure): use
5774         bus_transaction_send_error_reply
5775
5776         * bus/connection.c (bus_connection_get_groups): return an error
5777         explaining the problem
5778
5779         * bus/bus.c (bus_context_check_security_policy): implement
5780         restriction here that inactive connections can only send the
5781         hello message. Also, allow bus driver to send anything to
5782         any recipient.
5783
5784         * bus/connection.c (bus_connection_complete): create the
5785         BusClientPolicy here instead of on-demand.
5786         (bus_connection_get_policy): don't return an error
5787
5788         * dbus/dbus-message.c (dbus_message_new_error_reply): allow NULL
5789         sender field in message being replied to
5790
5791         * bus/bus.c (bus_context_check_security_policy): fix silly typo
5792         causing it to return FALSE always
5793
5794         * bus/policy.c (bus_client_policy_check_can_send): fix bug where
5795         we checked sender rather than destination
5796
5797 2003-04-25  Havoc Pennington  <hp@redhat.com>
5798
5799         test suite is slightly hosed at the moment, will fix soon
5800
5801         * bus/connection.c (bus_connections_expire_incomplete): fix to
5802         properly disable the timeout when required
5803         (bus_connection_set_name): check whether we can remove incomplete
5804         connections timeout after we complete each connection.
5805
5806         * dbus/dbus-mainloop.c (check_timeout): fix this up a bit,
5807         probably still broken.
5808
5809         * bus/services.c (bus_registry_acquire_service): implement max
5810         number of services owned, and honor allow/deny rules on which
5811         services a connection can own.
5812
5813         * bus/connection.c (bus_connection_get_policy): report errors here
5814
5815         * bus/activation.c: implement limit on number of pending
5816         activations
5817
5818 2003-04-25  Havoc Pennington  <hp@redhat.com>
5819
5820         * dbus/dbus-transport.c (_dbus_transport_get_unix_user): fix bug
5821         where we used >= 0 instead of != DBUS_UID_UNSET.
5822
5823 2003-04-25  Havoc Pennington  <hp@redhat.com>
5824
5825         * glib/dbus-gmain.c (remove_watch): fix for a crash when watches
5826         were toggled without add/remove, fix from Anders Gustafsson
5827
5828 2003-04-24  Havoc Pennington  <hp@redhat.com>
5829
5830         * test/data/valid-config-files/basic.conf: add <limit> tags to
5831         this test
5832
5833         * bus/config-parser.h, bus/config-parser.c, bus/bus.c: Implement
5834         <limit> tag in configuration file.
5835
5836 2003-04-24  Havoc Pennington  <hp@redhat.com>
5837
5838         * bus/dispatch.c: somehow missed some name_is
5839
5840         * dbus/dbus-timeout.c (_dbus_timeout_set_enabled)
5841         (_dbus_timeout_set_interval): new
5842
5843         * bus/connection.c (bus_connections_setup_connection): record time
5844         when each connection is first set up, and expire them after the
5845         auth timeout passes.
5846
5847 2003-04-24  Havoc Pennington  <hp@redhat.com>
5848
5849         * dbus/dbus-message.c (dbus_message_name_is): rename
5850         (dbus_message_service_is): rename
5851         (dbus_message_sender_is): rename
5852         (dbus_message_get_service): rename
5853
5854 2003-04-24  Havoc Pennington  <hp@redhat.com>
5855
5856         * configure.in: add --enable-checks
5857
5858         * dbus/dbus-message.c (dbus_message_new): reverse name/service arguments
5859
5860         * dbus/dbus-connection.c (dbus_connection_preallocate_send): fix
5861         to use thread locks.
5862         (_dbus_connection_handler_destroyed_locked): move some private
5863         functions into proper docs group
5864
5865         * dbus/dbus-internals.h: add _dbus_return_if_fail,
5866         _dbus_return_val_if_fail
5867
5868         Throughout: use dbus_return_if_fail
5869
5870 2003-04-23  James Willcox  <jwillcox@gnome.org>
5871
5872         * glib/dbus-glib.h:
5873         * glib/dbus-gmain.c: (add_timeout), (wakeup_main), (create_source),
5874         (dbus_connection_setup_with_g_main),
5875         (dbus_server_setup_with_g_main):
5876         * glib/test-dbus-glib.c: (main):
5877         * glib/test-thread-client.c: (main):
5878         * glib/test-thread-server.c: (new_connection_callback), (main):
5879         * tools/dbus-monitor.c: (main):
5880
5881         Added a GMainContext argument to dbus_connection_setup_with_g_main()
5882         and dbus_server_setup_with_g_main().
5883
5884 2003-04-20  Havoc Pennington  <hp@pobox.com>
5885
5886         * doc/dbus-specification.sgml: document the restrictions on
5887         message and service names
5888
5889 2003-04-22  Havoc Pennington  <hp@redhat.com>
5890
5891         * dbus/dbus-message.c, dbus/dbus-marshal.c: add 64-bit integer
5892         support, and do some code cleanups to share more code and
5893         speed up array marshal/demarshal.
5894
5895         * dbus-1.0.pc.in (Cflags): put libdir include file in cflags
5896
5897         * configure.in: generate dbus-arch-deps.h
5898
5899         * dbus/dbus-protocol.h (DBUS_TYPE_INT64, DBUS_TYPE_UINT64): add
5900         64-bit typecodes
5901
5902 2003-04-22  Havoc Pennington  <hp@redhat.com>
5903
5904         * test/data/valid-messages/opposite-endian.message: fix test
5905         to use proper type for rply field
5906
5907         * test/data/invalid-messages: add tests for below validation
5908
5909         * dbus/dbus-message.c (decode_header_data): validate field types,
5910         and validate that named fields are valid names
5911         (decode_name_field): consider messages in the
5912         org.freedesktop.Local. namespace to be invalid.
5913
5914         * dbus/dbus-string.c (_dbus_string_validate_name): new
5915
5916 2003-04-19  Havoc Pennington  <hp@pobox.com>
5917
5918         * bus/driver.c (bus_driver_handle_hello): check limits and
5919         return an error if they are exceeded.
5920
5921         * bus/connection.c: maintain separate lists of active and inactive
5922         connections, and a count of each. Maintain count of completed
5923         connections per user. Implement code to check connection limits.
5924
5925         * dbus/dbus-list.c (_dbus_list_unlink): export
5926
5927         * bus/bus.c (bus_context_check_security_policy): enforce a maximum
5928         number of bytes in the message queue for a connection
5929
5930 2003-04-18  Havoc Pennington  <hp@pobox.com>
5931
5932         * dbus/dbus-auth.c (record_mechanisms): memleak fixes
5933
5934         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): fix some
5935         memleaks
5936
5937         * dbus/dbus-keyring.c (add_new_key): fix a memleak, and
5938         on realloc be sure to update the pointer in the keyring
5939
5940         * dbus/dbus-string.c (_dbus_string_zero): compensate for align
5941         offset to avoid writing to unallocated memory
5942
5943         * dbus/dbus-auth.c (process_rejected): return FALSE if we fail to
5944         try the next mechanism, so we properly handle OOM
5945
5946         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): fix double-free
5947         on OOM.
5948         (_dbus_keyring_new): fix OOM bug
5949         (_dbus_keyring_new_homedir): always set error; impose a maximum
5950         number of keys we'll load from the file, mostly to speed up the
5951         test suite and make its OOM checks more useful, but also for
5952         general sanity.
5953
5954         * dbus/dbus-auth.c (process_error_server): reject authentication
5955         if we get an error from the client
5956         (process_cancel): on cancel, send REJECTED, per the spec
5957         (process_error_client): send CANCEL if we get an error from the
5958         server.
5959
5960 2003-04-18  Havoc Pennington  <hp@pobox.com>
5961
5962         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix UMR in verbose
5963         debug spew
5964
5965         * dbus/dbus-auth.c (handle_client_data_cookie_sha1_mech): fix OOM
5966         handling problem
5967
5968         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): only whine
5969         about DBUS_TEST_HOMEDIR once
5970
5971         * bus/Makefile.am (TESTS_ENVIRONMENT): put DBUS_TEST_HOMEDIR in
5972         the environment
5973
5974         * bus/dispatch.c (bus_dispatch_sha1_test): actually load sha1
5975         config file so we test the right thing
5976
5977         Throughout: assorted docs improvements
5978
5979 2003-04-18  Havoc Pennington  <hp@pobox.com>
5980
5981         * glib/dbus-gmain.c: adapt to watch changes
5982
5983         * bus/bus.c, bus/activation.c, etc.: adjust to watch changes
5984
5985         * dbus/dbus-server.h: remove dbus_server_handle_watch
5986
5987         * dbus/dbus-connection.h: remove dbus_connection_handle_watch
5988
5989         * dbus/dbus-watch.c (dbus_watch_handle): change DBusWatch to work
5990         like DBusTimeout, so we don't need dbus_connection_handle_watch
5991         etc.
5992
5993 2003-04-17  Havoc Pennington  <hp@redhat.com>
5994
5995         * dbus/dbus-userdb.c, dbus/dbus-sysdeps.c: redo all the passwd
5996         database usage so it all goes via the DBusUserDatabase cache.
5997
5998 2003-04-17  Havoc Pennington  <hp@redhat.com>
5999
6000         * dbus/dbus-mainloop.c (_dbus_loop_iterate): fix logic so that if
6001         there was an OOM watch we skipped, we always return TRUE so we
6002         iterate again to have a look at it again. Fixes test suite hang.
6003         Code rearrangement also lets us lose some memset and only iterate
6004         over callbacks once.
6005
6006         * bus/driver.c (bus_driver_handle_message): sense of test for
6007         reply was backward
6008
6009 2003-04-16  Havoc Pennington  <hp@pobox.com>
6010
6011         * doc/dbus-specification.sgml: make spec say serials are unsigned
6012
6013         * dbus/dbus-message.h: change message serials to unsigned
6014
6015         * dbus/dbus-connection.c: adapt to message serials being unsigned
6016
6017 2003-04-15  Havoc Pennington  <hp@pobox.com>
6018
6019         * bus/bus.c: create and keep around a shared DBusUserDatabase
6020         object.
6021
6022         * bus/connection.c (bus_connection_get_groups): don't cache
6023         groups for user in the connection object, since user database
6024         object now does that.
6025
6026 2003-04-16  Havoc Pennington  <hp@redhat.com>
6027
6028         * dbus/dbus-message.c (_dbus_message_add_size_counter): keep a
6029         list of size counters
6030         (_dbus_message_loader_putback_message_link): put back a popped link
6031
6032         * dbus/dbus-connection.c
6033         (dbus_connection_set_max_live_messages_size): rename
6034         max_received_size
6035         (dbus_connection_get_outgoing_size): get size of outgoing
6036         queue
6037         (_dbus_connection_set_connection_counter): remove this cruft
6038
6039 2003-04-14  Havoc Pennington  <hp@redhat.com>
6040
6041         * dbus/dbus-userdb.c: user database abstraction, mostly to get
6042         caching, but at some point we might want to be able to use a
6043         different database.
6044
6045         * bus/dispatch.c (bus_dispatch_sha1_test): add a test that uses
6046         SHA1 conf file to test the sha1 auth mechanism, since the regular
6047         test always uses EXTERNAL when available.
6048
6049         * configure.in,
6050         test/data/valid-config-files/debug-allow-all-sha1.conf.in:
6051         add conf file that requires use of sha1 auth
6052
6053 2003-04-13  Havoc Pennington  <hp@pobox.com>
6054
6055         * tools/dbus-send.c, tools/dbus-monitor.c: two utility programs
6056         from Philip Blundell to send messages and monitor them.
6057
6058 2003-04-13  Havoc Pennington  <hp@pobox.com>
6059
6060         * dbus/dbus-mainloop.c: fix some reentrancy issues by refcounting
6061         callbacks
6062
6063         * test/data/valid-config-files/debug-allow-all.conf.in: allow all
6064         users
6065
6066         * dbus/dbus-transport.c (_dbus_transport_get_dispatch_status):
6067         fix to only recover unused bytes if we're already authenticated
6068         (_dbus_transport_get_is_authenticated): fix to still mark us
6069         authenticated if there are unused bytes.
6070
6071         * bus/dispatch.c: implement security policy checking
6072
6073         * bus/connection.c (bus_transaction_send_from_driver): new
6074
6075         * bus/bus.c (bus_context_check_security_policy): new
6076
6077         * bus/dispatch.c (send_service_nonexistent_error): delete this,
6078         now we just set the DBusError and it gets converted to an error
6079         reply.
6080
6081         * bus/connection.c (allow_user_function): enable code using actual
6082         data from the config file
6083
6084         * bus/policy.c (list_allows_user): handle wildcard rules for
6085         user/group connection perms
6086
6087 2003-04-13  Havoc Pennington  <hp@pobox.com>
6088
6089         * bus/config-parser.c: Load up the BusPolicy and BusPolicyRules
6090
6091         * dbus/dbus-sysdeps.c (_dbus_get_user_id): new function
6092
6093         * bus/policy.c (bus_policy_append_mandatory_rule)
6094         (bus_policy_append_default_rule, bus_policy_append_user_rule)
6095         (bus_policy_append_group_rule): new functions
6096
6097 2003-04-12  Havoc Pennington  <hp@pobox.com>
6098
6099         * bus/config-parser.c (bus_config_parser_new): fix a memleak
6100
6101         * dbus/dbus-sysdeps.c: change DBusCredentials to use longs for
6102         the pid/gid/uid, just for paranoia.
6103
6104         * test/break-loader.c (randomly_do_n_things): find a byte
6105         containing a type code, and randomly change it to a different
6106         type code.
6107
6108 2003-04-12  Havoc Pennington  <hp@pobox.com>
6109
6110         * bus/policy.h: change BusPolicy to be the thing from the config
6111         file, and rename old BusPolicy to BusClientPolicy
6112
6113         * bus/bus.c, bus/connection.c, bus/config-parser.c: change to
6114         match change in how policy works
6115
6116         * dbus/dbus-internals.h: mark assert_not_reached as
6117         __attribute((noreturn))__
6118
6119 2003-04-11  Havoc Pennington  <hp@redhat.com>
6120
6121         * doc/dbus-specification.sgml: fix a spot with the wrong name for
6122         the broadcast service. Use boolean return for ServiceExists.
6123
6124 2003-04-11  Havoc Pennington  <hp@redhat.com>
6125
6126         * configure.in: add another directory to look for qt in.
6127
6128 2003-04-11  Havoc Pennington  <hp@redhat.com>
6129
6130         * AUTHORS: add Colin Walters
6131
6132 2003-04-11  Havoc Pennington  <hp@redhat.com>
6133
6134         * NEWS: update
6135
6136         * configure.in: 0.9
6137
6138 2003-04-11  Havoc Pennington  <hp@redhat.com>
6139
6140         * bus/messagebus.in: remove pid file when stopping the
6141         message bus, since the bus won't have privileges to remove it
6142         itself.
6143
6144 2003-04-11  Havoc Pennington  <hp@redhat.com>
6145
6146         * bus/bus.c (bus_context_new): move credentials change after
6147         creating pidfile
6148
6149 2003-04-11  Havoc Pennington  <hp@pobox.com>
6150
6151         * test/decode-gcov.c: add "below average functions" to the
6152         coverage report, and change how some of the code works.
6153
6154         * bus/test-main.c: bracket some stuff in DBUS_BUILD_TESTS so it's
6155         not in the coverage stats.
6156
6157         * test/test-service.c (main): use _dbus_verbose not fprintf in a
6158         couple places so running the test suite doesn't result in megaspam.
6159
6160 2003-04-11  Havoc Pennington  <hp@pobox.com>
6161
6162         * bus/dispatch.c (check_existent_service_activation): accept a no
6163         memory error in a place we didn't before
6164
6165         * bus/test.c (bus_test_run_everything): remove hacky "do it twice
6166         in case the first one failed," since the test suite is less
6167         broken now.
6168
6169 2003-04-10  Havoc Pennington  <hp@pobox.com>
6170
6171         * bus/dispatch.c (check_segfault_service_activation): add test
6172         for launching an executable that just crashes.
6173
6174         * test/test-segfault.c (main): try setting coredumpsize to 0 so we
6175         don't leave a million cores. We'll see how portable this is.
6176
6177 2003-04-10  Havoc Pennington  <hp@pobox.com>
6178
6179         * dbus/dbus-spawn.c (_dbus_spawn_async_with_babysitter): move all
6180         the possible parent failures before we fork, so that we don't
6181         fail to create a babysitter after creating the child.
6182
6183         * bus/activation.c (bus_activation_activate_service): kill child
6184         if we don't successfully complete the activation.
6185
6186 2003-04-10  Havoc Pennington  <hp@redhat.com>
6187
6188         * dbus/dbus-connection.c (dbus_connection_flush): don't spin on
6189         the connection if it's disconnected
6190
6191         * bus/activation.c (bus_activation_service_created): use new
6192         transaction features to roll back removal of pending activation if
6193         we don't successfully create the service after all. Don't remove
6194         pending activation if the function fails.
6195
6196         * dbus/dbus-list.c (_dbus_list_insert_before_link)
6197         (_dbus_list_insert_after_link): new code to facilitate
6198         services.c fixes
6199
6200         * dbus/dbus-hash.c (_dbus_hash_table_insert_string_preallocated):
6201         new functionality, so we can preallocate the ability to insert
6202         into a hash table.
6203
6204         * bus/connection.c (bus_transaction_add_cancel_hook): new function
6205         allowing us to put custom hooks in a transaction to be used for
6206         cancelling said transaction
6207
6208         * doc/dbus-specification.sgml: add some discussion of secondary
6209         service owners, and disallow zero-length service names
6210
6211         * bus/services.c (bus_registry_acquire_service): new function,
6212         splits out part of bus_driver_handle_acquire_service() and fixes
6213         a bug where we didn't remove the service doing the acquiring
6214         from the secondary queue if we failed to remove the current owner
6215         from the front of the queue.
6216
6217 2003-04-10  Alexander Larsson  <alexl@redhat.com>
6218
6219         * doc/dbus-specification.sgml:
6220         s/org.freedesktop.Broadcast/org.freedesktop.DBus.Broadcast/
6221
6222 2003-04-10  Alexander Larsson  <alexl@redhat.com>
6223
6224         * bus/.cvsignore:
6225         * glib/.cvsignore:
6226         * test/.cvsignore:
6227         Added files to cvsignore
6228
6229         * dbus/dbus-message.h:
6230         * dbus/dbus-message.c: (dbus_message_iter_get_named):
6231         Make get_named() take two out argument and return a boolean.
6232         (dbus_message_iter_get_args_valist):
6233         Update usage of get_named().
6234         (dbus_message_iter_append_byte):
6235         Fix typo
6236         (dbus_message_iter_append_named)
6237         Fix typo
6238         (message_iter_test), (check_message_handling_type), (_dbus_message_test):
6239         More tests.
6240
6241 2003-04-10  Alexander Larsson  <alexl@redhat.com>
6242
6243         * dbus/dbus-marshal.[ch]:
6244         Add array_type_pos argument to _dbus_marshal_validate_arg.
6245         Let you pass a NULL end_pos to _dbus_marshal_validate_type.
6246
6247         * dbus/dbus-message.[ch]:
6248         Multi-dimensional arrays have full type specification in the
6249         outermost array. Iter code re-arranged to handle this.
6250         Added some more iter tests.
6251
6252         * doc/dbus-specification.sgml:
6253         Add me to authors.
6254         Remove old FIXME.
6255         Update new array encoding description.
6256         Correct DBUS_SERVICE_FLAGS_REPLACE_EXISTING description.
6257
6258         * test/data/invalid-messages/array-with-mixed-types.message:
6259         * test/data/valid-messages/array-of-array-of-uint32.message:
6260         Change to the new array format.
6261
6262         * test/data/invalid-messages/too-short-dict.message:
6263         Fix bug in test.
6264
6265         * test/data/valid-messages/recursive-types.message:
6266         Fix up and extend test.
6267
6268 2003-04-10  Havoc Pennington  <hp@pobox.com>
6269
6270         * bus/dispatch.c: lots of fixes
6271
6272         * dbus/dbus-mainloop.c (_dbus_loop_dispatch): export
6273         (_dbus_loop_iterate): remove old "quit if no callbacks" code,
6274         that was crack, broke the test service.
6275
6276         * dbus/dbus-transport.c (_dbus_transport_open): fix error
6277         handling to avoid piling up errors if we get a failure on the
6278         first address.
6279
6280         * dbus/dbus-internals.c (_dbus_real_assert_not_reached): include
6281         pid in assertion failures.
6282
6283         * dbus/dbus-mainloop.c (_dbus_loop_iterate): use static arrays up
6284         to some fixed size of file descriptor array. Don't return TRUE
6285         anytime a timeout exists, that led to lots of busy loop silliness
6286         in the tests.
6287
6288 2003-04-09  Havoc Pennington  <hp@redhat.com>
6289
6290         * dbus/dbus-mainloop.c (check_timeout): fix timeouts, I thought
6291         I'd checked this in earlier but hadn't.
6292
6293 2003-04-09  Havoc Pennington  <hp@redhat.com>
6294
6295         * bus/dispatch.c (bus_dispatch_test): get a bit further through
6296         the activation test (man this is getting old!)
6297
6298 2003-04-09  Havoc Pennington  <hp@redhat.com>
6299
6300         * test/test-utils.c: use dispatch status function to fix this up
6301
6302         * bus/connection.c (connection_watch_callback): don't dispatch
6303         from here
6304         (connection_timeout_callback): don't dispatch from here
6305         (bus_connections_setup_connection): set the dispatch status function
6306         (bus_connection_disconnected): unset it
6307
6308         * dbus/dbus-mainloop.c (_dbus_loop_queue_dispatch): new function
6309         used to add a connection to be dispatched
6310         (_dbus_loop_iterate): do the dispatching at the end of each
6311         iteration
6312
6313         * dbus/dbus-connection.c
6314         (dbus_connection_set_dispatch_status_function): new function
6315         allowing us to fix up main loop usage
6316         (_dbus_connection_last_unref): free all the various function
6317         user data
6318         (dbus_connection_dispatch): call the DispatchStatusFunction
6319         whenever this function returns
6320         (dbus_connection_handle_watch): call DispatchStatusFunction
6321         (dbus_connection_send_with_reply_and_block): call DispatchStatusFunction
6322         (reply_handler_timeout): call DispatchStatusFunction
6323         (dbus_connection_flush): call DispatchStatusFunction
6324
6325 2003-04-09  Havoc Pennington  <hp@redhat.com>
6326
6327         * dbus/dbus-bus.c (dbus_bus_register): fix up error handling and
6328         a memory leak
6329
6330         * bus/dispatch.c (check_service_activated): fix bug in test
6331
6332         * dbus/dbus-mainloop.c (check_timeout): fix this up
6333
6334         * dbus/dbus-internals.c (_dbus_verbose_real): include PID in
6335         verbose output so we can sort out output from different processes,
6336         e.g. in the activation case.
6337
6338 2003-04-08  Colin Walters  <walters@gnu.org>
6339
6340         * bus/bus.c (struct BusContext) [pidfile]: New member, to store
6341         the pid file.
6342         (bus_context_new): Set it.
6343         (bus_context_unref): Use it to delete the pid file.
6344
6345 2003-04-08  Havoc Pennington  <hp@redhat.com>
6346
6347         * test/data/invalid-messages/array-with-mixed-types.message:
6348         regression test that fails for the moment
6349
6350         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): reorder
6351         tests for convenience
6352
6353         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): don't allow
6354         array of nil, it broke things.
6355
6356         * test/data/invalid-messages/array-of-nil.message: regression test
6357
6358         * test/data/valid-messages/array-of-array-of-uint32.message:
6359         happened to write this so added it to suite
6360
6361 2003-04-08  Havoc Pennington  <hp@redhat.com>
6362
6363         * bus/driver.c (bus_driver_handle_acquire_service): init
6364         retval/reply before checking name
6365
6366         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add a
6367         recursion depth argument
6368
6369         * dbus/dbus-message.h (struct DBusMessageIter): put some padding
6370         in the public struct for future extension
6371
6372         * dbus/dbus-message-builder.c (_dbus_message_data_load): fix
6373         typo
6374
6375         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): fix a verbose
6376         message
6377
6378         * doc/dbus-specification.sgml: fix typo
6379
6380 2003-04-08  Alexander Larsson  <alexl@redhat.com>
6381
6382         Implemented recursive types, named types and new-style iters
6383
6384         * bus/driver.c:
6385         * glib/test-thread-client.c: (thread_func):
6386         * glib/test-thread-server.c: (handle_test_message):
6387         * test/test-service.c: (handle_echo):
6388         Update to new api
6389
6390         * dbus/Makefile.am:
6391         * dbus/dbus-dict.c:
6392         * dbus/dbus-dict.h:
6393         * dbus/dbus.h
6394         Remove DBusDict
6395
6396         * dbus/dbus-internals.c: (_dbus_type_to_string):
6397         Update for new types.
6398
6399         * dbus/dbus-marshal.[ch]:
6400         Implement recursive types and the new marshalling format.
6401         Remove hardcoded dict marshalling.
6402         Marshal named types.
6403
6404         * dbus/dbus-message-builder.c:
6405         Add BYTE_ARRAY.
6406         Remove references to old types
6407
6408         * dbus/dbus-message.[ch]:
6409         New non-refcounted iter API that supports recursive iters.
6410         Use iters for appending, including support for recursive
6411         iters.
6412         Add byte and named type support.
6413         Update everything to new marshalling formats.
6414         Add tests for new API.
6415
6416         * dbus/dbus-protocol.h:
6417         Remove old array types.
6418         Add types: BYTE, ARRAY, DICT, NAMED
6419
6420         * dbus/dbus-string.c:
6421         * dbus/dbus-sysdeps.c:
6422         Make parse_double locale safe.
6423
6424         * dbus/dbus-test-main.c:
6425         Call setlocale.
6426
6427         * dbus/dbus-test.c:
6428         Kill dict test
6429
6430         * doc/dbus-specification.sgml:
6431         Update spec
6432
6433         * test/data/incomplete-messages/missing-body.message:
6434         * test/data/invalid-messages/bad-boolean.message:
6435         * test/data/invalid-messages/bad-boolean-array.message:
6436         * test/data/invalid-messages/boolean-array-length-too-long.message-raw:
6437         * test/data/invalid-messages/boolean-has-no-value.message-raw:
6438         * test/data/invalid-messages/too-short-dict.message:
6439         * test/data/valid-messages/dict-simple.message:
6440         * test/data/valid-messages/dict.message:
6441         * test/data/valid-messages/emptiness.message:
6442         * test/data/valid-messages/lots-of-arguments.message:
6443         * test/data/valid-messages/no-padding.message:
6444         * test/data/valid-messages/recursive-types.message:
6445         Add missing NAME fields
6446         Fix up dicts & arrays
6447
6448         * test/data/invalid-messages/dict-with-nil-value.message:
6449         Removed, this is not invalid anymore.
6450
6451         * test/data/valid-messages/recursive-types.message:
6452         Add new test for deeply recursive types.
6453
6454 2003-04-07  Havoc Pennington  <hp@pobox.com>
6455
6456         * bus/driver.c (bus_driver_handle_acquire_service): return an
6457         error if you try to acquire a service that starts with ':'
6458
6459 2003-04-07  Havoc Pennington  <hp@redhat.com>
6460
6461         * doc/dbus-specification.sgml: require that base service names
6462         start with ':' and that the base service is created/deleted
6463         as first and last things a connection does on the bus
6464
6465         * bus/dispatch.c (check_existent_service_activation): lots more
6466         work on the activation test; it doesn't fully pass yet...
6467
6468         * test/test-service.c (main): fix so we don't memleak the
6469         connection to the message bus
6470         (filter_func): accept a message asking us to exit
6471
6472 2003-04-06  Havoc Pennington  <hp@pobox.com>
6473
6474         * qt/Makefile.am (dbusinclude_HEADERS): install dbus-qt.h,
6475         from Colin Walters
6476
6477         * configure.in: fixes to Qt detection from Colin Walters
6478
6479         * doc/Makefile.am: Only remove generated docbook dirs if they
6480         exist, from Colin Walters
6481
6482         * dbus/dbus-bus.c: change how we set well-known connections to
6483         NULL, so that it works if a single connection is stored in
6484         two well-known array slots.
6485
6486         * test/Makefile.am: remove a lot of stuff that isn't immediately
6487         useful, it's in CVS history if we want it.
6488
6489         * test/test-service.c: use dbus-mainloop instead of that
6490         watch.[hc] crack
6491
6492 2003-04-06  Havoc Pennington  <hp@pobox.com>
6493
6494         * dbus/Makefile.am: split lists of sources into stuff that goes in
6495         the library, util functions that go in the lib and are also used
6496         elsewhere, and util functions that are used in tests/daemon but
6497         don't go in the lib.
6498
6499         * dbus/dbus-mainloop.h, dbus/dbus-mainloop.c: move bus/loop.[hc]
6500         here so it can be used in test binaries also
6501
6502 2003-04-06  Havoc Pennington  <hp@pobox.com>
6503
6504         * dbus/dbus-sysdeps.c (_dbus_become_daemon): write the pidfile
6505         here in the parent process, so we can return an error if it
6506         fails. Also, move some of the code into the child so the parent
6507         is less hosed if we fail midway through.
6508
6509         * bus/bus.c (bus_context_new): move pidfile detection further up
6510         in the function, before we start overwriting sockets and such.
6511
6512         * bus/messagebus.in: adjust this a bit, not sure if it will work.
6513
6514         * configure.in: add --with-system-pid-file and --with-system-socket
6515
6516 2003-04-06  Colin Walters  <walters@verbum.org>
6517
6518         * configure.in (DBUS_SYSTEM_PID_FILE): New variable.
6519
6520         * bus/system.conf.in: Declare a pidfile.
6521
6522         * bus/bus.c (bus_context_new): Test for an existing pid file, and
6523         create one (if appropriate).
6524
6525         * bus/config-parser.c (enum ElementType) [ELEMENT_PIDFILE]: New.
6526         (struct BusConfigParser) [pidfile]: New.
6527         (element_type_to_name, merge_included, start_busconfig_child)
6528         (bus_config_parser_end_element, bus_config_parser_content): Handle it.
6529         (bus_config_parser_unref): Free it.
6530         (bus_config_parser_get_pidfile): New function.
6531
6532         * bus/config-parser.h (_dbus_write_pid_file): Prototype.
6533
6534         * dbus/dbus-errors.h (DBUS_ERROR_PIDFILE_EXISTS): New error.
6535
6536         * dbus/dbus-sysdeps.c (_dbus_write_pid_file): New function.
6537
6538         * dbus/dbus-sysdeps.h: Prototype it.
6539
6540 2003-04-06  Havoc Pennington  <hp@pobox.com>
6541
6542         * bus/bus.c (bus_context_new): print the address in here, rather
6543         than in main(), because we need to do it before forking the daemon
6544
6545         * bus/dispatch.c (send_service_nonexistent_error): set the sender
6546         on the service nonexistent error
6547
6548         * bus/driver.c (bus_driver_handle_acquire_service): set the
6549         sender on the AcquireService reply
6550
6551         * test/data/valid-config-files/debug-allow-all.conf.in: Make test
6552         server also listen on a UNIX socket so services can connect to it.
6553
6554 2003-04-06  Havoc Pennington  <hp@pobox.com>
6555
6556         * dbus/dbus-threads.c: Redo how the fake debug mutexes are done
6557         so it detects deadlocks and also we actually init threads when
6558         debugging.
6559
6560 2003-04-06  Havoc Pennington  <hp@pobox.com>
6561
6562         * dbus/dbus-server-unix.c (_dbus_server_new_for_domain_socket):
6563         save the domain socket name, and unlink it when we disconnect the
6564         server. Means that at least when we exit normally, we won't leave
6565         a bunch of junk in /tmp
6566
6567         * dbus/dbus-transport-unix.c
6568         (_dbus_transport_new_for_domain_socket): code cleanup (nicer
6569         memory management). (I was making a real change here but then
6570         didn't)
6571
6572 2003-04-06  Havoc Pennington  <hp@pobox.com>
6573
6574         * bus/bus.c (bus_context_new): fix wrong handling of
6575         server_data_slot_unref() in the error case.
6576
6577         * dbus/dbus-internals.h (_dbus_assert): change so it passes
6578         "(condition) != 0" to _dbus_real_assert so that
6579         "_dbus_assert (pointer)" doesn't cause a warning
6580
6581         * bus/main.c (main): accept --print-address option to print out
6582         the message bus address
6583
6584         * dbus/dbus-sysdeps.c (_dbus_generate_random_ascii): export this
6585
6586         * dbus/dbus-transport.c (_dbus_transport_open): special error for
6587         "tmpdir" option to unix: address on client side
6588
6589         * dbus/dbus-server.c (dbus_server_listen): handle "tmpdir" option
6590         to unix: address
6591
6592         * configure.in (TEST_SOCKET_DIR): locate a temporary directory
6593         we can use to create sockets in the test suite.
6594
6595         * bus/main.c (signal_handler): on SIGTERM, exit the daemon
6596         cleanly. To be used for testing.
6597
6598         * dbus/dbus-spawn.c (babysit): use _dbus_set_signal_handler()
6599
6600         * dbus/dbus-sysdeps.c (_dbus_set_signal_handler): new
6601
6602         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
6603         handle trying to call this when there's no servers active
6604
6605 2003-04-05  Havoc Pennington  <hp@pobox.com>
6606
6607         * NEWS: update
6608
6609         * configure.in: 0.8
6610
6611 2003-04-05  Havoc Pennington  <hp@pobox.com>
6612
6613         * bus/bus.c (setup_server): fix this so dbus-daemon-1 doesn't
6614         crash on startup. Need to get "try starting the daemon"
6615         in the test suite I guess. ;-)
6616
6617         * dbus/dbus-server.h, dbus/dbus-server.c: remove the stuff that
6618         tracked the number of open connections; it's better done in
6619         application-specific code as you want it to span all servers etc.
6620
6621 2003-04-05  Havoc Pennington  <hp@pobox.com>
6622
6623         * bus/Makefile.am (install-data-hook): add missing DESTDIR,
6624         patch from Colin Walters
6625
6626 2003-04-05  Havoc Pennington  <hp@pobox.com>
6627
6628         * doc/config-file.txt (Elements): fix docs of <auth> to reflect
6629         reality; in fact multiple mechanisms are allowed.
6630
6631         * dbus/dbus-internals.c (_dbus_real_assert)
6632         (_dbus_real_assert_not_reached): move guts of _dbus_assert() and
6633         _dbus_assert_not_reached() into functions, so that they don't show
6634         up in basic block counts for test coverage, and don't use up as
6635         much disk space. Does mean slower execution speed though, so
6636         assumes --disable-asserts is the normal production case.
6637
6638 2003-04-05  Havoc Pennington  <hp@pobox.com>
6639
6640         * test/Makefile.am (dist-hook): also dist *.in files
6641
6642         * NEWS: update
6643
6644         * configure.in: 0.7
6645
6646 2003-04-05  Havoc Pennington  <hp@pobox.com>
6647
6648         * dbus/dbus-string.c: docs warning
6649
6650         * dbus/dbus-spawn.c: missing docs
6651
6652         * dbus/dbus-memory.c (struct ShutdownClosure): missing docs
6653
6654 2003-04-05  Havoc Pennington  <hp@pobox.com>
6655
6656         * bus/loop.c (bus_loop_iterate): fix the timeout code, using
6657         magic from GLib
6658
6659         * dbus/dbus-spawn.c (_dbus_babysitter_unref): set sitter_pid
6660         to -1 once we've reaped the babysitter
6661         (_dbus_babysitter_handle_watch): do as much work as we can, not
6662         just one go of it
6663
6664         * bus/activation.c: add code using DBusBabysitter so that we
6665         handle it when a service fails to start up properly.
6666         (bus_activation_service_created): don't remove the activation
6667         entries as we go, just let them get removed when we free the pending
6668         activation. Unref reply messages after sending them.
6669
6670 2003-04-05  Havoc Pennington  <hp@pobox.com>
6671
6672         * test/decode-gcov.c (main): print per-directory stats in the report
6673
6674         * Makefile.am (coverage-report.txt): don't include test/* in gcov stats
6675
6676 2003-04-05  Havoc Pennington  <hp@pobox.com>
6677
6678         * Makefile.am (coverage-report.txt): add target "coverage-report.txt"
6679
6680         * test/decode-gcov.c: hack up a little program to suck data
6681         out of gcov files. Yes this is sort of silly.
6682
6683         * configure.in: define something in config.h and do an
6684         AM_CONDITIONAL when gcov is enabled
6685
6686 2003-04-04  Havoc Pennington  <hp@redhat.com>
6687
6688         * dbus/dbus-spawn.c, dbus/dbus-spawn.h: Change dbus_spawn to
6689         return a "babysitter" object that is used to monitor the status of
6690         the spawned process and reap it when required.
6691
6692         * test/test-segfault.c, test/test-exit.c,
6693         test/test-sleep-forever.c: binaries that do various lame things,
6694         used in the test suite.
6695
6696         * dbus/dbus-sysdeps.c: kill _dbus_errno_to_string()
6697
6698 2003-04-03  Havoc Pennington  <hp@pobox.com>
6699
6700         * dbus/dbus-spawn.c: Move dbus-spawn into a separate file
6701         in preparation for modifying it, dbus-sysdeps is getting
6702         a bit unmanageable.
6703
6704 2003-04-03  Havoc Pennington  <hp@redhat.com>
6705
6706         * bus/loop.h, bus/loop.c: make the mainloop an object so we can
6707         have multiple ones
6708
6709         * bus/*.[hc]: adapt to mainloop change
6710
6711 2003-04-03  Havoc Pennington  <hp@redhat.com>
6712
6713         * bus/activation.c (load_directory): fix up memleaks
6714         (bus_activation_entry_free): free the entry
6715
6716         * dbus/dbus-bus.c (dbus_bus_acquire_service): return an error if
6717         we get one from the message bus; fix memleaks.
6718
6719         * dbus/dbus-message.c (dbus_set_error_from_message): new function
6720
6721 2003-04-03  Havoc Pennington  <hp@pobox.com>
6722
6723         * bus/config-parser.c (bus_config_parser_unref): free
6724         list of mechanisms, bug discovered by test suite enhancements
6725         (putting system.conf and session.conf into suite)
6726
6727         * test/Makefile.am, test/test-service.c: add placeholder for a
6728         test service that we'll activate as part of test suite. Doesn't
6729         do anything yet.
6730
6731         * dbus/dbus-sysdeps.c (_dbus_setenv): support unsetenv by
6732         setting NULL value, and use system malloc not dbus_malloc()
6733         when we have unavoidable memleakage.
6734
6735         * dbus/dbus-bus.c (dbus_bus_get): fix bug where bus type of 0
6736         didn't work, and support DBUS_BUS_ACTIVATION.
6737
6738         * bus/activation.c (child_setup): pass our well-known bus type to
6739         the child
6740
6741         * bus/config-parser.c: support <type> to specify well-known type
6742
6743         * doc/dbus-specification.sgml: document the env variables to
6744         locate well-known buses and find service activator
6745
6746 2003-04-02  Havoc Pennington  <hp@redhat.com>
6747
6748         * test/Makefile.am (all-local): add a rule to copy tests to
6749         builddir, so we can have generated tests. Use this to remove the
6750         silly hack for testing system.conf and session.conf. Will use this
6751         shortly to generate .service files pointing to test binaries.
6752
6753 2003-04-02  Havoc Pennington  <hp@redhat.com>
6754
6755         * dbus/dbus-string.c (set_length): fix a bug - we allocated max of
6756         current alloc and needed new length, not max of the doubled
6757         allocation and needed new length. Also, when building tests,
6758         don't do the double-allocation stuff, just realloc every time.
6759
6760 2003-04-02  Havoc Pennington  <hp@redhat.com>
6761
6762         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): include filenames
6763         in error messages
6764         (_dbus_string_get_dirname): new
6765         (_dbus_sysdeps_test): new
6766         (_dbus_directory_open): include dirnames in error messages
6767
6768         * bus/config-parser.c: interpret <include> and <includedir> and
6769         <servicedir> relative to config file location if the given
6770         filename is not absolute.
6771
6772         * dbus/dbus-string.c (_dbus_string_find_byte_backward): new
6773
6774 2003-04-02  Havoc Pennington  <hp@redhat.com>
6775
6776         * bus/connection.c (bus_transaction_send_error_reply): set sender
6777         service for the error, and unref the reply on success
6778
6779         * bus/activation.c: convert to use BusTransaction so OOM can be
6780         handled correctly
6781         (bus_activation_service_created): set sender of the message
6782
6783 2003-04-01  Havoc Pennington  <hp@redhat.com>
6784
6785         * bus/config-parser.c, bus/bus.c: implement <servicedir> and
6786         <includedir> (at least mostly)
6787
6788         * dbus/dbus-sysdeps.c (_dbus_change_identity): set the group ID
6789         first, then the user ID
6790
6791 2003-04-01  Havoc Pennington  <hp@pobox.com>
6792
6793         * dbus/dbus-server.c (dbus_server_set_auth_mechanisms): new
6794         function
6795
6796         * dbus/dbus-auth.c (_dbus_auth_set_mechanisms): new
6797
6798         * dbus/dbus-internals.c (_dbus_dup_string_array): new function
6799
6800         * dbus/dbus-sysdeps.c (_dbus_listen_unix_socket): chmod the
6801         socket 0777, and unlink any existing socket.
6802
6803         * bus/bus.c (bus_context_new): change our UID/GID and fork if
6804         the configuration file so specifies; set up auth mechanism
6805         restrictions
6806
6807         * bus/config-parser.c (bus_config_parser_content): add support
6808         for <fork> option and fill in code for <auth>
6809
6810         * bus/system.conf.in: add <fork/> to default configuration,
6811         and limit auth mechanisms to EXTERNAL
6812
6813         * doc/config-file.txt (Elements): add <fork>
6814
6815         * dbus/dbus-sysdeps.c (_dbus_become_daemon): new function
6816         (_dbus_change_identity): new function
6817
6818 2003-03-31  Havoc Pennington  <hp@redhat.com>
6819
6820         * dbus/dbus-sysdeps.c (_dbus_connect_unix_socket)
6821         (_dbus_listen_unix_socket): fix off-by-one error in null
6822         termination spotted by Nalin
6823
6824 2003-03-31  Havoc Pennington  <hp@redhat.com>
6825
6826         * dbus/dbus-keyring.c (_dbus_keyring_new_homedir): allow setting
6827         DBUS_TEST_HOMEDIR when tests are enabled, so we can test without
6828         having a real home directory available.
6829
6830 2003-03-31  Havoc Pennington  <hp@redhat.com>
6831
6832         * bus/Makefile.am (install-data-hook): create /var/run/dbus
6833
6834         * bus/messagebus.in: add init script for Red Hat /etc/init.d
6835
6836         * configure.in: add support for specifying a style of init script
6837         to install
6838
6839 2003-03-31  Havoc Pennington  <hp@redhat.com>
6840
6841         Fix some annoying DBusString API and fix all affected code.
6842
6843         * dbus/dbus-string.c (_dbus_string_init): get rid of annoying
6844         max_length argument
6845         (_dbus_string_get_data): change to return string instead of using
6846         an out param
6847         (_dbus_string_get_const_data): ditto
6848         (_dbus_string_get_data_len): ditto
6849         (_dbus_string_get_const_data_len): ditto
6850
6851 2003-03-31  Havoc Pennington  <hp@redhat.com>
6852
6853         * bus/main.c (main): fix up the command line arguments to be nicer
6854
6855 2003-03-31  Havoc Pennington  <hp@redhat.com>
6856
6857         * dbus/Makefile.am (INCLUDES): use EXPANDED_LOCALSTATEDIR to
6858         define DBUS_SYSTEM_BUS_PATH as we want to compile in the same
6859         final location that lands in the config file
6860
6861         * bus/config-loader-expat.c (bus_config_load): fix type of
6862         XML_Parser variable
6863
6864         * doc/TODO: remove TODO item for dbus_bus_get()
6865
6866         * dbus/dbus-bus.c (bus_data_free): add missing lock/unlock
6867
6868 2003-03-31  Havoc Pennington  <hp@pobox.com>
6869
6870         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_domain_socket)
6871         (_dbus_transport_new_for_tcp_socket): these didn't need the "server"
6872         argument since they are always client side
6873
6874         * dbus/dbus-server.c (dbus_server_get_address): new function
6875
6876         * bus/main.c (main): take the configuration file as an argument.
6877
6878         * test/data/valid-config-files/debug-allow-all.conf: new file to
6879         use with dispatch.c tests for example
6880
6881         * bus/test-main.c (main): require test data dir
6882
6883         * bus/bus.c (bus_context_new): change this to take a
6884         configuration file name as argument
6885
6886         * doc/config-file.txt (Elements): add <servicedir>
6887
6888         * bus/system.conf, bus/session.conf: new files
6889
6890         * dbus/dbus-bus.c (dbus_bus_get): look for system bus on
6891         well-known socket if none set
6892
6893         * configure.in: create system.conf and session.conf
6894
6895 2003-03-30  Havoc Pennington  <hp@pobox.com>
6896
6897         * bus/config-parser.c: hacking
6898
6899         * dbus/dbus-memory.c: don't use DBusList for the list of stuff
6900         to shut down, since it could cause weirdness with the DBusList
6901         lock
6902
6903         * dbus/dbus-list.c (_dbus_list_test): add tests for the
6904         link-oriented stack routines
6905         (alloc_link): free the mempool if the first alloc from it fails
6906
6907         * dbus/dbus-mempool.c (struct DBusMemBlock): fix alignment issue
6908
6909         * dbus/dbus-string.c (UNICODE_VALID): sync new version of this
6910         from GLib
6911         (_dbus_string_skip_white): new
6912
6913         * doc/config-file.txt (Elements): add <includedir>
6914
6915 2003-03-28  Havoc Pennington  <hp@pobox.com>
6916
6917         * dbus/dbus-string.c (_dbus_string_copy_data_len)
6918         (_dbus_string_copy_data): new functions
6919
6920 2003-03-28  Anders Carlsson  <andersca@codefactory.se>
6921
6922         * dbus/dbus-bus.c: (bus_data_free), (dbus_bus_get):
6923         * dbus/dbus-bus.h:
6924         Add dbus_bus_get.
6925
6926         * dbus/dbus-memory.c:
6927         Fix a doc comment.
6928
6929 2003-03-28  Havoc Pennington  <hp@pobox.com>
6930
6931         * bus/test.c (bus_test_flush_bus): remove the sleep from here,
6932         I think it may have just been superstition. Not sure.
6933
6934         * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM
6935         failures that were not being handled.
6936
6937         * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling
6938
6939         * dbus/dbus-memory.c: add ability to set number of mallocs in a
6940         row that will fail on out-of-memory.
6941
6942         * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience
6943         function for testing out-of-memory handling.
6944
6945         * bus/config-loader-expat.c (memsuite): don't wrap the dbus
6946         allocation functions, they do map exactly to the expat ones.
6947
6948 2003-03-27  Havoc Pennington  <hp@redhat.com>
6949
6950         * bus/config-loader-libxml.c (bus_config_load): add another error
6951         check
6952
6953 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
6954
6955         * doc/TODO:
6956         Add note about automatic service activation.
6957
6958         * doc/dbus-specification.sgml:
6959         Rename the specification and clarify a few things.
6960
6961 2003-03-26  Anders Carlsson  <andersca@codefactory.se>
6962
6963         * Doxyfile.in:
6964         * dbus/dbus-address.c:
6965         * dbus/dbus-dict.c:
6966         * dbus/dbus-marshal.c:
6967         * dbus/dbus-server-debug-pipe.c:
6968         * dbus/dbus-transport-unix.c:
6969         Fix documentation warnings.
6970
6971 2003-03-26  Havoc Pennington  <hp@pobox.com>
6972
6973         * bus/test-main.c, dbus/dbus-test.c (main): check memleaks
6974         after every test so it's quick and easy to see which leaked, and
6975         so we test multiple dbus_shutdown() calls
6976
6977         * configure.in: change configure.in XML stuff to also support
6978         expat
6979
6980         * config-loader-libxml.c: some hacking
6981
6982         * config-loader-expat.c: some hacking
6983
6984         * config-parser.c: some hacking, plus tests
6985
6986 2003-03-25  Havoc Pennington  <hp@redhat.com>
6987
6988         * throughout - add more _DBUS_ASSERT_ERROR_IS_CLEAR
6989
6990         * configure.in: add --with-xml option to specify XML library,
6991         right now only libxml is supported.
6992
6993         * bus/config-loader-libxml.c, config-parser.c: sync some minor
6994         nonworking code between home and work, still just stubs
6995
6996 2003-03-24  Havoc Pennington  <hp@redhat.com>
6997
6998         * dbus/dbus-sysdeps.c (_dbus_set_fd_nonblocking): move to this
6999         file
7000
7001         * dbus/dbus-errors.c (dbus_set_error, dbus_set_error_const): allow
7002         NULL argument for "message" if the error is a well-known one,
7003         fill in a generic message in this case.
7004
7005         * dbus/dbus-errors.h (DBusResultCode): Kill DBusResultCode in
7006         favor of DBusError
7007
7008         * bus/test.c (bus_test_flush_bus): add
7009
7010         * bus/policy.c (bus_policy_test): test code stub
7011
7012 2003-03-24  Havoc Pennington  <hp@pobox.com>
7013
7014         * bus/connection.c (bus_connections_setup_connection): set up
7015         the "can this user connect" function, but it always returns
7016         TRUE until we have a config file parser so we can have a config
7017         file that allows connections.
7018
7019 2003-03-23  Havoc Pennington  <hp@pobox.com>
7020
7021         * dbus/dbus-threads.c (dbus_mutex_new, dbus_condvar_new): with
7022         DBUS_BUILD_TESTS, actually alloc/free a block of memory for
7023         the mutex, so we can check for proper memory management
7024         and OOM handling.
7025
7026         * dbus/dbus-dataslot.c: remove the mutex from
7027         DBusDataSlotAllocator and lock it manually when using it,
7028         to simplify fitting it into the global slots framework.
7029
7030         * dbus/dbus-threads.c (init_static_locks): rework how we're
7031         handling global locks so they are easily shut down.
7032
7033         * bus/policy.c (bus_policy_append_rule): fix
7034
7035         * bus/test-main.c (main): check for memleaks
7036
7037         * dbus/dbus-test.c (dbus_internal_do_not_use_run_tests): make
7038         test suite check for memleaks
7039
7040         * dbus/dbus-memory.c: add support in test mode for tracking
7041         number of outstanding blocks
7042
7043 2003-03-23  Havoc Pennington  <hp@pobox.com>
7044
7045         * bus/policy.c, bus/bus.c, bus/connection.c: implement allow/deny
7046         policies code
7047
7048         * dbus/dbus-hash.h: add ULONG hash keys
7049
7050         * dbus/dbus-sysdeps.c (_dbus_get_groups): new
7051         (_dbus_get_group_id): new function
7052
7053 2003-03-20  Havoc Pennington  <hp@redhat.com>
7054
7055         * dbus/dbus-connection.c (dbus_connection_set_unix_user_function):
7056         new function
7057         (dbus_connection_get_unix_user): new function
7058
7059 2003-03-20  Havoc Pennington  <hp@pobox.com>
7060
7061         * bus/connection.c (bus_connection_send_oom_error): assert that
7062         message has a sender
7063         (connection_execute_transaction): ditto
7064         (bus_connection_preallocate_oom_error): fix to set the sender, and
7065         set recipient to the destination service, not the bus driver
7066
7067         * bus/policy.c: hacking
7068
7069         * dbus/dbus-message.c (dbus_message_service_is): new function
7070         (dbus_message_sender_is): new
7071
7072 2003-03-19  Havoc Pennington  <hp@redhat.com>
7073
7074         * bus/policy.c: start sketching code for policy restrictions on
7075         what connections can do.
7076
7077 2003-03-18  Havoc Pennington  <hp@redhat.com>
7078
7079         * doc/TODO: some notes on high-level todo items. Little nitpick
7080         stuff is all in @todo, so no need to add it here.
7081
7082         * doc/config-file.txt: some notes on how config file might look
7083
7084 2003-03-18  Anders Carlsson  <andersca@codefactory.se>
7085
7086         * configure.in: 0.6
7087
7088         * NEWS: Update.
7089
7090 2003-03-17  Havoc Pennington  <hp@redhat.com>
7091
7092         * dbus/dbus-internals.h: add gcc attributes so that
7093         our printf-style functions warn on bad arguments to
7094         format
7095
7096         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): fix printf
7097         format bug
7098
7099         * dbus/dbus-message.c (_dbus_message_loader_queue_messages): fix
7100         printf format bug
7101
7102 2003-03-17  Havoc Pennington  <hp@redhat.com>
7103
7104         * bus/test-main.c (main): make it print something as it runs
7105         so make check doesn't look stuck
7106
7107         * doc/negotiation.txt, doc/dbus-sasl-profile.txt: remove
7108         from CVS, now obsolete
7109
7110 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
7111
7112         * bus/dispatch.c: (bus_dispatch):
7113         Refetch the service name since it may have been reallocated
7114         when dbus_message_set_sender was called.
7115
7116         * dbus/dbus-sysdeps.c: (_dbus_accept):
7117         Add address and address length variables and use them to stop
7118         valgrind from complaining.
7119
7120 2003-03-17  Havoc Pennington  <hp@pobox.com>
7121
7122         All tests pass, no memleaks, no valgrind complaints.
7123
7124         * bus/test.c: refcount handler_slot
7125
7126         * bus/connection.c (bus_connections_new): refcount
7127         connection_data_slot
7128
7129         * dbus/dbus-auth-script.c (_dbus_auth_script_run): delete unused
7130         bytes so that auth scripts pass.
7131
7132         * bus/dispatch.c: init message_handler_slot so it gets allocated
7133         properly
7134
7135         * bus/dispatch.c (message_handler_slot_ref): fix memleak
7136
7137         * dbus/dbus-server-debug-pipe.c (_dbus_server_debug_pipe_new):
7138         dealloc server_pipe_hash when no longer used for benefit of
7139         leak checking
7140
7141         * dbus/dbus-auth.c (process_command): memleak fix
7142
7143         * bus/dispatch.c (check_hello_message): memleak fix
7144
7145 2003-03-16  Havoc Pennington  <hp@pobox.com>
7146
7147         * dbus/dbus-bus.c (ensure_bus_data): fix double-unref of the data slot
7148
7149 2003-03-17  Anders Carlsson  <andersca@codefactory.se>
7150
7151         * bus/activation.c (bus_activation_activate_service): Append
7152         the pending activation entry to the list of pending activations.
7153
7154 2003-03-16  Havoc Pennington  <hp@pobox.com>
7155
7156         * bus/dispatch.c (bus_dispatch_test): remove double-unrefs of
7157         connections
7158
7159         * dbus/dbus-address.c (create_entry): fix OOM handling when
7160         failing to alloc entry->method
7161
7162 2003-03-16  Havoc Pennington  <hp@pobox.com>
7163
7164         * dbus/dbus-watch.c (_dbus_watch_new): handle failure to malloc
7165         the watch
7166
7167         * dbus/dbus-server-debug-pipe.c (_dbus_transport_debug_pipe_new):
7168         add some missing dbus_set_result
7169
7170         * bus/dispatch.c (bus_dispatch_add_connection): handle failure to
7171         alloc the DBusMessageHandler
7172
7173         * dbus/dbus-transport.c (_dbus_transport_disconnect): don't ref
7174         the transport here, since we call this from the finalizer; it
7175         resulted in a double-finalize.
7176
7177         * dbus/dbus-transport.c (_dbus_transport_disconnect): fix a bug
7178         where we tried to use transport->connection that was NULL,
7179         happened when transport was disconnected early on due to OOM
7180
7181         * bus/*.c: adapt to handle OOM for watches/timeouts
7182
7183         * dbus/dbus-transport-unix.c: port to handle OOM during
7184         watch handling
7185
7186         * dbus/dbus-auth.c (_dbus_auth_get_unused_bytes): return a
7187         reference to unused bytes instead of a copy
7188
7189         * dbus/dbus-server.c (dbus_server_handle_watch): return FALSE for
7190         out of memory
7191
7192         * dbus/dbus-connection.c (dbus_connection_handle_watch): return
7193         FALSE on OOM
7194
7195         * dbus/dbus-timeout.c (dbus_timeout_handle): return FALSE for out
7196         of memory
7197
7198 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
7199
7200         * doc/dbus-specification.sgml:
7201         Document reply message for ActivateService.
7202
7203 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
7204
7205         * bus/activation.c: (bus_pending_activation_entry_free),
7206         (bus_pending_activation_free), (bus_activation_new),
7207         (bus_activation_unref), (bus_activation_service_created),
7208         (bus_activation_activate_service):
7209         * bus/activation.h:
7210         * bus/bus.c: (bus_context_new):
7211         * bus/desktop-file.c: (new_section):
7212         * bus/driver.c: (bus_driver_send_service_deleted),
7213         (bus_driver_handle_activate_service):
7214         * bus/services.c: (bus_registry_new), (bus_registry_ensure):
7215         * bus/services.h:
7216         * dbus/dbus-connection.c:
7217         (dbus_connection_send_with_reply_and_block):
7218         * dbus/dbus-message.c: (dbus_message_append_args_valist):
7219         * dbus/dbus-protocol.h:
7220         Make activation work better. Now pending activations will be queued
7221         and the daemon won't try to activate services that are already registered.
7222
7223 2003-03-16  Havoc Pennington  <hp@pobox.com>
7224
7225         * dbus/dbus-bus.c (ensure_bus_data): handle failure to set
7226         connection data
7227
7228         * dbus/dbus-memory.c (_dbus_initialize_malloc_debug): support
7229         DBUS_MALLOC_BACKTRACES to print trace when failing an alloc
7230
7231 2003-03-16  Havoc Pennington  <hp@pobox.com>
7232
7233         * dbus/dbus-string.c (_dbus_string_validate_utf8): oops, unbreak
7234         this. always run the test suite before commit...
7235
7236         * bus/*: adapt to DBusConnection API changes
7237
7238         * glib/dbus-gmain.c: adapt to DBusConnection API changes,
7239         requires renaming stuff to avoid dbus_connection_dispatch name
7240         conflict.
7241
7242         * dbus/dbus-transport.c (_dbus_transport_queue_messages): new
7243         function
7244
7245         * dbus/dbus-message.c (_dbus_message_loader_queue_messages):
7246         separate from _dbus_message_loader_return_buffer()
7247
7248         * dbus/dbus-connection.c (dbus_connection_get_n_messages): remove
7249         this, because it's now always broken to use; the number of
7250         messages in queue vs. the number still buffered by the message
7251         loader is undefined/meaningless. Should use
7252         dbus_connection_get_dispatch_state().
7253         (dbus_connection_dispatch): rename from
7254         dbus_connection_dispatch_message
7255
7256 2003-03-16  Havoc Pennington  <hp@pobox.com>
7257
7258         * dbus/dbus-string.c (_dbus_string_validate_utf8): copy in a real
7259         implementation
7260
7261 2003-03-16  Anders Carlsson  <andersca@codefactory.se>
7262
7263         * dbus/dbus-connection.c:
7264         (dbus_connection_send_with_reply_and_block):
7265         Decrease connection->n_incoming when removing an entry
7266         from the list.
7267         * dbus/dbus-dict.c: (dbus_dict_entry_free),
7268         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
7269         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
7270         (dbus_dict_set_byte_array), (dbus_dict_set_string_array),
7271         (dbus_dict_get_boolean_array), (dbus_dict_get_double_array),
7272         (dbus_dict_get_byte_array):
7273         Handle NULL arrays and strings. Also add support for byte arrays.
7274
7275         * dbus/dbus-marshal.c: (_dbus_marshal_byte_array),
7276         (_dbus_marshal_dict), (_dbus_demarshal_byte_array),
7277         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
7278         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
7279         (_dbus_demarshal_dict), (demarshal_and_validate_len),
7280         (_dbus_marshal_validate_arg), (_dbus_marshal_test):
7281         * dbus/dbus-marshal.h:
7282         Add support for marshalling and demarshalling empty arrays and strings.
7283
7284         * dbus/dbus-message.c: (dbus_message_append_args_valist),
7285         (dbus_message_append_string_array),
7286         (dbus_message_iter_get_boolean),
7287         (dbus_message_iter_get_boolean_array),
7288         (dbus_message_iter_get_int32_array),
7289         (dbus_message_iter_get_uint32_array),
7290         (dbus_message_iter_get_double_array),
7291         (dbus_message_iter_get_byte_array),
7292         (dbus_message_iter_get_string_array), (dbus_message_iter_get_dict),
7293         (check_message_handling):
7294         Add support for getting empty arrays and dicts.
7295
7296         * dbus/dbus-string.c: (_dbus_string_validate_utf8):
7297         Don't do any validation at all for now, that's better than just checking
7298         for ASCII.
7299
7300         * test/data/valid-messages/emptiness.message:
7301         New test message with lots of empty arrays.
7302
7303 2003-03-16  Havoc Pennington  <hp@pobox.com>
7304
7305         * dbus/dbus-connection.c
7306         (_dbus_connection_queue_received_message_link): new function that
7307         can't fail due to OOM
7308
7309         * dbus/dbus-message.c (_dbus_message_loader_pop_message_link):
7310         new function pops a message together with a list link
7311         containing it.
7312
7313         * dbus/dbus-transport-unix.c (queue_messages): use new link-based
7314         message queuing functions to avoid needing to alloc memory
7315
7316 2003-03-16  Havoc Pennington  <hp@pobox.com>
7317
7318         Oops - test code was only testing failure of around 30 of the
7319         mallocs in the test path, but it turns out there are 500+
7320         mallocs. I believe this was due to misguided linking setup such
7321         that there was one copy of dbus_malloc etc. in the daemon and one
7322         in the shared lib, and only daemon mallocs were tested. In any
7323         case, the test case now tests all 500+ mallocs, and doesn't pass
7324         yet, though there are lots of fixes in this patch.
7325
7326         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
7327         this so that it doesn't need to allocate memory, since it
7328         has no way of indicating failure due to OOM (and would be
7329         annoying if it did).
7330
7331         * dbus/dbus-list.c (_dbus_list_pop_first_link): new function
7332
7333         * bus/Makefile.am: rearrange to create two self-contained
7334         libraries, to avoid having libraries with overlapping symbols.
7335         that was resulting in weirdness, e.g. I'm pretty sure there
7336         were two copies of global static variables.
7337
7338         * dbus/dbus-internals.c: move the malloc debug stuff to
7339         dbus-memory.c
7340
7341         * dbus/dbus-list.c (free_link): free list mempool if it becomes
7342         empty.
7343
7344         * dbus/dbus-memory.c (_dbus_disable_mem_pools): new function
7345
7346         * dbus/dbus-address.c (dbus_parse_address): free list nodes
7347         on failure.
7348
7349         * bus/dispatch.c (bus_dispatch_add_connection): free
7350         message_handler_slot when no longer using it, so
7351         memory leak checkers are happy for the test suite.
7352
7353         * dbus/dbus-server-debug-pipe.c (debug_finalize): free server name
7354
7355         * bus/bus.c (new_connection_callback): disconnect in here if
7356         bus_connections_setup_connection fails.
7357
7358         * bus/connection.c (bus_connections_unref): fix to free the
7359         connections
7360         (bus_connections_setup_connection): if this fails, don't
7361         disconnect the connection, just be sure there are no side
7362         effects.
7363
7364         * dbus/dbus-string.c (undo_alignment): unbreak this
7365
7366         * dbus/dbus-auth.c (_dbus_auth_unref): free some stuff we were
7367         leaking
7368         (_dbus_auth_new): fix the order in which we free strings
7369         on OOM failure
7370
7371         * bus/connection.c (bus_connection_disconnected): fix to
7372         not send ServiceDeleted multiple times in case of memory
7373         allocation failure
7374
7375         * dbus/dbus-bus.c (dbus_bus_get_base_service): new function to
7376         get the base service name
7377         (dbus_bus_register_client): don't return base service name,
7378         instead store it on the DBusConnection and have an accessor
7379         function for it.
7380         (dbus_bus_register_client): rename dbus_bus_register()
7381
7382         * bus/dispatch.c (check_hello_message): verify that other
7383         connections on the bus also got the correct results, not
7384         just the one sending hello
7385
7386 2003-03-15  Havoc Pennington  <hp@pobox.com>
7387
7388         Make it pass the Hello handling test including all OOM codepaths.
7389         Now to do other messages...
7390
7391         * bus/services.c (bus_service_remove_owner): fix crash when
7392         removing owner from an empty list of owners
7393         (bus_registry_ensure): don't leave service in the list of
7394         a connection's owned services if we fail to put the service
7395         in the hash table.
7396
7397         * bus/connection.c (bus_connection_preallocate_oom_error): set
7398         error flag on the OOM error.
7399
7400         * dbus/dbus-connection.c (_dbus_connection_new_for_transport):
7401         handle _dbus_transport_set_connection failure
7402
7403         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd): modify
7404         to create watches up front and simply enable/disable them as
7405         needed.
7406         (unix_connection_set): this can now fail on OOM
7407
7408         * dbus/dbus-timeout.c, dbus/dbus-watch.c: add concept
7409         of enabling/disabling a watch or timeout.
7410
7411         * bus/loop.c (bus_loop_iterate): don't touch disabled
7412         watches/timeouts
7413
7414         * glib/dbus-gmain.c: adapt to enable/disable watches and timeouts
7415
7416 2003-03-15  Havoc Pennington  <hp@pobox.com>
7417
7418         * bus/dispatch.c (bus_dispatch_test): OK, now finally actually
7419         write useful test code, after all that futzing around ;-)
7420
7421         Test does not yet pass because we can't handle OOM in
7422         _dbus_transport_messages_pending (basically,
7423         dbus_connection_preallocate_send() does not prealloc the write
7424         watch). To fix this, I think we need to add new stuff to
7425         set_watch_functions, namely a SetEnabled function so we can alloc
7426         the watch earlier, then enable it later.
7427
7428         * dbus/Makefile.am (libdbus_convenience_la_SOURCES): move
7429         dbus-memory.c to the convenience lib
7430
7431         * bus/test.c: rename some static functions to keep them clearly
7432         distinct from stuff in connection.c. Handle client disconnection.
7433
7434 2003-03-14  Havoc Pennington  <hp@pobox.com>
7435
7436         * bus/dispatch.c (bus_dispatch_test): do test using debug-pipe
7437         transport, tests more of the real codepath. Set up clients
7438         with bus_setup_debug_client.
7439
7440         * bus/test.c (bus_setup_debug_client): function to set up debug
7441         "clients" on the main loop
7442
7443         * dbus/dbus-transport.c (_dbus_transport_open): add debug-pipe
7444         support
7445
7446         * dbus/dbus-server.c (dbus_server_listen): add debug-pipe
7447         server type
7448
7449         * dbus/dbus-server-debug.c: support a debug server based on pipes
7450
7451         * dbus/dbus-sysdeps.c (_dbus_full_duplex_pipe): new function
7452         (_dbus_close): new function
7453
7454         * configure.in: check for socketpair
7455
7456 2003-03-14  Havoc Pennington  <hp@redhat.com>
7457
7458         * dbus/dbus-memory.c: add a "detect buffer overwrites on free"
7459         cheesy hack
7460
7461         * dbus/dbus-transport-debug.c: rework this a good bit to be
7462         less complicated. hopefully still works.
7463
7464         * dbus/dbus-server-debug.c (handle_new_client): remove timeout
7465         manually
7466
7467         * glib/dbus-gmain.c (timeout_handler): don't remove timeout
7468         after running it
7469
7470         * dbus/dbus-message.c (dbus_message_copy): rename from
7471         dbus_message_new_from_message, fix it up to copy
7472         all the message fields, add test case
7473
7474         * bus/dispatch.c (bus_dispatch_test): add some more test code,
7475         not quite passing yet
7476
7477 2003-03-14  Havoc Pennington  <hp@pobox.com>
7478
7479         * bus/loop.c (bus_loop_iterate): add this so we can "run loop
7480         until no work remains" in test code. (the large diff here
7481         is just code movement, no actual changes)
7482
7483         * dbus/dbus-server-debug.c (DEFAULT_INTERVAL): change interval to
7484         1, no point waiting around for test code.
7485         (_dbus_server_debug_accept_transport): unref the timeout
7486         after adding it (right?)
7487
7488         * dbus/dbus-transport-debug.c (DEFAULT_INTERVAL): ditto
7489
7490 2003-03-13  Havoc Pennington  <hp@redhat.com>
7491
7492         * dbus/dbus-timeout.c (_dbus_timeout_list_set_functions): handle
7493         out of memory
7494
7495         * dbus/dbus-watch.c (_dbus_watch_list_set_functions): handle out
7496         of memory
7497
7498         * dbus/dbus-connection.h: Make AddWatchFunction and
7499         AddTimeoutFunction return a bool so they can fail on out-of-memory
7500
7501         * bus/bus.c (bus_context_new): set up timeout handlers
7502
7503         * bus/connection.c (bus_connections_setup_connection): set up
7504         timeout handlers
7505
7506         * glib/dbus-gmain.c: adapt to the fact that set_functions stuff
7507         can fail
7508
7509         * bus/bus.c (bus_context_new): adapt to changes
7510
7511         * bus/connection.c: adapt to changes
7512
7513         * test/watch.c: adapt to DBusWatch changes
7514
7515         * bus/dispatch.c (bus_dispatch_test): started adding this but
7516         didn't finish
7517
7518 2003-03-14  Anders Carlsson  <andersca@codefactory.se>
7519
7520         * bus/dispatch.c (send_service_nonexistent_error): Fix typo.
7521
7522 2003-03-13  Havoc Pennington  <hp@pobox.com>
7523
7524         * bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c:
7525         set up a test framework as for the library
7526
7527 2003-03-12  Havoc Pennington  <hp@pobox.com>
7528
7529         Throughout: purge global variables, introduce BusActivation,
7530         BusConnections, BusRegistry, etc. objects instead.
7531
7532         * bus/bus.h, bus/bus.c: introduce BusContext as a global
7533         message bus object
7534
7535         * test/Makefile.am (TEST_BINARIES): disable bus-test for now,
7536         going to redo this a bit differently I think
7537
7538 2003-03-12  Havoc Pennington  <hp@redhat.com>
7539
7540         Mega-patch that gets the message bus daemon initially handling
7541         out-of-memory. Work still needed. Also lots of random
7542         moving stuff to DBusError instead of ResultCode.
7543
7544         * dbus/dbus-list.c (_dbus_list_length_is_one): new function
7545
7546         * dbus/dbus-connection.c
7547         (dbus_connection_send_with_reply_and_block): use DBusError
7548
7549         * dbus/dbus-bus.c: adapt to API changes, make it use DBusError not
7550         DBusResultCode
7551
7552         * dbus/dbus-connection.c (dbus_connection_send): drop the result
7553         code here, as the only failure possible is OOM.
7554
7555         * bus/connection.c (bus_connection_disconnect):
7556         rename bus_connection_disconnected as it's a notification only
7557
7558         * bus/driver.c (bus_driver_handle_acquire_service): don't free
7559         "name" on get_args failure, should be done by get_args;
7560         don't disconnect client for bad args, just return an error.
7561         (bus_driver_handle_service_exists): ditto
7562
7563         * bus/services.c (bus_services_list): NULL-terminate returned array
7564
7565         * bus/driver.c (bus_driver_send_service_lost)
7566         (bus_driver_send_service_acquired): send messages from driver to a
7567         specific client to the client's unique name, not to the broadcast
7568         service.
7569
7570         * dbus/dbus-message.c (decode_header_data): reject messages that
7571         contain no name field
7572         (_dbus_message_get_client_serial): rename to
7573         dbus_message_get_serial and make public
7574         (_dbus_message_set_serial): rename from set_client_serial
7575         (_dbus_message_set_reply_serial): make public
7576         (_dbus_message_get_reply_serial): make public
7577
7578         * bus/connection.c (bus_connection_foreach): allow stopping
7579         iteration by returning FALSE from foreach function.
7580
7581         * dbus/dbus-connection.c (dbus_connection_send_preallocated)
7582         (dbus_connection_free_preallocated_send)
7583         (dbus_connection_preallocate_send): new API for sending a message
7584         without possibility of malloc failure.
7585         (dbus_connection_send_message): rename to just
7586         dbus_connection_send (and same for whole function family)
7587
7588         * dbus/dbus-errors.c (dbus_error_free): make this reinit the error
7589
7590         * dbus/dbus-sysdeps.c (_dbus_exit): new function
7591
7592         * bus/activation.c: handle/return errors
7593
7594         * dbus/dbus-errors.h: add more DBUS_ERROR #define
7595
7596         * dbus/dbus-sysdeps.c (_dbus_directory_open) (_dbus_file_get_contents)
7597         (_dbus_directory_get_next_file): use DBusError instead of DBusResultCode
7598         (_dbus_result_from_errno): move to this file
7599
7600 2003-03-10  Anders Carlsson  <andersca@codefactory.se>
7601
7602         * dbus/dbus-marshal.c:
7603         (_dbus_marshal_set_string):
7604         Take a length argument so we can marshal the correct string
7605         length.
7606
7607         (_dbus_marshal_dict), (_dbus_demarshal_dict),
7608         (_dbus_marshal_get_arg_end_pos), (_dbus_marshal_validate_arg),
7609         (_dbus_marshal_test):
7610         * dbus/dbus-marshal.h:
7611         Add support for marshalling and demarshalling dicts.
7612
7613         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7614         Add support for TYPE DICT.
7615
7616         * dbus/dbus-message.c: (set_string_field):
7617         Adjust header padding.
7618
7619         (dbus_message_append_args_valist), (dbus_message_append_dict),
7620         (dbus_message_get_args_valist), (dbus_message_iter_get_arg_type),
7621         (dbus_message_iter_get_dict), (_dbus_message_loader_return_buffer),
7622         (check_message_handling), (check_have_valid_message):
7623         * dbus/dbus-message.h:
7624         Add functions for setting and getting dicts.
7625
7626         * dbus/dbus-protocol.h:
7627         Add DBUS_TYPE_DICT.
7628
7629         * dbus/dbus.h:
7630         Add dbus-dict.h
7631
7632         * doc/dbus-specification.sgml:
7633         Add information about how dicts are marshalled.
7634
7635         * test/data/invalid-messages/dict-with-nil-value.message:
7636         * test/data/invalid-messages/too-short-dict.message:
7637         * test/data/valid-messages/dict-simple.message:
7638         * test/data/valid-messages/dict.message:
7639         Add sample messages containing dicts.
7640
7641 2003-03-08  Anders Carlsson  <andersca@codefactory.se>
7642
7643         * dbus/dbus-dict.h: Add DBUS_END_DECLS.
7644
7645 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
7646
7647         * dbus/Makefile.am:
7648         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
7649         (dbus_dict_get_keys), (insert_entry), (dbus_dict_set_boolean),
7650         (dbus_dict_set_int32), (dbus_dict_set_uint32),
7651         (dbus_dict_set_double), (dbus_dict_set_string),
7652         (dbus_dict_set_boolean_array), (dbus_dict_set_int32_array),
7653         (dbus_dict_set_uint32_array), (dbus_dict_set_double_array),
7654         (dbus_dict_set_string_array), (_dbus_dict_test):
7655         * dbus/dbus-dict.h:
7656         Fix according to comments from Havoc.
7657
7658 2003-03-06  Michael Meeks  <michael@server.home>
7659
7660         * configure.in: if we don't have kde-config, disable have_qt.
7661
7662 2003-03-07  Anders Carlsson  <andersca@codefactory.se>
7663
7664         * dbus/Makefile.am:
7665         Add dbus-dict.[ch]
7666
7667         * dbus/dbus-dict.c: (dbus_dict_entry_free), (dbus_dict_new),
7668         (dbus_dict_ref), (dbus_dict_unref), (dbus_dict_contains),
7669         (dbus_dict_remove), (dbus_dict_get_value_type),
7670         (dbus_dict_get_keys), (dbus_dict_put_boolean),
7671         (dbus_dict_put_int32), (dbus_dict_put_uint32),
7672         (dbus_dict_put_double), (dbus_dict_put_string),
7673         (dbus_dict_put_boolean_array), (dbus_dict_put_int32_array),
7674         (dbus_dict_put_uint32_array), (dbus_dict_put_double_array),
7675         (dbus_dict_put_string_array), (dbus_dict_get_boolean),
7676         (dbus_dict_get_int32), (dbus_dict_get_uint32),
7677         (dbus_dict_get_double), (dbus_dict_get_string),
7678         (dbus_dict_get_boolean_array), (dbus_dict_get_int32_array),
7679         (dbus_dict_get_uint32_array), (dbus_dict_get_double_array),
7680         (dbus_dict_get_string_array), (_dbus_dict_test):
7681         * dbus/dbus-dict.h:
7682         Add DBusDict implementation
7683
7684         * dbus/dbus-test.c: (dbus_internal_do_not_use_run_tests):
7685         * dbus/dbus-test.h:
7686         Add _dbus_dict_test
7687
7688 2003-03-04  Havoc Pennington  <hp@pobox.com>
7689
7690         * test/data/auth/*: adapt to changes
7691
7692         * dbus/dbus-auth-script.c (_dbus_auth_script_run): add
7693         USERID_BASE64 and change USERNAME_BASE64 to put in username not
7694         userid
7695
7696         * dbus/dbus-keyring.c (_dbus_keyring_validate_context): prevent
7697         more stuff from being in a context name, to make the protocol
7698         simpler to deal with
7699
7700         * dbus/dbus-errors.c (dbus_error_has_name): new function
7701         (dbus_error_is_set): new function
7702
7703         * dbus/dbus-auth.c: replace DBUS_STUPID_TEST_MECH auth
7704         with DBUS_COOKIE_SHA1, implement DBUS_COOKIE_SHA1
7705
7706         * dbus/dbus-connection.c (dbus_connection_flush): also read
7707         messages during a flush operation
7708
7709         * dbus/Makefile.am: remove dbus-md5 since it isn't currently used.
7710
7711 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
7712
7713         * configure.in: Check for gethostbyname on Solaris.
7714
7715         * dbus/dbus-transport.c: (_dbus_transport_open):
7716         Remove duplicate "tcp" entry.
7717
7718         * doc/dbus-specification.sgml:
7719         Clarify some things.
7720
7721 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
7722
7723         * dbus/dbus-auth.c: (send_rejected), (process_test_subdir):
7724         * dbus/dbus-keyring.c: (_dbus_keyring_new_homedir),
7725         (_dbus_keyring_test):
7726         * dbus/dbus-md5.c: (_dbus_md5_compute):
7727         * dbus/dbus-sha.c: (_dbus_sha_compute):
7728         Plug memory leaks.
7729
7730 2003-03-05  Anders Carlsson  <andersca@codefactory.se>
7731
7732         * README: Add some things.
7733
7734 2003-03-04  Anders Carlsson  <andersca@codefactory.se>
7735
7736         * dbus/dbus-message.c (dbus_message_append_args_valist): Add a break;
7737         after case DBUS_TYPE_BOOELAN.
7738
7739 2003-03-02  Havoc Pennington  <hp@pobox.com>
7740
7741         * test/break-loader.c (randomly_set_extreme_ints): add test that
7742         sets really huge and small integers
7743
7744         * dbus/dbus-marshal.c (_dbus_marshal_validate_arg): add check
7745         that length of boolean array fits in the string, and that
7746         string has room for boolean value in single-bool case.
7747
7748         * dbus/dbus-message-builder.c (_dbus_message_data_load): add
7749         optional value to "ALIGN" command which is what to fill the
7750         alignment with.
7751
7752         * test/data/valid-messages/no-padding.message: add regression
7753         test for the message padding problem
7754
7755 2003-03-02  Havoc Pennington  <hp@pobox.com>
7756
7757         * dbus/dbus-message.c (decode_header_data): fix to always init
7758         message_padding, from Benjamin Dauvergne
7759
7760 2003-03-02  Havoc Pennington  <hp@pobox.com>
7761
7762         * configure.in: 0.5
7763
7764         * NEWS: Update.
7765
7766 2003-03-01  Joe Shaw  <joe@assbarn.com>
7767
7768         * configure.in: Check for "struct cmsgcred" and try to access its
7769         members for BSD-like unices.
7770
7771         * dbus/dbus-sysdeps.c (read_credentials_byte): Fold this back into
7772         _dbus_read_credentials_unix_socket().
7773         (_dbus_read_credentials_unix_socket): Use recvmsg() instead of
7774         read() for reading the credential byte off the unix socket.  Use
7775         struct cmsgcred on systems that support it.
7776
7777 2003-02-27  Alexander Larsson  <alexl@redhat.com>
7778
7779         * glib/Makefile.am:
7780         * configure.in:
7781         Make gthreads-2.0 dependency optional. Don't build thread test if
7782         its not found.
7783
7784 2003-02-27  Havoc Pennington  <hp@pobox.com>
7785
7786         * dbus/dbus-connection.c
7787         (dbus_connection_send_message_with_reply_and_block): fix doh!
7788         doh! doh! bug that resulted in never removing a reply from the
7789         queue, no wonder we called get_reply_serial so much ;-)
7790
7791         * dbus/dbus-message.c (struct DBusMessage): cache reply serial
7792         and client serial instead of demarshaling them every time
7793
7794 2003-02-27  Havoc Pennington  <hp@pobox.com>
7795
7796         * dbus/dbus-marshal.c (_dbus_demarshal_int32): rewrite to be much
7797         more inlined, using dbus-string-private.h, speeds things up
7798         substantially
7799
7800         * dbus/dbus-string.c (_dbus_string_free): apply align offset
7801         when freeing the string
7802         (_dbus_string_steal_data): fix for align offset
7803         (undo_alignment): new function
7804
7805 2003-02-26  Havoc Pennington  <hp@redhat.com>
7806
7807         All kinds of audit fixes from Owen, plus initial attempt to
7808         handle unaligned memory returned from malloc.
7809
7810         * dbus/dbus-string.c (_dbus_string_init): clamp max length to
7811         leave room for align_offset and nul byte
7812         (fixup_alignment): function to track an align_offset and
7813         ensure real->str is aligned
7814         (DBUS_GENERIC_STRING_PREAMBLE): len must be less than allocated,
7815         to allow a nul byte plus align offset
7816         (_dbus_string_lock): fix overflow issue
7817         (_dbus_string_init_const_len): add assertions on sanity of len,
7818         assign allocated to be ALLOCATION_PADDING larger than len
7819         (set_length): fixup the overflow handling
7820         (_dbus_string_get_data_len): fix overflow in assertion
7821         (open_gap): detect overflow in size of gap to be opened
7822         (_dbus_string_lengthen): add overflow check
7823         (_dbus_string_align_length): fix overflow with _DBUS_ALIGN_VALUE
7824         (_dbus_string_append): add overflow check
7825         (_dbus_string_append_unichar): overflow
7826         (_dbus_string_delete): fix overflow in assertion
7827         (_dbus_string_copy_len): overflow in assertion
7828         (_dbus_string_replace_len): overflows in assertions
7829         (_dbus_string_find): change to implement in terms of
7830         _dbus_string_find_to
7831         (_dbus_string_find_to): assorted fixage
7832         (_dbus_string_equal_c_str): assert c_str != NULL,
7833         fix logic so the function works
7834         (_dbus_string_ends_with_c_str): fix overflow thingy
7835         (_dbus_string_base64_encode): overflow fix
7836         (_dbus_string_validate_ascii): overflow
7837         (_dbus_string_validate_nul): overflow
7838
7839 2003-02-26  Havoc Pennington  <hp@redhat.com>
7840
7841         * dbus/dbus-marshal.c (_dbus_marshal_test): fix to work with DISABLE_ASSERTS
7842
7843 2003-02-26  Alexander Larsson  <alexl@redhat.com>
7844
7845         * configure.in:
7846         Set DBUS_GLIB_THREADS_LIBS for apps using gthread-2.0
7847
7848         * dbus/dbus-connection.c:
7849         * dbus/dbus-connection.h:
7850         Fix _dbus_connection_acquire_io_path and _dbus_connection_acquire_dispatch.
7851         Add dbus_connection_set_wakeup_main_function and use it when queueing
7852         incoming and outgoing messages.
7853
7854
7855         * dbus/dbus-dataslot.c:
7856         Threadsafe usage of DBusDataSlotAllocator
7857
7858         * dbus/dbus-message.c: (dbus_message_get_args_iter):
7859         dbus_new can fail.
7860
7861         * dbus/dbus-server-unix.c:
7862         Add todo comment
7863
7864         * glib/dbus-gmain.c:
7865         Implement the new wakeup functions for glib.
7866
7867         * glib/Makefile.am:
7868         * glib/test-thread-client.c:
7869         * glib/test-thread-server.c:
7870         * glib/test-thread.h:
7871         Initial cut at some thread test code. Not really done yet.
7872
7873 2003-02-26  Havoc Pennington  <hp@pobox.com>
7874
7875         * dbus/dbus-connection.c
7876         (dbus_connection_send_message_with_reply_and_block): fix crash
7877         where we ref'd the outgoing message instead of the returned reply
7878
7879         * dbus/dbus-transport-unix.c (do_authentication): check read watch
7880         at the end of this function, so if we didn't need to read for
7881         authentication, we reinstall it for receiving messages
7882
7883         * dbus/dbus-message.c (dbus_message_new_reply): allow replies to
7884         a NULL sender for peer-to-peer case
7885
7886         * dbus/dbus-transport-unix.c (check_read_watch): handle
7887         !authenticated case correctly
7888
7889         * glib/dbus-gmain.c: add support for DBusServer
7890
7891         * dbus/dbus-server.c: add data slot support
7892
7893         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): check
7894         return values and handle errors
7895
7896         * dbus/dbus-dataslot.c: factor out the data slot stuff from
7897         DBusConnection
7898
7899         * Doxyfile.in (INPUT): add glib subdir
7900
7901         * glib/dbus-gmain.c (dbus_connection_setup_with_g_main): rename
7902         setup_with_g_main instead of hookup_with_g_main; write docs
7903
7904 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
7905
7906         * dbus/dbus-marshal.c: (_dbus_marshal_validate_arg):
7907         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7908         * dbus/dbus-message.c: (dbus_message_append_boolean),
7909         (dbus_message_append_boolean_array),
7910         (dbus_message_get_args_valist), (_dbus_message_test):
7911         * dbus/dbus-message.h:
7912         * doc/dbus-specification.sgml:
7913         Various fixes as pointed out by Havoc.
7914
7915         * test/data/invalid-messages/bad-boolean-array.message:
7916         * test/data/invalid-messages/bad-boolean.message:
7917         Add invalid boolean value test cases.
7918
7919 2003-02-24  Anders Carlsson  <andersca@codefactory.se>
7920
7921         * dbus/dbus-internals.c: (_dbus_type_to_string):
7922         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
7923         (_dbus_marshal_validate_arg):
7924         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
7925         * dbus/dbus-message.c: (dbus_message_append_args_valist),
7926         (dbus_message_append_boolean), (dbus_message_append_boolean_array),
7927         (dbus_message_get_args_valist), (dbus_message_iter_get_boolean),
7928         (dbus_message_iter_get_int32), (dbus_message_iter_get_uint32),
7929         (dbus_message_iter_get_double),
7930         (dbus_message_iter_get_boolean_array), (message_iter_test):
7931         * dbus/dbus-message.h:
7932         * dbus/dbus-protocol.h:
7933         * doc/dbus-specification.sgml:
7934         * test/data/valid-messages/lots-of-arguments.message:
7935         Add support for boolean and boolean array types.
7936
7937 2003-02-23  Havoc Pennington  <hp@pobox.com>
7938
7939         * dbus/dbus-keyring.c: finish most of this implementation and
7940         simple unit test
7941
7942         * dbus/dbus-errors.c (dbus_set_error_const, dbus_set_error): make
7943         these barf if the error isn't cleared to NULL
7944
7945         * dbus/dbus-sysdeps.c (_dbus_delete_file): set error on failure
7946         (_dbus_create_directory): new function
7947
7948         * dbus/dbus-errors.c (dbus_set_error): fix warning
7949
7950         * dbus/dbus-string.c (_dbus_string_hex_encode): new function
7951         (_dbus_string_hex_decode): new function
7952         (test_hex_roundtrip): test code
7953
7954         * dbus/dbus-sha.c (_dbus_sha_compute): use dbus_string_hex_encode
7955
7956         * dbus/dbus-md5.c (_dbus_md5_compute): use dbus_string_hex_encode
7957
7958         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): make this use
7959         the save-to-temp/rename trick to atomically write the new file
7960         (_dbus_string_parse_uint): new function
7961
7962 2003-02-22  Havoc Pennington  <hp@pobox.com>
7963
7964         * test/Makefile.am (dist-hook): fix dist for test/data/sha-1
7965
7966 2003-02-22  Havoc Pennington  <hp@pobox.com>
7967
7968         * dbus/dbus-message.c (dbus_message_iter_get_string_array):
7969         (dbus_message_iter_get_byte_array): Fix up doxygen warnings
7970
7971         * dbus/dbus-sha.c: add implementation of SHA-1 algorithm
7972
7973         * dbus/test/data/sha-1: add US government test suite for SHA-1
7974
7975 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
7976
7977         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
7978         Make string arrays NULL-terminated.
7979
7980         * dbus/dbus-memory.c: (dbus_free_string_array):
7981         * dbus/dbus-memory.h:
7982         New function for freeing NULL-terminated string arrays.
7983
7984         * dbus/dbus-message-builder.c: (append_quoted_string),
7985         (_dbus_message_data_load):
7986         Add support for array types.
7987
7988         * dbus/dbus-message.c: (check_message_handling):
7989         Add more types as test cases.
7990
7991         * dbus/dbus-sysdeps.c: (_dbus_string_parse_int),
7992         (_dbus_string_parse_double):
7993         Add the start offset to the end offset.
7994
7995         * test/data/valid-messages/lots-of-arguments.message:
7996         New test message with lots of arguments.
7997
7998 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
7999
8000         * dbus/dbus-message.c: (dbus_message_append_nil),
8001         (dbus_message_append_int32), (dbus_message_append_uint32),
8002         (dbus_message_append_double), (dbus_message_append_string),
8003         (dbus_message_append_int32_array),
8004         (dbus_message_append_uint32_array),
8005         (dbus_message_append_double_array),
8006         (dbus_message_append_byte_array),
8007         (dbus_message_append_string_array):
8008         Fix all out-of-memory handling in these functions.
8009
8010 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
8011
8012         * dbus/dbus-message.c: (dbus_message_append_nil):
8013         Fix a silly.
8014
8015 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
8016
8017         * dbus/dbus-message.c: (dbus_message_append_args_valist),
8018         (dbus_message_append_nil), (dbus_message_append_int32_array),
8019         (dbus_message_append_uint32_array),
8020         (dbus_message_append_double_array),
8021         (dbus_message_append_byte_array),
8022         (dbus_message_append_string_array), (dbus_message_get_args_valist),
8023         (dbus_message_iter_get_int32_array),
8024         (dbus_message_iter_get_uint32_array),
8025         (dbus_message_iter_get_double_array),
8026         (dbus_message_iter_get_byte_array),
8027         (dbus_message_iter_get_string_array):
8028
8029         * dbus/dbus-message.h:
8030         Add functions for appending and getting arrays.
8031
8032 2003-02-21  Anders Carlsson  <andersca@codefactory.se>
8033
8034         * dbus/dbus-mempool.c (_dbus_mem_pool_new): Make the
8035         element size at least 8 bytes, fixes mempool tests on
8036         64-bit machines.
8037
8038 2003-02-20  Alexander Larsson  <alexl@redhat.com>
8039
8040         * dbus/dbus-transport-unix.c (unix_do_iteration):
8041         Unlock the connection mutex during a blocking select call.
8042         Add todo about how we need a way to wake up the select.
8043
8044         * dbus/dbus-connection-internal.h:
8045         * dbus/dbus-connection.c:
8046         Add _dbus_connection_lock and _dbus_connection_unlock.
8047
8048 2003-02-19  Havoc Pennington  <hp@pobox.com>
8049
8050         * Doxyfile.in (PREDEFINED): put DOXYGEN_SHOULD_SKIP_THIS in
8051         Doxyfile.in, not Doxyfile
8052
8053         * dbus/dbus-keyring.c: do some hacking on this
8054
8055         * dbus/dbus-sysdeps.c (_dbus_delete_file): new
8056
8057         * dbus/dbus-errors.c (dbus_set_error_const): do not call
8058         dbus_error_init
8059         (dbus_set_error): remove dbus_error_init, check for message ==
8060         NULL *before* we sprintf into it, and add @todo about including
8061         system headers in this file
8062
8063         * dbus/dbus-sysdeps.c (_dbus_create_file_exclusively): new
8064
8065         * dbus/dbus-errors.h (DBUS_ERROR_FAILED): add
8066
8067         * dbus/dbus-sysdeps.c (get_user_info): break this function out to
8068         get various bits of user information based on either username
8069         or user ID
8070         (_dbus_homedir_from_username): new function
8071
8072 2003-02-19  Anders Carlsson  <andersca@codefactory.se>
8073
8074         * configure.in:
8075         Add check for nonposix getpwnam_r
8076
8077         * dbus/dbus-mempool.c: (_dbus_mem_pool_new):
8078         Align the pool element size to a sizeof (void *) boundary.
8079
8080         * dbus/dbus-sysdeps.c: (_dbus_setenv), (_dbus_connect_unix_socket),
8081         (_dbus_listen_unix_socket), (_dbus_credentials_from_username):
8082         General Solaris fixes.
8083
8084         * test/data/valid-messages/simplest-manual.message:
8085         Explicitly state that we want little-endian packing.
8086
8087 2003-02-19  Mikael Hallendal  <micke@codefactory.se>
8088
8089         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
8090
8091         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_tcp_socket):
8092         Added to create a transport connecting using a tcp/ip socket.
8093
8094         * dbus/dbus-sysdeps.c (_dbus_connect_tcp_socket): Added to connect
8095         to a tcp socket at given host and port.
8096         (_dbus_listen_tcp_socket): added to listen on tcp socket for given
8097         hostname and port.
8098
8099         * dbus/dbus-server.c (dbus_server_listen): Support tcp: addresses.
8100
8101         * dbus/dbus-server-unix.c (_dbus_server_new_for_tcp_socket):
8102         Added to create a server listening on a TCP/IP socket.
8103
8104 2003-02-19  Havoc Pennington  <hp@pobox.com>
8105
8106         Throughout: mop up all the Doxygen warnings and undocumented
8107         stuff.
8108
8109         * dbus/dbus-sysdeps.c (do_exec): do not use execvp, we don't want
8110         to search any paths.
8111
8112         * dbus/dbus-threads.c: move global mutex initializers to
8113         dbus-internals.h, multiple prototypes was confusing doxygen
8114         besides being kind of ugly
8115
8116         * Doxyfile (PREDEFINED): have Doxygen define
8117         DOXYGEN_SHOULD_SKIP_THIS so we can exclude things from
8118         docs with #ifndef DOXYGEN_SHOULD_SKIP_THIS
8119         (do not abuse the feature! it's for stuff like the autogenerated
8120         macros in dbus-md5.c, not just for things you don't feel like
8121         documenting...)
8122
8123 2003-02-18  Havoc Pennington  <hp@pobox.com>
8124
8125         * dbus/dbus-string.c (_dbus_string_zero): new function
8126
8127         * dbus/dbus-md5.c: include MD5 implementation by L. Peter Deutsch,
8128         wrap it in some dbus-friendly API
8129
8130         * dbus/dbus-types.h: add 16-bit types
8131
8132 2003-02-18  Joe Shaw  <joe@assbarn.com>
8133
8134         * dbus/dbus-auth.c (handle_server_data_stupid_test_mech): Just get
8135         credentials from our currently running process.
8136         (get_word): Fix a buglet where we were copying the entire length
8137         instead of relative to our position.
8138
8139         * dbus/dbus-hash.c (_dbus_hash_test): Don't try to allocate the
8140         keys on the stack... it's 640k of data.
8141
8142         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): Always
8143         read the credentials byte off the socket, even if we don't have
8144         SO_PEERCRED.
8145         (_dbus_poll): Implement poll() using select() for systems which
8146         don't have it.
8147
8148         * glib/test-dbus-glib.c (main): Print out an error if no
8149         parameters are given.
8150
8151         * test/data/auth/fallback.auth-script: Added.  Tests that a client
8152         can fallback to a secondary auth mechanism if the first fails.
8153
8154 2003-02-18  Havoc Pennington  <hp@pobox.com>
8155
8156         * AUTHORS: add Alex
8157
8158 2003-02-17  Havoc Pennington  <hp@pobox.com>
8159
8160         * doc/dbus-specification.sgml: lots of cosmetic
8161         cleanups/rearrangement, add assorted FIXME, change DBUS_ADDRESS
8162         env variable to DBUS_BUS_ADDRESS, s/client/application/,
8163         s/server/bus/ (except in authentication section). Add a section
8164         "Message Bus Message Routing"
8165
8166 2003-02-17  Anders Carlsson  <andersca@codefactory.se.>
8167
8168         Release 0.4
8169
8170         * NEWS: Update
8171
8172 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
8173
8174         * doc/dbus-specification.sgml:
8175         Specification updates.
8176
8177 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
8178
8179         * bus/activation.c: (bus_activation_init), (child_setup),
8180         (bus_activation_activate_service):
8181         * bus/activation.h:
8182         * bus/main.c: (main):
8183         Set DBUS_ADDRESS environment variable.
8184
8185         * dbus/dbus-errors.c: (dbus_set_error):
8186         Don't use va_copy since that's a C99 feature.
8187
8188         * dbus/dbus-sysdeps.c: (_dbus_setenv), (do_exec),
8189         (_dbus_spawn_async):
8190         * dbus/dbus-sysdeps.h:
8191         Add child_setup_func to _dbus_spawn_async.
8192
8193         * doc/dbus-specification.sgml:
8194         Update specification.
8195
8196         * test/spawn-test.c: (setup_func), (main):
8197         Fix test.
8198
8199 2003-02-17  Alexander Larsson  <alexl@redhat.com>
8200
8201         * dbus/dbus-connection.c (_dbus_connection_handler_destroyed_locked):
8202         Added todo.
8203
8204 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
8205
8206         * doc/.cvsignore:
8207         * doc/Makefile.am:
8208         * doc/dbus-test-plan.sgml:
8209         Add test plan document.
8210
8211         * test/Makefile.am:
8212         Fix distcheck.
8213
8214 2003-02-17  Anders Carlsson  <andersca@codefactory.se>
8215
8216         * dbus/dbus-message.c: (decode_header_data),
8217         (_dbus_message_loader_return_buffer):
8218         Set the header padding amount when loading a message.
8219
8220 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
8221
8222         * bus/dispatch.c: (send_one_message):
8223         Only send broadcast messages to registered connections.
8224
8225         * dbus/dbus-message.c: (dbus_message_name_is):
8226         * dbus/dbus-message.h:
8227         New convenience function.
8228
8229         * dbus/dbus-transport-debug.c: (do_reading):
8230         Only dispatch one message per run.
8231
8232         * test/Makefile.am:
8233         * test/bus-test.c: (new_connection_callback), (die),
8234         (test_hello_client1_handler), (test_hello_client2_handler),
8235         (test_hello_replies), (main):
8236
8237         * test/bus-test-loop.[ch]:
8238         Add these.
8239
8240 2003-02-16  Havoc Pennington  <hp@pobox.com>
8241
8242         * dbus/dbus-connection.c (dbus_connection_dispatch_message): fix
8243         backward conditional
8244
8245 2003-02-16  Alexander Larsson  <alexl@redhat.com>
8246
8247         * dbus/dbus-connection.c:
8248         Implement sent_message_with_reply. (with_reply_and block is still
8249         busted).
8250         Made dispatch_message not lose message if OOM.
8251
8252         * dbus/dbus-errors.h:
8253         Add NoReply error (for reply timeouts).
8254
8255 2003-02-16  Alexander Larsson  <alexl@redhat.com>
8256
8257         * dbus/dbus-hash.c (_dbus_hash_table_unref):
8258         Actually free keys and values when destroying hashtable.
8259
8260 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
8261
8262         * dbus/dbus-auth.c: (client_try_next_mechanism):
8263         Plug a leak.
8264
8265         * dbus/dbus-threads.c: (dbus_condvar_wait_timeout):
8266         Return TRUE if there's no thread implementation around.
8267
8268         * glib/dbus-gmain.c: (free_source),
8269         (dbus_connection_hookup_with_g_main):
8270         Make sure to remove the GSource when the connection is finalized.
8271
8272 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
8273
8274         * bus/dispatch.c: (bus_dispatch_message_handler):
8275         * dbus/dbus-errors.h:
8276         Return an error if someone tries to send a message to a service
8277         that doesn't exist.
8278
8279 2003-02-16  Anders Carlsson  <andersca@codefactory.se>
8280
8281         * bus/activation.c: (load_directory), (bus_activation_init),
8282         (bus_activation_activate_service):
8283         * bus/activation.h:
8284         * bus/driver.c:
8285         (bus_driver_handle_activate_service), (bus_driver_handle_message):
8286         More work on the activation handling.
8287
8288         * dbus/dbus-errors.h:
8289         Add some error messages
8290
8291         * dbus/dbus-message.c: (dbus_message_new_error_reply):
8292         * dbus/dbus-message.h:
8293         New function that creates an error message.
8294
8295         * dbus/dbus-protocol.h:
8296         Add ACTIVATE_SERVER message.
8297
8298         * dbus/dbus-server-unix.c: (unix_handle_watch),
8299         (_dbus_server_new_for_domain_socket):
8300         Call _dbus_fd_set_close_on_exec.
8301
8302         * dbus/dbus-sysdeps.c: (make_pipe), (do_exec),
8303         (_dbus_spawn_async), (_dbus_disable_sigpipe),
8304         (_dbus_fd_set_close_on_exec):
8305         * dbus/dbus-sysdeps.h:
8306         Add _dbus_fd_set_close_on exec function. Also add function that checks
8307         that all open fds are set to close-on-exec and warns otherwise.
8308
8309         * dbus/dbus-transport-unix.c:
8310         (_dbus_transport_new_for_domain_socket):
8311         Call _dbus_fd_set_close_on_exec.
8312
8313 2003-02-16  Havoc Pennington  <hp@pobox.com>
8314
8315         * dbus/dbus-connection.c (dbus_connection_set_change_sigpipe):
8316         allow people to avoid setting SIGPIPE to SIG_IGN
8317         (_dbus_connection_new_for_transport): disable SIGPIPE unless
8318         we've been asked not to
8319
8320 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
8321
8322         * dbus/dbus-list.c: (_dbus_list_append_link),
8323         (_dbus_list_prepend_link):
8324         * dbus/dbus-memory.c: (dbus_malloc), (dbus_malloc0),
8325         (dbus_realloc):
8326         Warning fixes.
8327
8328 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
8329
8330         * bus/Makefile.am:
8331         * bus/activation.c: (bus_activation_entry_free),
8332         (add_desktop_file_entry), (load_directory), (bus_activation_init):
8333         * bus/activation.h:
8334         * bus/main.c: (main):
8335         Add simple activation support, doesn't work yet though.
8336
8337 2003-02-15   Zack Rusin  <zack@kde.org>
8338
8339         * qt/dbus-qthread.cpp:  small casting fix
8340
8341 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
8342
8343         * dbus/dbus-errors.c: (dbus_set_error):
8344         * dbus/dbus-errors.h:
8345         Add a few errors and make dbus_set_error void.
8346
8347         * dbus/dbus-sysdeps.c:
8348         (_dbus_errno_to_string), (close_and_invalidate), (make_pipe),
8349         (write_err_and_exit), (read_ints), (do_exec), (_dbus_spawn_async):
8350         * dbus/dbus-sysdeps.h:
8351         Add _dbus_spawn_async.
8352
8353         * test/spawn-test.c: (main):
8354         Test for _dbus_spawn_async.
8355
8356 2003-02-15  Anders Carlsson  <andersca@codefactory.se>
8357
8358         * dbus/dbus-internals.h:
8359         Fix build without tests.
8360
8361         * dbus/dbus-list.c: (alloc_link):
8362         Fix a segfault when a malloc fails.
8363
8364         * dbus/dbus-memory.c: (initialize_malloc_debug), (dbus_malloc),
8365         (dbus_malloc0), (dbus_realloc):
8366         Add support for malloc debugging.
8367
8368 2003-02-15  Alexander Larsson  <alexl@redhat.com>
8369
8370         * dbus/dbus-threads.c:
8371         * dbus/dbus-threads.h:
8372         Add condvars. Remove static mutext from API.
8373         Implement static mutexes by initializing them from threads_init.
8374
8375         * glib/dbus-gthread.c:
8376         * qt/dbus-qthread.cpp:
8377         Update with the thread api changes.
8378
8379
8380         * dbus/dbus-list.c:
8381         * dbus/dbus-list.h:
8382         Turn StaticMutex into normal mutex + init function.
8383         Export new functions _dbus_list_alloc_link, _dbus_list_free_link,
8384         _dbus_list_append_link, _dbus_list_prepend_link
8385
8386
8387         * dbus/dbus-sysdeps.c:
8388         * dbus/dbus-sysdeps.h:
8389         New type dbus_atomic_t, and new functions _dbus_atomic_inc,
8390         _dbus_atomic_dec. Only slow fallback implementation at the moment.
8391
8392         * dbus/dbus-protocol.h:
8393         Add DBUS_MESSAGE_LOCAL_DISCONNECT define
8394
8395         * dbus/dbus-message.c:
8396         Make ref/unref atomic.
8397         Fix some docs.
8398
8399         * dbus/dbus-connection-internal.h:
8400         * dbus/dbus-connection.c:
8401         * dbus/dbus-connection.h:
8402         Make threadsafe.
8403         Change _peek to _borrow,_return & _steal_borrowed.
8404         Change disconnect callback to event.
8405         Make dbus_connection_dispatch_messages reentrant.
8406
8407         * dbus/dbus-transport.c:
8408         Don't ref the connection on calls to the transport
8409         implementation.
8410
8411         * dbus/dbus-message-handler.c:
8412         Make threadsafe.
8413
8414         * glib/dbus-gmain.c:
8415         Don't use peek_message anymore
8416
8417         * test/Makefile.am:
8418         * test/debug-thread.c:
8419         * test/debug-thread.h:
8420         Simple thread implementation that asserts() on deadlocks in
8421         single-threaded code.
8422
8423         * test/bus-test.c:
8424         (main) Call debug_threads_init.
8425
8426         * test/watch.c:
8427         Use disconnect message instead of disconnect callback.
8428
8429         * bus/connection.c:
8430         * bus/connection.h:
8431         Don't call dbus_connection_set_disconnect_function. Instead export
8432         bus_connection_disconnect.
8433
8434         * bus/dispatch.c:
8435         Call bus_connection_disconnect when we get a disconnected message.
8436
8437 2003-02-15  Havoc Pennington  <hp@pobox.com>
8438
8439         * dbus/dbus-message.c (dbus_message_new): fool around with the
8440         docs
8441
8442 2003-02-14  Havoc Pennington  <hp@pobox.com>
8443
8444         * dbus/dbus-mempool.c: fail if the debug functions so indicate
8445
8446         * dbus/dbus-memory.c: fail if the debug functions indicate we
8447         should
8448
8449         * dbus/dbus-internals.c (_dbus_set_fail_alloc_counter)
8450         (_dbus_decrement_fail_alloc_counter): debug functions to
8451         simulate memory allocation failures
8452
8453 2003-02-14  Havoc Pennington  <hp@pobox.com>
8454
8455         * dbus/dbus-errors.h (struct DBusError): add a word of padding
8456         to DBusError
8457
8458 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
8459
8460         * bus/driver.c: (bus_driver_handle_hello):
8461         * bus/driver.h:
8462         * bus/services.c: (bus_service_lookup):
8463         Reorder message sending so we get a more sane order.
8464
8465         * test/bus-test.c: (message_handler):
8466         Fix tyop.
8467
8468 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
8469
8470         * bus/driver.c: (bus_driver_send_service_deleted),
8471         (bus_driver_send_service_created), (bus_driver_send_service_lost),
8472         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
8473         (bus_driver_send_welcome_message),
8474         (bus_driver_handle_list_services),
8475         (bus_driver_handle_acquire_service),
8476         (bus_driver_handle_service_exists):
8477         * dbus/dbus-bus.c: (dbus_bus_register_client),
8478         (dbus_bus_acquire_service), (dbus_bus_service_exists):
8479         * dbus/dbus-errors.c: (dbus_result_to_string):
8480         * dbus/dbus-errors.h:
8481         * dbus/dbus-message.c: (dbus_message_append_args),
8482         (dbus_message_append_args_valist), (dbus_message_get_args),
8483         (dbus_message_get_args_valist), (dbus_message_get_args_iter),
8484         (dbus_message_iter_get_arg_type), (dbus_message_iter_get_string),
8485         (dbus_message_iter_get_byte_array),
8486         (dbus_message_iter_get_string_array), (message_iter_test),
8487         (check_message_handling), (_dbus_message_test):
8488         * dbus/dbus-message.h:
8489         * test/bus-test.c: (main):
8490         Change fields to arguments in messages, so that they won't be
8491         confused with header fields.
8492
8493         * glib/test-dbus-glib.c: (main):
8494         Remove append_fields from hello message.
8495
8496 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
8497
8498         * dbus/dbus-errors.c:
8499         * dbus/dbus-message.c:
8500         * dbus/dbus-string.c:
8501         Documentation fixes.
8502
8503 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
8504
8505         * glib/dbus-gmain.c: (timeout_handler), (add_timeout),
8506         (remove_timeout):
8507         Implement support for timeouts in dbus-glib.
8508
8509 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
8510
8511         * dbus/dbus-message-builder.c: (_dbus_message_data_load):
8512         * dbus/dbus-message.c: (process_test_subdir):
8513         * test/break-loader.c: (find_breaks_based_on):
8514         Plug some memory leaks.
8515
8516 2003-02-13  Richard Hult  <rhult@codefactory.se>
8517
8518         * bus/main.c: Fix build.
8519
8520         * dbus/dbus-errors.h:
8521         * dbus/dbus-errors.c: Fix copyright for Anders.
8522
8523 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
8524
8525         * bus/Makefile.am:
8526         Add utils.[ch]
8527
8528         * bus/connection.c: (bus_connection_foreach):
8529         Fix a warning.
8530
8531         * bus/desktop-file.c: (grow_lines_in_section), (grow_sections),
8532         (unescape_string), (new_section), (parse_section_start),
8533         (parse_key_value), (report_error), (bus_desktop_file_load),
8534         (bus_desktop_file_get_string):
8535         * bus/desktop-file.h:
8536         Use DBusError for error reporting.
8537
8538         * bus/dispatch.c: (send_one_message),
8539         (bus_dispatch_message_handler):
8540         * bus/driver.c: (bus_driver_send_service_deleted),
8541         (bus_driver_send_service_created), (bus_driver_send_service_lost),
8542         (bus_driver_send_service_acquired), (bus_driver_handle_hello),
8543         (bus_driver_send_welcome_message),
8544         (bus_driver_handle_list_services),
8545         (bus_driver_handle_acquire_service),
8546         (bus_driver_handle_service_exists):
8547         * bus/loop.c: (bus_loop_run):
8548         * bus/main.c:
8549         Use BUS_HANDLE_OOM instead of _DBUS_HANDLE_OOM.
8550
8551         * bus/utils.c: (bus_wait_for_memory):
8552         * bus/utils.h:
8553         New files with general utility functions.
8554
8555         * dbus/dbus-internals.h:
8556         Remove _DBUS_HANDLE_OOM.
8557
8558 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
8559
8560         * dbus/dbus-errors.c: (dbus_result_to_string), (dbus_error_init),
8561         (dbus_error_free), (dbus_set_error_const), (dbus_set_error):
8562         * dbus/dbus-errors.h:
8563         Add DBusError structure.
8564
8565 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
8566
8567         * test/data/valid-messages/standard-acquire-service.message:
8568         * test/data/valid-messages/standard-hello.message:
8569         * test/data/valid-messages/standard-list-services.message:
8570         * test/data/valid-messages/standard-service-exists.message:
8571         Add some standard messages.
8572
8573 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
8574
8575         * bus/driver.c: (bus_driver_send_welcome_message),
8576         (bus_driver_handle_list_services),
8577         (bus_driver_handle_acquire_service),
8578         (bus_driver_handle_service_exists), (bus_driver_handle_message):
8579         Update for API changes in libdbus.
8580
8581         * dbus/dbus-message.c: (dbus_message_new_reply):
8582         * dbus/dbus-message.h:
8583         Remove the name argument. The spec states that replies shouldn't
8584         have a name.
8585
8586 2003-02-13  Anders Carlsson  <andersca@codefactory.se>
8587
8588         * bus/desktop-file.c: (parse_section_start), (parse_key_value),
8589         (report_error), (bus_desktop_file_load), (lookup_section),
8590         (lookup_line), (bus_desktop_file_get_raw),
8591         (bus_desktop_file_get_string):
8592         * bus/desktop-file.h:
8593         Some fixes, and new functions for getting a key value from a section.
8594
8595 2003-02-13  Havoc Pennington  <hp@pobox.com>
8596
8597         * test/data/auth/fail-after-n-attempts.auth-script: new test
8598
8599         * dbus/dbus-auth.c (send_rejected): shutdown_mech() when we
8600         reject the client.
8601
8602 2003-02-13  Havoc Pennington  <hp@pobox.com>
8603
8604         * dbus/dbus-auth.c (handle_server_data_external_mech): args to
8605         dbus_credentials_match were backward
8606
8607         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support
8608         NO_CREDENTIALS and ROOT_CREDENTIALS
8609
8610         * dbus/dbus-auth.c (_dbus_auth_do_work): move get_state() routine
8611         into here. Never process more commands after we've reached an
8612         end state; store further data as unused bytes.
8613
8614         * test/data/auth/*: add more auth tests
8615
8616         * dbus/dbus-auth-script.c (_dbus_auth_script_run): support EXPECT
8617         command to match exact string and EXPECT_UNUSED to match unused
8618         bytes
8619
8620         * test/Makefile.am (dist-hook): fix to dist all the test stuff
8621
8622 2003-02-12  Havoc Pennington  <hp@pobox.com>
8623
8624         * dbus/dbus-string.c (_dbus_string_pop_line): fix to also strip
8625         \r off of popped lines
8626
8627         * dbus/dbus-auth.c (_dbus_auth_test): write code to run auth
8628         scripts
8629
8630         * dbus/dbus-auth-script.c (_dbus_auth_script_run): when doing a
8631         SEND, append \r\n
8632
8633 2003-02-12  Havoc Pennington  <hp@pobox.com>
8634
8635         * dbus/Makefile.am: remove break-loader from the build, since it
8636         moved.
8637
8638         * configure.in: add --enable-gcov to turn on coverage profiling
8639         flags and disable optimization
8640
8641 2003-02-10  Havoc Pennington  <hp@pobox.com>
8642
8643         * dbus/dbus-auth-script.c, dbus/dbus-auth-script.h: sync
8644         initial cut at test framework for DBusAuth from laptop.
8645         Doesn't quite work yet but it compiles and I need to get
8646         it off the 266mhz laptop. ;-)
8647
8648         * dbus/dbus-server-debug.c (_dbus_server_debug_accept_transport):
8649         fix a memleak in error case
8650
8651 2003-02-12  Anders Carlsson  <andersca@codefactory.se>
8652
8653         * bus/Makefile.am:
8654         * bus/desktop-file.c:
8655         * bus/desktop-file.h:
8656         Add a desktop file parser.
8657
8658 2003-02-11  Zack Rusin  <zack@kde.org>
8659
8660         * qt/message.[h|cpp]: sample implementation
8661         of the KDE wrapper for DBusMessage
8662
8663 2003-02-09  Zack Rusin  <zack@kde.org>
8664
8665         * test/bus-test.c: make_it_compile
8666         * doc/dbus-specification.sgml: minimal semantic fix
8667
8668 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
8669
8670         Release 0.3
8671
8672         * NEWS: Update
8673
8674 2003-02-06  Anders Carlsson  <andersca@codefactory.se>
8675
8676         * dbus/Makefile.am:
8677         * dbus/dbus-break-loader.c:
8678         * test/Makefile.am:
8679         * test/break-loader.c:
8680         Move dbus-break-loader to test/ and rename it to break-loader.
8681
8682 2003-02-02  Havoc Pennington  <hp@pobox.com>
8683
8684         * dbus/dbus-keyring.c, dbus/dbus-keyring.h: template files
8685         for code to manage cookies in your home directory
8686
8687         * dbus/dbus-sysdeps.c (_dbus_generate_random_bytes): new function
8688
8689         * dbus/dbus-auth.c (get_state): impose a maximum number of tries
8690         to authenticate, then disconnect the client.
8691
8692 2003-02-03  Alexander Larsson  <alexl@redhat.com>
8693
8694         * dbus/dbus-message.c (dbus_message_append_fields):
8695         Correct docs.
8696
8697 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
8698
8699         * doc/dbus-specification.sgml:
8700         Update address format section.
8701
8702 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
8703
8704         * test/Makefile.am:
8705         * test/bus-test.c: (get_time), (add_timeout), (remove_timeout),
8706         (message_handler), (new_connection_callback), (loop_quit),
8707         (loop_run), (main):
8708         Add bus test.
8709
8710 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
8711
8712         * bus/driver.c: (bus_driver_handle_service_exists):
8713         Simplify the code a bit.
8714
8715         * dbus/dbus-bus.c: (dbus_bus_service_exists):
8716         Fix a silly.
8717
8718 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
8719
8720         * bus/Makefile.am:
8721         Add libdbus-daemon.la and link to it.
8722
8723 2003-02-01  James Willcox  <jwillcox@gnome.org>
8724
8725         * bus/driver.c: (bus_driver_handle_own_service):
8726         Actually include the service reply code in the message.
8727
8728 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
8729
8730         * bus/driver.c: (bus_driver_handle_service_exists):
8731         Don't unref the incoming message.
8732
8733 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
8734
8735         * dbus/dbus.h: Add dbus-address.h and dbus-bus.h
8736
8737 2003-02-02  Anders Carlsson  <andersca@codefactory.se>
8738
8739         * dbus/dbus-server.c: (dbus_server_listen):
8740         * dbus/dbus-transport.c: (_dbus_transport_open):
8741         ifdef out the calls to the debug transport and server.
8742
8743 2003-02-02  Alexander Larsson  <alexl@redhat.com>
8744
8745         * dbus/dbus-watch.c (dbus_watch_get_flags):
8746         Add note in the docs that ERROR or HANGUP won't be returned
8747         and are assumed always on.
8748
8749         * glib/dbus-gmain.c (add_watch):
8750         Always add IO_ERR | IO_HUP
8751
8752         * dbus/dbus-message.h:
8753         Add semicolon after dbus_message_iter_get_string_array().
8754         Makes qt code build again
8755
8756 2003-02-01  Anders Carlsson  <andersca@codefactory.se>
8757
8758         * bus/driver.c: (create_unique_client_name),
8759         (bus_driver_handle_hello):
8760         Don't take a name, just use a numeric id to identify
8761         each client.
8762
8763         * dbus/Makefile.am:
8764         * dbus/dbus-bus.c: (dbus_bus_register_client),
8765         (dbus_bus_acquire_service), (dbus_bus_service_exists):
8766         * dbus/dbus-bus.h:
8767         Add new convenience functions for communicating with the bus.
8768
8769         * dbus/dbus-message.h:
8770
8771         * dbus/dbus-protocol.h:
8772         Fix a typo.
8773
8774 2003-02-01  Alexander Larsson  <alexl@redhat.com>
8775
8776         * dbus/dbus-message.c (dbus_message_append_fields):
8777         Add some more doc comments.
8778
8779 2003-02-01  Havoc Pennington  <hp@pobox.com>
8780
8781         * dbus/dbus-break-loader.c (randomly_modify_length): change
8782         a 4-byte value in the message as if it were a length
8783
8784         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): don't set
8785         execute bit on saved files
8786
8787 2003-02-01  Havoc Pennington  <hp@pobox.com>
8788
8789         * dbus/dbus-break-loader.c (main): new program to find messages
8790         that break the loader.
8791
8792         * dbus/dbus-sysdeps.c (_dbus_string_append_uint): new function
8793         * dbus/dbus-sysdeps.c (_dbus_string_save_to_file): new function
8794
8795         * dbus/dbus-string.c (_dbus_string_set_byte): new
8796
8797 2003-01-31  Havoc Pennington  <hp@pobox.com>
8798
8799         * dbus/dbus-message.c: refactor the test code to be more general,
8800         in preparation for writing a "randomly permute test cases to
8801         try to break the loader" program.
8802
8803 2003-01-31  Havoc Pennington  <hp@pobox.com>
8804
8805         * doc/dbus-specification.sgml: work on the specification
8806
8807         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): check
8808         the protocol version of the message.
8809
8810         * dbus/dbus-protocol.h: drop special _REPLY names, the spec
8811         no longer specifies that.
8812         (DBUS_SERVICE_REPLY_SERVICE_EXISTS): fix flags (1/2/4/8 not
8813         1/2/3/4)
8814
8815         * dbus/dbus-marshal.c (_dbus_marshal_get_arg_end_pos): add missing
8816         "break" for DBUS_TYPE_NIL, remove @todo
8817
8818 2003-01-31  Havoc Pennington  <hp@pobox.com>
8819
8820         * dbus/dbus-message.c (dbus_message_set_is_error_reply): rename
8821         just set_is_error/get_is_error as this is a commonly-used
8822         function, and write docs.
8823
8824 2003-01-31  Anders Carlsson  <andersca@codefactory.se>
8825
8826         * dbus/dbus-address.c: (dbus_address_entry_free):
8827         Free key and value lists.
8828
8829         * dbus/dbus-internals.c: (_dbus_type_to_string):
8830         Add the types we didn't have.
8831
8832         * dbus/dbus-marshal.c: (_dbus_marshal_get_arg_end_pos),
8833         (_dbus_marshal_validate_arg):
8834         Add NIL types.
8835
8836         * dbus/dbus-message.c: (dbus_message_set_sender):
8837         Remove todo about being able to set sender to NULL.
8838
8839         (dbus_message_set_is_error_reply),
8840         (dbus_message_get_is_error_reply):
8841         * dbus/dbus-message.h:
8842         New functions.
8843
8844         * dbus/dbus-protocol.h:
8845         Add error reply flag.
8846
8847         * test/data/valid-messages/opposite-endian.message:
8848         Add NIL type to test.
8849
8850 2003-01-31  Havoc Pennington  <hp@pobox.com>
8851
8852         * doc/dbus-specification.sgml: fully specify the header.  Add
8853         flags and major protocol version, and change header/body len to
8854         unsigned.
8855
8856         * dbus/dbus-message-builder.c (append_saved_length): append length
8857         as uint32
8858
8859         * dbus/dbus-message.c (dbus_message_create_header): change header
8860         length and body length to unsigned. Add the new fields from the
8861         spec
8862         (_dbus_message_loader_return_buffer): unsigned header/body len
8863
8864 2003-01-30  Havoc Pennington  <hp@pobox.com>
8865
8866         * dbus/dbus-auth.c: rework to use only REJECTED, no
8867         MECHANISMS
8868
8869         * doc/dbus-sasl-profile.txt: drop MECHANISMS and just
8870         use REJECTED, suggested by Mark McLoughlin
8871
8872 2003-01-30  Havoc Pennington  <hp@pobox.com>
8873
8874         * dbus/dbus-server.c (dbus_server_listen): @todo about how we need
8875         a better way to report errors here. e.g.  "unix address lacks
8876         path" or something. also "no such file" when the path doesn't
8877         exist, etc.
8878
8879         * dbus/dbus-address.c (dbus_address_entries_free): add @todo about
8880         leaking list nodes
8881         (dbus_parse_address): add @todo about documenting address format,
8882         and allowing , and ; to be escaped
8883
8884 2003-01-30  Anders Carlsson  <andersca@codefactory.se>
8885
8886         * dbus/Makefile.am:
8887         Add dbus-address.[ch]
8888
8889         * dbus/dbus-address.c: (dbus_address_entry_free),
8890         (dbus_address_entries_free), (create_entry),
8891         (dbus_address_entry_get_method), (dbus_address_entry_get_value),
8892         (dbus_parse_address), (_dbus_address_test):
8893         * dbus/dbus-address.h:
8894         New files for dealing with address parsing.
8895
8896         * dbus/dbus-connection.c:
8897         Document timeout functions.
8898
8899         * dbus/dbus-message.c:
8900         Document dbus_message_new_from_message.
8901
8902         * dbus/dbus-server-debug.c:
8903         Document.
8904
8905         * dbus/dbus-server.c: (dbus_server_listen):
8906         Parse address and use correct server implementation.
8907
8908         * dbus/dbus-string.c: (_dbus_string_find_to), (_dbus_string_test):
8909         * dbus/dbus-string.h:
8910         New function with test.
8911
8912         * dbus/dbus-test.c: (dbus_internal_symbol_do_not_use_run_tests):
8913         * dbus/dbus-test.h:
8914         Add address tests.
8915
8916         * dbus/dbus-transport-debug.c:
8917         Document.
8918
8919         * dbus/dbus-transport.c: (_dbus_transport_open):
8920         Parse address and use correct transport implementation.
8921
8922 2003-01-30  Havoc Pennington  <hp@pobox.com>
8923
8924         * dbus/dbus-message.c: use message->byte_order instead of
8925         DBUS_COMPILER_BYTE_ORDER throughout.
8926         (dbus_message_create_header): pad header to align the
8927         start of the body of the message to 8-byte boundary
8928
8929         * dbus/dbus-marshal.h: make all the demarshalers take const
8930         DBusString arguments.
8931
8932         * dbus/dbus-message.c (_dbus_message_loader_return_buffer):
8933         validate message args here, so we don't have to do slow validation
8934         later, and so we catch bad messages as they are incoming. Also add
8935         better checks on header_len and body_len. Also fill in
8936         message->byte_order
8937
8938         * dbus/dbus-string.c (_dbus_string_validate_utf8): new (not
8939         implemented properly)
8940         (_dbus_string_validate_nul): new function to check all-nul
8941
8942         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): rename
8943         get_arg_end_pos and remove all validation
8944         (_dbus_marshal_validate_arg): actually do validation here.
8945
8946 2003-01-29  Havoc Pennington  <hp@pobox.com>
8947
8948         * dbus/dbus-message.c (check_message_handling): fix assertion
8949         failure on set_client_serial
8950
8951 2003-01-28  Havoc Pennington  <hp@pobox.com>
8952
8953         * dbus/dbus-server-debug.c: Add doc section comments
8954
8955         * dbus/dbus-transport-debug.c: add doc section comments
8956
8957 2003-01-28  Havoc Pennington  <hp@redhat.com>
8958
8959         * dbus/dbus-string.c (_dbus_string_base64_decode): append bytes in
8960         the reverse order from how I had it
8961         (_dbus_string_base64_encode): reverse encoding order. I was
8962         basically byteswapping everything during encoding.
8963
8964 2003-01-28  Anders Carlsson  <andersca@codefactory.se>
8965
8966         * dbus/dbus-connection-internal.h:
8967         * dbus/dbus-connection.c: (_dbus_connection_add_timeout),
8968         (_dbus_connection_remove_timeout):
8969         Add functions for adding and removing timeouts.
8970
8971         * dbus/dbus-message.c: (dbus_message_new_from_message):
8972         Add new function that takes a message and creates an exact
8973         copy of it, but with the refcount set to 1.
8974         (check_message_handling):
8975         Fix build error.
8976
8977         * dbus/dbus-server-protected.h:
8978         * dbus/dbus-server.c: (_dbus_server_init_base),
8979         (_dbus_server_finalize_base), (_dbus_server_add_timeout),
8980         (dbus_server_set_timeout_functions):
8981         (_dbus_server_remove_timeout):
8982         New functions so that a server can add and remove timeouts.
8983
8984         (dbus_server_listen):
8985         Add commented out call to dbus_server_debug_new.
8986
8987         * dbus/dbus-timeout.c: (_dbus_timeout_new):
8988         Actually set the handler, doh.
8989
8990         * dbus/dbus-transport.c: (_dbus_transport_open):
8991         Add commented out call to dbus_transport_debug_client_new.
8992
8993         * dbus/Makefile.am:
8994         Add dbus-transport-debug.[ch] and dbus-server-debug.[ch]
8995
8996 2003-01-28  Havoc Pennington  <hp@pobox.com>
8997
8998         * dbus/dbus-message.c (check_message_handling): function to check
8999         on the loaded message, iterates over it etc.
9000
9001 2003-01-28  Havoc Pennington  <hp@pobox.com>
9002
9003         * test/Makefile.am (dist-hook): fix make distdir
9004
9005         * dbus/Makefile.am (TESTS_ENVIRONMENT): fix make check
9006
9007 2003-01-27  Havoc Pennington  <hp@pobox.com>
9008
9009         * dbus/dbus-mempool.c (time_for_size): replace printf with
9010         _dbus_verbose
9011
9012         * dbus/dbus-message-builder.c (_dbus_message_data_load): allow
9013         empty lines; fix the SAVE_LENGTH stuff to be
9014         START_LENGTH/END_LENGTH so it actually works; couple other
9015         bugfixes
9016
9017         * test/Makefile.am (dist-hook): add dist-hook for .message files
9018
9019         * dbus/dbus-string.c (DBUS_STRING_COPY_PREAMBLE): source of a copy
9020         can be constant or locked.
9021         (_dbus_string_free): allow freeing a const string as
9022         documented/intended
9023
9024         * dbus/dbus-sysdeps.c (_dbus_concat_dir_and_file): utility
9025
9026         * dbus/dbus-test-main.c (main): take an argument which is the
9027         directory containing test data
9028
9029         * dbus/dbus-message.c (_dbus_message_test): pass a test_data_dir
9030         argument to this and load all the messages in test/data/
9031         checking that they can be loaded or not loaded as appropriate.
9032
9033 2003-01-27  Anders Carlsson  <andersca@codefactory.se>
9034
9035         * bus/dispatch.c: (bus_dispatch_message_handler):
9036         Dispatch messages sent to services.
9037
9038         * bus/driver.c: (bus_driver_send_service_deleted),
9039         (bus_driver_send_service_created), (bus_driver_send_service_lost),
9040         (bus_driver_send_service_acquired):
9041         Add helper functions for sending service related messages.
9042
9043         (bus_driver_send_welcome_message):
9044         Send HELLO_REPLY instead of WELCOME.
9045
9046         (bus_driver_handle_list_services):
9047         Send LIST_SERVICES_REPLY instead of SERVICES.
9048
9049         (bus_driver_handle_own_service),
9050         (bus_driver_handle_service_exists):
9051         New message handlers.
9052
9053         (bus_driver_handle_message):
9054         Invoke new message handlers.
9055
9056         (bus_driver_remove_connection):
9057         Don't remove any services here since that's done automatically
9058         by bus_service_remove_owner now.
9059
9060         * bus/driver.h:
9061         New function signatures.
9062
9063         * bus/services.c: (bus_service_add_owner):
9064         Send ServiceAcquired message if we're the only primary owner.
9065
9066         (bus_service_remove_owner):
9067         Send ServiceAcquired/ServiceLost messages.
9068
9069         (bus_service_set_prohibit_replacement),
9070         (bus_service_get_prohibit_replacement):
9071         Functions for setting prohibit replacement.
9072
9073         (bus_service_has_owner):
9074         New function that checks if a connection is in the owner queue of
9075         a certain service.
9076
9077         * bus/services.h:
9078         Add new function signatures.
9079
9080         * dbus/dbus-list.c: (_dbus_list_test):
9081         Add tests for _dbus_list_remove_last and traversing the list backwards.
9082
9083         * dbus/dbus-list.h:
9084         Fix a typo in _dbus_list_get_prev_link, if we're at the first element we can't
9085         go any further, so return NULL then.
9086
9087         * dbus/dbus-protocol.h:
9088         Add new messages, service flags and service replies.
9089
9090 2003-01-26  Havoc Pennington  <hp@pobox.com>
9091
9092         * dbus/dbus-message-builder.c: implement, completely untested.
9093
9094         * test/data/*: add data to be used in testing.
9095         ".message" files are our simple loadable text format.
9096         ".message-raw" will be binary dumps of messages.
9097
9098         * dbus/dbus-string.c (_dbus_string_starts_with_c_str): new
9099
9100 2003-01-26  Havoc Pennington  <hp@pobox.com>
9101
9102         * dbus/dbus-sysdeps.c (_dbus_file_get_contents): new function
9103
9104         * dbus/dbus-errors.c (dbus_result_to_string): add
9105         file errors
9106
9107         * dbus/dbus-message-builder.c: new file, will contain code to load
9108         up messages from files. Not implemented yet.
9109
9110 2003-01-26  Havoc Pennington  <hp@pobox.com>
9111
9112         * dbus/dbus-message.c (dbus_message_set_sender): support deleting
9113         the sender by setting to NULL
9114
9115 2003-01-26  Havoc Pennington  <hp@pobox.com>
9116
9117         The unit tests pass, but otherwise untested.  If it breaks, the
9118         tests should have been better. ;-)
9119
9120         * bus/driver.c (bus_driver_handle_hello): return if we disconnect
9121         the connection.
9122
9123         * dbus/dbus-message.c: redo everything so we maintain
9124         message->header as the only copy of the various fields.
9125         This avoids the possibility of out-of-memory in some cases,
9126         for example dbus_message_lock() can't run out of memory anymore,
9127         and avoids extra copying. Figured I may as well go ahead and do
9128         this since it was busted for dbus_message_lock to not return
9129         failure on OOM, and dbus_message_write_header was totally
9130         unchecked for OOM. Also fixed some random other bugs.
9131
9132         * dbus/dbus-marshal.c (_dbus_marshal_get_field_end_pos): verify
9133         that strings are nul-terminated. Also, end_pos can be equal
9134         to string length just not greater than, I think.
9135         (_dbus_marshal_set_int32): new function
9136         (_dbus_marshal_set_uint32): new function
9137         (_dbus_marshal_set_string): new function
9138
9139         * dbus/dbus-connection.c (_dbus_connection_new_for_transport): fix
9140         a warning, init timeout_list to NULL
9141         (dbus_connection_send_message): don't use uninitialized variable
9142         "serial"
9143
9144         * dbus/dbus-string.c (_dbus_string_replace_len): new function
9145
9146 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
9147
9148         * bus/driver.c: (bus_driver_handle_hello),
9149         (bus_driver_send_welcome_message):
9150         Plug leaks
9151
9152 2003-01-26  Anders Carlsson  <andersca@codefactory.se>
9153
9154         * dbus/dbus-auth.c: (process_auth), (_dbus_auth_unref):
9155         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
9156         (dbus_connection_unref):
9157         * dbus/dbus-marshal.c: (_dbus_marshal_test):
9158         * dbus/dbus-message.c: (dbus_message_unref),
9159         Plug memory leaks.
9160
9161         (dbus_message_get_fields):
9162         Remove debugging printout.
9163
9164         (_dbus_message_loader_return_buffer):
9165         Don't store the header string.
9166
9167         (_dbus_message_test):
9168         Plug leaks.
9169
9170 2003-01-26  Richard Hult  <rhult@codefactory.se>
9171
9172         * glib/dbus-gmain.c (dbus_connection_dispatch): Traverse a copy of
9173         the file descriptor list, since it can change under us.
9174
9175 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
9176
9177         * glib/dbus-gmain.c: (dbus_connection_prepare),
9178         (dbus_connection_check), (dbus_connection_dispatch), (add_watch),
9179         (remove_watch), (dbus_connection_hookup_with_g_main):
9180         Rewrite the glib handling to use its own GSource instead of a
9181         GIOChannel so we can catch messages put in the queue while waiting
9182         for a reply.
9183
9184 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
9185
9186         * bus/Makefile.am:
9187         * bus/connection.c: (connection_disconnect_handler),
9188         (connection_watch_callback), (bus_connection_setup):
9189         * bus/dispatch.c: (send_one_message),
9190         (bus_dispatch_broadcast_message), (bus_dispatch_message_handler),
9191         (bus_dispatch_add_connection), (bus_dispatch_remove_connection):
9192         * bus/dispatch.h:
9193         * bus/driver.c: (bus_driver_send_service_deleted),
9194         (bus_driver_send_service_created), (bus_driver_handle_hello),
9195         (bus_driver_send_welcome_message),
9196         (bus_driver_handle_list_services), (bus_driver_remove_connection),
9197         (bus_driver_handle_message):
9198         * bus/driver.h:
9199         Refactor code, put the message dispatching in its own file. Use
9200         _DBUS_HANDLE_OOM. Also send ServiceDeleted messages when a client
9201         is disconnected.
9202
9203 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
9204
9205         * dbus/dbus-internals.h:
9206         Add _DBUS_HANDLE_OOM macro, it doesn't do anything currently.
9207
9208         * dbus/dbus-message.c: (dbus_message_get_sender):
9209         * dbus/dbus-message.h:
9210         Implement dbus_message_get_sender.
9211
9212         * dbus/dbus-protocol.h:
9213         Add message and service defines.
9214
9215 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
9216
9217         * dbus/dbus-connection.c: (dbus_connection_send_message):
9218         * dbus/dbus-message-internal.h:
9219         * dbus/dbus-message.c: (_dbus_message_get_client_serial),
9220         (dbus_message_write_header):
9221         Remove _dbus_messag_unlock and don't set the client serial on a
9222         message if one already exists.
9223
9224 2003-01-24  Havoc Pennington  <hp@pobox.com>
9225
9226         * dbus/dbus-list.c (alloc_link): put a thread lock on the global
9227         list_pool
9228
9229         * bus/driver.c (bus_driver_handle_list_services): fix a leak
9230         on OOM
9231
9232 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
9233
9234         * dbus/dbus-list.c: (alloc_link), (free_link):
9235         Use a memory pool for the links.
9236
9237 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
9238
9239         * bus/connection.c: (bus_connection_foreach):
9240         * bus/connection.h:
9241         Add new bus_connection_foreach function.
9242
9243         * bus/driver.c: (send_one_message), (bus_driver_broadcast_message):
9244         Add function that broadcasts a message to all clients.
9245
9246         (bus_driver_send_service_created), (bus_driver_handle_hello),
9247         (bus_driver_send_welcome_message),
9248         (bus_driver_handle_list_services), (bus_driver_message_handler):
9249         Implement functions that take care of listing services, and notifying
9250         clients when new services are created.
9251
9252         * bus/services.c: (bus_services_list):
9253         * bus/services.h:
9254         Add new function that returns an array of strings with the currently
9255         registered services.
9256
9257         * glib/dbus-glib.h:
9258         * glib/dbus-gmain.c:
9259         Update copyright year.
9260
9261 2003-01-25  Anders Carlsson  <andersca@codefactory.se>
9262
9263         * dbus/dbus-connection.c: (dbus_connection_send_message):
9264         Unlock the message in case it was sent earlier.
9265
9266         (dbus_connection_send_message_with_reply_and_block):
9267         Remove the reply message from the list.
9268
9269         * dbus/dbus-marshal.c: (_dbus_demarshal_string_array):
9270         Set array_len and new_pos correctly.
9271
9272         (_dbus_marshal_test):
9273         Remove debug output.
9274
9275         * dbus/dbus-message-internal.h:
9276         * dbus/dbus-message.c: (_dbus_message_get_reply_serial):
9277         New function that returns the reply serial.
9278
9279         (_dbus_message_unlock):
9280         New function that unlocks a message and resets its header.
9281
9282         (dbus_message_append_string_array),
9283         (dbus_message_get_fields_valist),
9284         (dbus_message_iter_get_field_type),
9285         (dbus_message_iter_get_string_array),
9286         (dbus_message_get_fields),
9287         (dbus_message_append_fields_valist):
9288         Handle string arrays.
9289
9290         (dbus_message_set_sender):
9291         Make this function public since the bus daemon needs it.
9292
9293         (decode_header_data):
9294         Set the reply serial to -1 initially.
9295
9296         * dbus/dbus-message.h:
9297         Add dbus_message_set_sender.
9298
9299 2003-01-24  Havoc Pennington  <hp@pobox.com>
9300
9301         * doc/dbus-specification.sgml: add some stuff
9302
9303 2003-01-22  Havoc Pennington  <hp@pobox.com>
9304
9305         * doc/dbus-specification.sgml: Start to document the protocol.
9306
9307 2003-01-22  Havoc Pennington  <hp@pobox.com>
9308
9309         * dbus/dbus-connection.c
9310         (dbus_connection_send_message_with_reply_and_block): add some @todo
9311
9312         * bus/driver.c (bus_driver_add_connection): add a FIXME about memleak
9313
9314 2003-01-21  Havoc Pennington  <hp@pobox.com>
9315
9316         (patch untested because can't compile)
9317
9318         * bus/driver.c (create_unique_client_name): make this function
9319         never recycle client names. Also, caller should initialize
9320         the DBusString.
9321
9322         * dbus/dbus-sysdeps.c (_dbus_get_current_time): new function
9323
9324 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
9325
9326         * dbus/dbus-marshal.c: (_dbus_marshal_double),
9327         (_dbus_marshal_int32), (_dbus_marshal_uint32),
9328         (_dbus_marshal_int32_array), (_dbus_marshal_uint32_array),
9329         (_dbus_marshal_double_array), (_dbus_marshal_string_array),
9330         (_dbus_demarshal_int32_array), (_dbus_demarshal_uint32_array),
9331         (_dbus_demarshal_double_array), (_dbus_demarshal_string_array),
9332         (_dbus_marshal_get_field_end_pos), (_dbus_marshal_test):
9333         * dbus/dbus-marshal.h:
9334         * dbus/dbus-protocol.h:
9335         Add support for marshalling and demarshalling integer, double
9336         and string arrays.
9337
9338 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
9339
9340         * bus/Makefile.am:
9341         Add driver.[ch]
9342
9343         * bus/connection.c: (connection_disconnect_handler):
9344         Remove the connection from the bus driver's list.
9345
9346         (connection_watch_callback): Dispatch messages.
9347
9348         (free_connection_data): Free connection name.
9349
9350         (bus_connection_setup): Add connection to the bus driver's list.
9351         (bus_connection_remove_owned_service):
9352         (bus_connection_set_name), (bus_connection_get_name):
9353         Add functions for setting and getting the connection's name.
9354
9355         * bus/connection.h:
9356         Add function headers.
9357
9358         * bus/driver.c: (create_unique_client_name),
9359         (bus_driver_handle_hello_message),
9360         (bus_driver_send_welcome_message), (bus_driver_message_handler),
9361         (bus_driver_add_connection), (bus_driver_remove_connection):
9362         * bus/driver.h:
9363         * bus/main.c:
9364         * bus/services.c: (bus_service_free):
9365         * bus/services.h:
9366         New file that handles communication and registreation with the bus
9367         itself.
9368
9369 2003-01-21  Anders Carlsson  <andersca@codefactory.se>
9370
9371         * dbus/dbus-connection.c: (dbus_connection_send_message):
9372         Add a new client_serial parameter.
9373
9374         (dbus_connection_send_message_with_reply):
9375         Remove a @todo since we've implemented the blocking function.
9376
9377         (dbus_connection_send_message_with_reply_and_block):
9378         New function that sends a message and waits for a reply and
9379         then returns the reply.
9380
9381         * dbus/dbus-connection.h:
9382         Add new functions.
9383
9384         * dbus/dbus-errors.c: (dbus_result_to_string):
9385         * dbus/dbus-errors.h:
9386         Add new DBUS_RESULT.
9387
9388         * dbus/dbus-message-internal.h:
9389         * dbus/dbus-message.c: (_dbus_message_get_reply_serial),
9390         (_dbus_message_set_sender), (dbus_message_write_header),
9391         (dbus_message_new_reply), (decode_header_data),
9392         (_dbus_message_loader_return_buffer), (_dbus_message_test):
9393         * dbus/dbus-message.h:
9394         Add new functions that set the reply serial and sender.
9395         Also marshal and demarshal them correctly and add test.
9396
9397         * dbus/dbus-protocol.h:
9398         Add new DBUS_MESSAGE_TYPE_SENDER.
9399
9400         * glib/dbus-glib.h:
9401         * glib/dbus-gmain.c: (watch_callback), (free_callback_data),
9402         (add_watch), (remove_watch), (add_timeout), (remove_timeout),
9403         (dbus_connection_hookup_with_g_main):
9404         * glib/test-dbus-glib.c: (main):
9405         Rewrite to use GIOChannel and remove the GSource crack.
9406
9407         * test/echo-client.c: (main):
9408         * test/watch.c: (check_messages):
9409         Update for changed APIs
9410
9411 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
9412
9413         * dbus/Makefile.am: Add dbus-timeout.[cħ]
9414
9415         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport):
9416         Create a DBusTimeoutList.
9417         (dbus_connection_set_timeout_functions): Add new function to
9418         set timeout callbacks
9419
9420         * dbus/dbus-connection.h: Add public DBusTimeout API.
9421
9422         * dbus/dbus-message.c: (dbus_message_get_service):
9423         * dbus/dbus-message.h:  New function.
9424
9425         * dbus/dbus-server.c: Fix small doc typo.
9426
9427         * dbus/dbus-timeout.[ch]: New files for mainloop timeouts.
9428
9429 2003-01-19  Anders Carlsson  <andersca@codefactory.se>
9430
9431         * dbus/dbus-string.c (_dbus_string_move_len): Don't delete all
9432         of the string, just as long as specified.
9433
9434 2003-01-19  Havoc Pennington  <hp@pobox.com>
9435
9436         * dbus/dbus-connection.c (dbus_connection_get_is_authenticated):
9437         new function
9438
9439         * dbus/dbus-server.c (dbus_server_set_max_connections)
9440         (dbus_server_get_max_connections, dbus_server_get_n_connections):
9441         keep track of current number of connections, and add API for
9442         setting a max (but haven't implemented enforcing the max yet)
9443
9444 2003-01-18  Havoc Pennington  <hp@pobox.com>
9445
9446         * dbus/dbus-transport-unix.c (unix_do_iteration): only do the
9447         reading/writing if read_watch != NULL or write_watch != NULL.
9448
9449         * dbus/dbus-message.c (_dbus_message_loader_return_buffer): fix
9450         the message loader code to actually load message->header and
9451         message->body into the newly-created message.
9452
9453         * dbus/dbus-transport-unix.c (check_write_watch): fix a mem leak
9454         in OOM case
9455
9456         * dbus/dbus-connection.c (dbus_connection_set_max_message_size)
9457         (dbus_connection_get_max_message_size)
9458         (dbus_connection_set_max_live_messages_size)
9459         (dbus_connection_get_max_live_messages_size): implement some
9460         resource limitation functions
9461
9462         * dbus/dbus-resources.c: new file implementing some of the
9463         resource limits stuff
9464
9465         * dbus/dbus-message.c (dbus_message_iter_get_byte_array): add
9466         missing docs, add @todo to handle OOM etc.
9467
9468         * dbus/dbus-marshal.c (_dbus_demarshal_byte_array): add missing
9469         docs
9470
9471 2003-01-18  Havoc Pennington  <hp@pobox.com>
9472
9473         * dbus/dbus-connection.c (dbus_connection_unref): disconnect the
9474         connection if it hasn't been already.
9475
9476         * dbus/dbus-connection.h: kill off the idea of an ErrorFunction,
9477         replace with DisconnectFunction.
9478
9479 2003-01-18  Havoc Pennington  <hp@pobox.com>
9480
9481         Building --disable-verbose-mode --disable-asserts --disable-tests
9482         cuts the library from 112K to 45K or so
9483
9484         * configure.in: check for varargs macro support,
9485         add --enable-verbose-mode, --enable-asserts.
9486
9487         * dbus/dbus-internals.h (_dbus_assert): support
9488         DBUS_DISABLE_ASSERT
9489         (_dbus_verbose): support DBUS_ENABLE_VERBOSE_MODE
9490
9491 2003-01-18  Havoc Pennington  <hp@pobox.com>
9492
9493         * dbus/dbus-test.c: include config.h so that tests actually run
9494
9495         * dbus/dbus-string.c: add assertions that stuff is 8-byte aligned,
9496         so the failure mode when that assumption fails will be plenty
9497         obvious.
9498
9499 2003-01-18  Havoc Pennington  <hp@pobox.com>
9500
9501         * configure.in: default --enable-tests to $USE_MAINTAINER_MODE
9502
9503         * dbus/Makefile.am: fix it up so dubs-test-main.c is included in
9504         the distribution
9505
9506         * test/Makefile.am: don't use special variable "TESTS" for echo-*
9507         since we don't want to use those in make check
9508
9509 2003-01-15  Havoc Pennington  <hp@redhat.com>
9510
9511         Release 0.2
9512
9513         * NEWS: update
9514
9515 2003-01-15  Havoc Pennington  <hp@redhat.com>
9516
9517         * test/Makefile.am: fix so that test source code ends up in the
9518         distribution on make distcheck
9519
9520 2003-01-15  Havoc Pennington  <hp@redhat.com>
9521
9522         Release 0.1.
9523
9524         * NEWS: update
9525
9526 2003-01-15  Havoc Pennington  <hp@redhat.com>
9527
9528         * dbus/dbus-test.c (dbus_internal_symbol_do_not_use_run_tests):
9529         fix build when --disable-tests
9530
9531         * Makefile.am (EXTRA_DIST): put HACKING in here
9532
9533         * HACKING: document procedure for making a tarball release.
9534
9535 2003-01-14  Anders Carlsson  <andersca@codefactory.se>
9536
9537         * bus/connection.c: (connection_error_handler),
9538         (bus_connection_setup):
9539         * bus/main.c: (main):
9540         Make sure that the DBusConnectionData struct is NULLed
9541         out to prevent a segfault.
9542
9543         * dbus/dbus-errors.c: (dbus_result_to_string):
9544         * dbus/dbus-errors.h:
9545         * dbus/dbus-message.c: (dbus_message_get_fields),
9546         (dbus_message_get_fields_valist), (_dbus_message_test):
9547         * dbus/dbus-message.h:
9548         Make dbus_message_get_fields return a result code so we can
9549         track invalid fields as well as oom.
9550
9551 2003-01-11  Havoc Pennington  <hp@pobox.com>
9552
9553         * configure.in: change --enable-test/--enable-ansi action-if-given
9554         to enable_foo=$enableval instead of enable_foo=yes
9555
9556 2003-01-08  Havoc Pennington  <hp@pobox.com>
9557
9558         * dbus/dbus-string.c (_dbus_string_align_length): new function
9559
9560         * dbus/dbus-test-main.c: move main() for test app here
9561         * dbus/dbus-test.c
9562         (dbus_internal_symbol_do_not_use_run_tests): we have to export a
9563         symbol to run tests, because dbus-test isn't in the main
9564         library
9565
9566         Code review nitpicks.
9567
9568         * dbus/dbus-message.c (dbus_message_write_header): add newlines
9569         for people with narrow emacs ;-). Assert client_serial was filled
9570         in. Assert message->name != NULL.
9571         (dbus_message_append_fields): have "first_field_type" arg separate
9572         from va list, needed for C++ binding that also uses varargs IIRC
9573         and helps with type safety
9574         (dbus_message_new): add @todo about using DBusString to store
9575         service/name internally
9576         (dbus_message_new): don't leak ->service and ->name on OOM later
9577         in the function
9578         (dbus_message_unref): free the service name
9579         (dbus_message_get_fields): same change to varargs
9580         i.e. first_field_type
9581         (_dbus_message_loader_return_buffer): assert that the message data
9582         is aligned (if not it's a bug in our code). Put in verbose griping
9583         about why we set corrupted = TRUE.
9584         (decode_header_data): add FIXME that char* is evil.  Was going to
9585         add FIXME about evil locale-specific string.h strncmp, but just
9586         switched to wacky string-as-uint32 optimization. Move check for
9587         "no room for field name" above get_const_data_len() to avoid
9588         assertion failure in get_const_data_len if we have trailing 2
9589         bytes or the like. Check for service and name fields being
9590         provided twice. Don't leak service/name on error. Require field
9591         names to be aligned to 4 bytes.
9592
9593         * dbus/dbus-marshal.c: move byte swap stuff to header
9594         (_dbus_pack_int32): uscore-prefix
9595         (_dbus_unpack_int32): uscore-prefix
9596         (_dbus_unpack_uint32): export
9597         (_dbus_demarshal_string): add @todo complaining about use of
9598         memcpy()
9599         (_dbus_marshal_get_field_end_pos): add @todo about bad error
9600         handling allowing corrupt data to go unchecked
9601
9602 2003-01-08  Havoc Pennington  <hp@redhat.com>
9603
9604         * dbus/dbus-transport-unix.c (unix_do_iteration): add read/write
9605         to the select() as needed for authentication. (should be using
9606         _dbus_poll() not select, but for another day)
9607
9608         * dbus/dbus.h: include dbus/dbus-protocol.h
9609
9610 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
9611
9612         * dbus/Makefile.am (dbusinclude_HEADERS): Install
9613         dbus-connection.h
9614
9615 2003-01-08  Anders Carlsson  <andersca@codefactory.se>
9616
9617         * dbus/dbus-internals.c: (_dbus_type_to_string):
9618         New function that returns a string describing a type.
9619
9620         * dbus/dbus-marshal.c: (_dbus_demarshal_byte_array):
9621         * dbus/dbus-marshal.h:
9622         * dbus/dbus-message.c: (dbus_message_get_fields_valist),
9623         (dbus_message_iter_get_field_type), (dbus_message_iter_get_double),
9624         (dbus_message_iter_get_byte_array):
9625         * dbus/dbus-message.h:
9626         Add new convenience functions for appending and getting message fields.
9627         Also add demarshalling routines for byte arrays.
9628
9629 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
9630
9631         * dbus/dbus-connection-internal.h:
9632         * dbus/dbus-connection.c: (_dbus_connection_new_for_transport),
9633         (_dbus_connection_get_next_client_serial),
9634         (dbus_connection_send_message):
9635         * dbus/dbus-internals.h:
9636         * dbus/dbus-marshal.c: (unpack_uint32), (dbus_unpack_int32),
9637         (dbus_pack_int32), (_dbus_marshal_double), (_dbus_marshal_int32),
9638         (_dbus_marshal_uint32), (_dbus_demarshal_double),
9639         (_dbus_demarshal_int32), (_dbus_demarshal_uint32),
9640         (_dbus_demarshal_string), (_dbus_marshal_get_field_end_pos),
9641         (_dbus_verbose_bytes), (_dbus_marshal_test):
9642         * dbus/dbus-marshal.h:
9643         * dbus/dbus-message-internal.h:
9644         * dbus/dbus-message.c: (_dbus_message_set_client_serial),
9645         (dbus_message_write_header), (_dbus_message_lock),
9646         (dbus_message_new), (dbus_message_ref), (dbus_message_unref),
9647         (dbus_message_get_name), (dbus_message_append_int32),
9648         (dbus_message_append_uint32), (dbus_message_append_double),
9649         (dbus_message_append_string), (dbus_message_append_byte_array),
9650         (dbus_message_get_fields_iter), (dbus_message_iter_ref),
9651         (dbus_message_iter_unref), (dbus_message_iter_has_next),
9652         (dbus_message_iter_next), (dbus_message_iter_get_field_type),
9653         (dbus_message_iter_get_string), (dbus_message_iter_get_int32),
9654         (dbus_message_iter_get_uint32), (dbus_message_iter_get_double),
9655         (decode_header_data), (_dbus_message_loader_return_buffer),
9656         (message_iter_test), (_dbus_message_test):
9657         * dbus/dbus-message.h:
9658         * dbus/dbus-protocol.h:
9659         * dbus/dbus-test.c: (main):
9660         * dbus/dbus-test.h:
9661         * glib/test-dbus-glib.c: (message_handler), (main):
9662         * test/echo-client.c: (main):
9663         * test/watch.c: (check_messages):
9664         Make messages sendable and receivable for real.
9665
9666 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
9667
9668         * dbus/dbus-marshal.c: (_dbus_marshal_double),
9669         (_dbus_marshal_string), (_dbus_marshal_byte_array):
9670         * dbus/dbus-message.c: (dbus_message_append_int32),
9671         (dbus_message_append_uint32), (dbus_message_append_double),
9672         (dbus_message_append_string), (dbus_message_append_byte_array):
9673         Handle OOM restoration.
9674
9675 2003-01-07  Anders Carlsson  <andersca@codefactory.se>
9676
9677         * dbus/dbus-marshal.c: (_dbus_marshal_string),
9678         (_dbus_demarshal_string), (_dbus_marshal_test):
9679         * dbus/dbus-marshal.h:
9680         * dbus/dbus-message.c: (dbus_message_get_name),
9681         Document these functions.
9682
9683         (dbus_message_append_int32), (dbus_message_append_uint32),
9684         (dbus_message_append_double), (dbus_message_append_string),
9685         (dbus_message_append_byte_array):
9686         * dbus/dbus-message.h:
9687         Add functions for adding message fields of different types.
9688
9689         * dbus/dbus-protocol.h:
9690         Add the different types.
9691
9692 2003-01-05  Havoc Pennington  <hp@pobox.com>
9693
9694         * bus/connection.c: implement routines for handling connections,
9695         first thing is keeping a list of owned services on each connection
9696         and setting up watches etc.
9697
9698         * bus/services.c: implement a mapping from service names to lists
9699         of connections
9700
9701         * dbus/dbus-hash.c: add DBUS_HASH_POINTER
9702
9703         * dbus/dbus-threads.c (dbus_static_mutex_lock): add functions
9704         to use static mutexes for global data
9705
9706         * dbus/dbus-connection.c (dbus_connection_set_data): add new
9707         collection of functions to set/get application-specific data
9708         on the DBusConnection.
9709
9710 2003-01-04  Havoc Pennington  <hp@pobox.com>
9711
9712         * dbus/dbus-sysdeps.c (_dbus_sleep_milliseconds): new function
9713         (_dbus_poll): new function
9714
9715         * dbus/dbus-internals.h (_DBUS_STRUCT_OFFSET): new macro
9716         copied from GLib
9717
9718         * bus/loop.c: initial code for the daemon main loop
9719
9720 2003-01-04  Havoc Pennington  <hp@pobox.com>
9721
9722         * test/watch.c (error_handler): make it safe if the error handler
9723         is called multiple times (if we s/error handler/disconnect
9724         handler/ we should just guarantee it's called only once)
9725
9726         * dbus/dbus-transport.c (_dbus_transport_disconnect): call the
9727         error handler on disconnect (it's quite possible we should
9728         just change the error handler to a "disconnect handler," I'm
9729         not sure we have any other meaningful errors)
9730
9731         * configure.in: check for getpwnam_r
9732
9733         * dbus/dbus-transport.c, dbus/dbus-transport-unix.c,
9734         dbus/dbus-auth.c: add credentials support, add EXTERNAL auth
9735         mechanism as in SASL spec, using socket credentials
9736
9737         * dbus/dbus-sysdeps.c (_dbus_read_credentials_unix_socket): new function
9738         (_dbus_send_credentials_unix_socket): new function
9739
9740         * dbus/dbus-sysdeps.c (_dbus_accept_unix_socket): rename just
9741         dbus_accept()
9742         (_dbus_write): only check errno if <0 returned
9743         (_dbus_write_two): ditto
9744
9745 2003-01-02  Anders Carlsson  <andersca@codefactory.se>
9746
9747         * dbus/dbus-marshal.c: (_dbus_marshal_utf8_string),
9748         (_dbus_marshal_byte_array), (_dbus_demarshal_utf8_string),
9749         (_dbus_marshal_test):
9750         * dbus/dbus-marshal.h:
9751         Add _dbus_marshal_byte_array and rename _dbus_marshal_string
9752         to _dbus_marshal_utf8_string. Also fix some tests.
9753
9754 2002-12-28  Harri Porten  <porten@kde.org>
9755
9756         * configure.in: added check for C++ compiler and a very cheesy
9757         check for the Qt integration
9758
9759         * Makefile.am (SUBDIRS): compile qt subdir if support is enabled
9760
9761         * qt/Makefile.am: added
9762
9763         * qt/.cvsignore: added
9764
9765         * qt/dbus-qthread.cc, qt/dbus-qthread.cpp: renamed former to
9766         latter, added #ifdef QT_THREAD_SUPPORT guard.
9767
9768         * dbus/Makefile.am: added missing headers for make dist
9769
9770 2002-12-28  Kristian Rietveld  <kris@gtk.org>
9771
9772         * dbus/Makefile.am: fixup export-symbols-regex.
9773
9774 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
9775
9776         * acinclude.m4: Add this file and put the
9777         PKG_CHECK_MODULE macro in it.
9778
9779 2002-12-27  Anders Carlsson  <andersca@codefactory.se>
9780
9781         * dbus/dbus-marshal.c: (_dbus_marshal_string),
9782         (_dbus_demarshal_double), (_dbus_demarshal_int32),
9783         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
9784         (_dbus_marshal_test):
9785         Make the demarshalling routines align the pos argument.
9786         Add string marshalling tests and fix the obvious bugs
9787         discovered.
9788
9789 2002-12-26  Havoc Pennington  <hp@pobox.com>
9790
9791         * dbus/dbus-auth.c: fixes fixes fixes
9792
9793         * dbus/dbus-transport-unix.c: wire up support for
9794         encoding/decoding data on the wire
9795
9796         * dbus/dbus-auth.c (_dbus_auth_encode_data)
9797         (_dbus_auth_decode_data): append to target string
9798         instead of nuking it.
9799
9800 2002-12-26  Havoc Pennington  <hp@pobox.com>
9801
9802         * dbus/dbus-marshal.h (DBUS_COMPILER_BYTE_ORDER): #ifdef
9803         WORDS_BIGENDIAN then compiler byte order is DBUS_BIG_ENDIAN,
9804         doh
9805
9806         * dbus/dbus-marshal.c: Add macros to do int swapping in-place and
9807         avoid swap_bytes() overhead (ignoring possible assembly stuff for
9808         now). Main point is because I wanted unpack_uint32 to implement
9809         _dbus_verbose_bytes
9810         (_dbus_verbose_bytes): new function
9811
9812         * dbus/dbus-string.c (_dbus_string_validate_ascii): new function
9813
9814         * dbus/dbus-message.c (_dbus_message_loader_get_is_corrupted): add
9815         mechanism to handle a corrupt message stream
9816         (_dbus_message_loader_new): fix preallocation to only prealloc,
9817         not prelengthen
9818
9819         * dbus/dbus-string.c (_dbus_string_skip_blank): fix this function
9820         (_dbus_string_test): enhance tests for copy/move and fix the
9821         functions
9822
9823         * dbus/dbus-transport-unix.c: Hold references in more places to
9824         avoid reentrancy problems
9825
9826         * dbus/dbus-transport.c: ditto
9827
9828         * dbus/dbus-connection.c (dbus_connection_dispatch_message): don't
9829         leak reference count in no-message case
9830
9831         * test/watch.c (do_mainloop): handle adding/removing watches
9832         during iteration over the watches. Also, ref the connection/server
9833         stored on a watch, so we don't try to mangle a destroyed one.
9834
9835         * dbus/dbus-transport-unix.c (do_authentication): perform
9836         authentication
9837
9838         * dbus/dbus-auth.c (get_state): add a state
9839         AUTHENTICATED_WITH_UNUSED_BYTES and return it if required
9840         (_dbus_auth_get_unused_bytes): append the unused bytes
9841         to the passed in string, rather than prepend
9842
9843         * dbus/dbus-transport.c (_dbus_transport_init_base): create
9844         the auth conversation DBusAuth
9845
9846         * dbus/dbus-transport-unix.c (_dbus_transport_new_for_fd)
9847         (_dbus_transport_new_for_domain_socket): when creating a
9848         transport, pass in whether it's a client-side or server-side
9849         transport so we know which DBusAuth to create
9850
9851 2002-12-03  Havoc Pennington  <hp@pobox.com>
9852
9853         * dbus/dbus-transport-unix.c (unix_finalize): finalize base
9854         _after_ finalizing the derived members
9855         (unix_connection_set): unref watch if we fail to add it
9856
9857         * dbus/dbus-connection.c (dbus_connection_unref): delete the
9858         transport first, so that the connection owned by the
9859         transport will be valid as the transport finalizes.
9860
9861         * dbus/dbus-transport-unix.c (unix_finalize): free the write_watch
9862         if necessary, and remove watches from the connection.
9863
9864         * dbus/dbus-watch.c (_dbus_watch_list_free): improve a comment
9865
9866 2002-12-26  Anders Carlsson  <andersca@codefactory.se>
9867
9868         * dbus/dbus-marshal.c: (_dbus_marshal_string),
9869         (_dbus_demarshal_double), (_dbus_demarshal_int32),
9870         (_dbus_demarshal_uint32), (_dbus_demarshal_string),
9871         (_dbus_marshal_test):
9872         * dbus/dbus-marshal.h:
9873         Add string marshal functions and have the demarshal functions
9874         return the new position.
9875
9876 2002-12-25  Havoc Pennington  <hp@pobox.com>
9877
9878         * doc/dbus-sasl-profile.txt: docs on the authentication protocol,
9879         it is a simple protocol that just maps directly to SASL.
9880
9881         * dbus/dbus-auth.h, dbus/dbus-auth.c: authentication protocol
9882         initial implementation, not actually used yet.
9883
9884         * dbus/dbus-string.c (_dbus_string_find): new function
9885         (_dbus_string_equal): new function
9886         (_dbus_string_base64_encode): new function
9887         (_dbus_string_base64_decode): new function
9888
9889 2002-12-25  Anders Carlsson  <andersca@codefactory.se>
9890
9891         * dbus/Makefile.am:
9892         * dbus/dbus-marshal.c: (swap_bytes), (_dbus_marshal_double),
9893         (_dbus_marshal_int32), (_dbus_marshal_uint32),
9894         (_dbus_demarshal_double), (_dbus_demarshal_int32),
9895         (_dbus_demarshal_uint32), (_dbus_marshal_test):
9896         * dbus/dbus-marshal.h:
9897         * dbus/dbus-protocol.h:
9898         * dbus/dbus-test.c: (main):
9899         * dbus/dbus-test.h:
9900         Add un-optimized marshalling/demarshalling routines.
9901
9902 2002-12-25  Harri Porten  <porten@kde.org>
9903
9904         * qt/dbus-qt.h: adjusted ctor and getter to KDE/Qt conventions
9905
9906 2002-12-24  Zack Rusin  <zack@kde.org>
9907
9908         * qt/dbus-qthread.cc: adding - integrates QMutex into Dbus
9909         * qt/dbus-qt.h: skeleton with two sample implemenatation of the
9910         main loop stuff
9911
9912 2002-12-24  Havoc Pennington  <hp@pobox.com>
9913
9914         * glib/dbus-gthread.c: fix include
9915
9916         * glib/dbus-glib.h: rename DBusMessageHandler for now.
9917         I think glib API needs to change, though, as you don't
9918         want to use DBusMessageFunction, you want to use the
9919         DBusMessageHandler object. Probably
9920         dbus_connection_open_with_g_main_loop()
9921         and dbus_connection_setup_g_main_loop() or something like that
9922         (but think of better names...) that just create a connection
9923         that has watch/timeout functions etc. already set up.
9924
9925         * dbus/dbus-connection.c
9926         (dbus_connection_send_message_with_reply): new function just to
9927         show how the message handler helps us deal with replies.
9928
9929         * dbus/dbus-list.c (_dbus_list_remove_last): new function
9930
9931         * dbus/dbus-string.c (_dbus_string_test): free a string that
9932         wasn't
9933
9934         * dbus/dbus-hash.c: use memory pools for the hash entries
9935         (rebuild_table): be more paranoid about overflow, and
9936         shrink table when we can
9937         (_dbus_hash_test): reduce number of sprintfs and write
9938         valid C89. Add tests for case where we grow and then
9939         shrink the hash table.
9940
9941         * dbus/dbus-mempool.h, dbus/dbus-mempool.c: memory pools
9942
9943         * dbus/dbus-connection.c (dbus_connection_register_handler)
9944         (dbus_connection_unregister_handler): new functions
9945
9946         * dbus/dbus-message.c (dbus_message_get_name): new
9947
9948         * dbus/dbus-list.c: fix docs typo
9949
9950         * dbus/dbus-message-handler.h, dbus/dbus-message-handler.c:
9951         an object representing a handler for messages.
9952
9953 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
9954
9955         * glib/dbus-glib.h:
9956         * glib/dbus-gthread.c: (dbus_gthread_init):
9957         Don't use the gdbus prefix for public functions.
9958
9959 2002-12-16  Anders Carlsson  <andersca@codefactory.se>
9960
9961         * Makefile.am:
9962         * configure.in:
9963         Add GLib checks and fixup .pc files
9964
9965         * glib/Makefile.am:
9966         * glib/dbus-glib.h:
9967         * glib/dbus-gmain.c: (gdbus_connection_prepare),
9968         (gdbus_connection_check), (gdbus_connection_dispatch),
9969         (gdbus_add_connection_watch), (gdbus_remove_connection_watch),
9970         (dbus_connection_gsource_new):
9971         * glib/dbus-gthread.c: (dbus_gmutex_new), (dbus_gmutex_free),
9972         (dbus_gmutex_lock), (dbus_gmutex_unlock), (dbus_gthread_init):
9973         * glib/test-dbus-glib.c: (message_handler), (main):
9974         Add GLib support.
9975
9976 2002-12-15  Harri Porten  <porten@kde.org>
9977
9978         * autogen.sh: check for libtoolize before attempting to use it
9979
9980         * dbus/dbus-transport-unix.c: include <sys/time.h> for timeval
9981         struct.
9982
9983         * .cvsignore: ignore more stamp files
9984
9985         * dbus/dbus-watch.c (_dbus_watch_list_new): fixed doc error
9986
9987         * test/Makefile.am: added -I$(top_srcdir) to be able to compile
9988         without make install.
9989
9990 2002-12-15  Havoc Pennington  <hp@pobox.com>
9991
9992         * dbus/dbus-threads.c: add thread stubs that a higher library
9993         layer can fill in. e.g. the GLib wrapper might fill them in with
9994         GThread stuff. We still need to use this thread API to
9995         thread-safe-ize the library.
9996
9997 2002-12-12  Havoc Pennington  <hp@pobox.com>
9998
9999         * dbus/dbus-transport-unix.c, dbus/dbus-server-unix.c: use the
10000         below new interfaces and include fewer system headers.
10001
10002         * dbus/dbus-sysdeps.c (_dbus_read): new function
10003         (_dbus_write): new function
10004         (_dbus_write_two): new function
10005         (_dbus_connect_unix_socket): new function
10006         (_dbus_listen_unix_socket): new function
10007
10008         * dbus/dbus-message-internal.h: change interfaces to use
10009         DBusString
10010
10011 2002-12-11  Havoc Pennington  <hp@pobox.com>
10012
10013         * dbus/dbus-types.h: add dbus_unichar
10014
10015         * dbus/dbus-internals.c (_dbus_verbose): use _dbus_getenv
10016
10017         * dbus/dbus-connection.c (dbus_connection_send_message): return
10018         TRUE on success
10019
10020         * dbus/dbus-transport.c: include dbus-watch.h
10021
10022         * dbus/dbus-connection.c: include dbus-message-internal.h
10023
10024         * HACKING: add file with coding guidelines stuff.
10025
10026         * dbus/dbus-string.h, dbus/dbus-string.c: Encapsulate all string
10027         handling here, for security purposes (as in vsftpd). Not actually
10028         using this class yet.
10029
10030         * dbus/dbus-sysdeps.h, dbus/dbus-sysdeps.c: Encapsulate all
10031         system/libc usage here, as in vsftpd, for ease of auditing (and
10032         should also simplify portability). Haven't actually moved all the
10033         system/libc usage into here yet.
10034
10035 2002-11-25  Havoc Pennington  <hp@pobox.com>
10036
10037         * dbus/dbus-internals.c (_dbus_verbose): fix to not
10038         always print the first verbose message.
10039
10040 2002-11-24  Havoc Pennington  <hp@pobox.com>
10041
10042         * test/echo-client.c, test/echo-server.c: cheesy test
10043         clients.
10044
10045         * configure.in (AC_CHECK_FUNCS): check for writev
10046
10047         * dbus/dbus-message.c (_dbus_message_get_network_data): new
10048         function
10049
10050         * dbus/dbus-list.c (_dbus_list_foreach): new function
10051
10052         * dbus/dbus-internals.c (_dbus_verbose): new function
10053
10054         * dbus/dbus-server.c, dbus/dbus-server.h: public object
10055         representing a server that listens for connections.
10056
10057         * dbus/.cvsignore: create
10058
10059         * dbus/dbus-errors.h, dbus/dbus-errors.c:
10060         public API for reporting errors
10061
10062         * dbus/dbus-connection.h, dbus/dbus-connection.c:
10063         public object representing a connection that
10064         sends/receives messages. (Same object used for
10065         both client and server.)
10066
10067         * dbus/dbus-transport.h, dbus/dbus-transport.c:
10068         Basic abstraction for different kinds of stream
10069         that we might read/write messages from.
10070
10071 2002-11-23  Havoc Pennington  <hp@pobox.com>
10072
10073         * dbus/dbus-internals.h (_DBUS_INT_MAX): add _DBUS_INT_MIN
10074         _DBUS_INT_MAX
10075
10076         * dbus/dbus-test.c (main): add list test, and include
10077         dbus-test.h as intended
10078
10079         * dbus/dbus-hash.c (_dbus_hash_table_remove_string)
10080         (_dbus_hash_table_remove_int): return value indicates
10081         whether the entry existed to remove
10082
10083         * dbus/dbus-list.c: add linked list utility class,
10084         with docs and tests
10085
10086         * dbus/dbus-hash.c: add TODO item about shrinking the hash bucket
10087         array sometimes.
10088
10089 2002-11-23  Havoc Pennington  <hp@pobox.com>
10090
10091         * Doxyfile.in (INCLUDE_FILE_PATTERNS): expand DBUS_BEGIN_DECLS/
10092         DBUS_END_DECLS to nothing, that should fix this once and for all
10093
10094         * Doxyfile.in (JAVADOC_AUTOBRIEF): set to YES
10095
10096         * dbus/dbus-message.c, dbus/dbus-hash.c:
10097         add some missing @brief
10098
10099 2002-11-23  Havoc Pennington  <hp@pobox.com>
10100
10101         * dbus/dbus-message.h: put semicolons after DEBUG_BEGIN_DECLS
10102         to avoid confusing Doxygen
10103
10104         * dbus/dbus-hash.c: @} not }@
10105
10106         * dbus/dbus-message.c (struct DBusMessage): split out
10107         internals docs
10108
10109 2002-11-23  Havoc Pennington  <hp@pobox.com>
10110
10111         * configure.in: pile on more warning flags if using gcc
10112
10113         * Doxyfile.in (EXTRACT_STATIC): set to NO, so we don't have
10114         to document static functions
10115
10116         * configure.in: add summary to end of configure so it
10117         looks nice and attractive
10118
10119         * dbus/dbus-hash.c: finish implementation and write unit
10120         tests and docs
10121
10122         * configure.in: add --enable-tests to enable unit tests
10123
10124         * dbus/dbus-test.c: test program to run unit tests
10125         for all files in dbus/*, initially runs a test for
10126         dbus-hash.c
10127
10128         * dbus/dbus-internals.h: file to hold some internal utility stuff
10129
10130 2002-11-22  Havoc Pennington  <hp@redhat.com>
10131
10132         * dbus/dbus-hash.c: copy in Tcl hash table, not yet
10133         "ported" away from Tcl
10134
10135         * dbus/dbus-types.h: header for types such as dbus_bool_t
10136
10137 2002-11-22  Havoc Pennington  <hp@redhat.com>
10138
10139         * dbus/dbus.h: fixups for doc warnings
10140
10141         * Doxyfile.in (FILE_PATTERNS): we need to scan .h to pick up
10142         macros
10143         (QUIET): make it quiet so we can see warnings
10144
10145         * dbus/dbus-memory.c: teach D-BUS to allocate and free memory
10146
10147 2002-11-22  Havoc Pennington  <hp@redhat.com>
10148
10149         * Makefile.am: include "Doxyfile" target in all-local
10150
10151         * configure.in: generate the Doxyfile
10152
10153         * Doxyfile.in: move Doxyfile here, so we can use
10154         configure to generate a Doxyfile with the right
10155         version number etc.
10156
10157 2002-11-22  Havoc Pennington  <hp@redhat.com>
10158
10159         * dbus/dbus-message.c: move inline docs into .c file
10160
10161         * Doxyfile (OUTPUT_DIRECTORY): move output to doc/api
10162         so all docs are under doc/
10163         (MAN_EXTENSION): generate man pages. Use extension
10164         ".3dbus" which matches ".3qt" on my system,
10165         I guess this is OK, I don't know really.
10166         (FILE_PATTERNS): look for .c files not .h, makes sense
10167         for plain C I think
10168
10169 2002-11-22  Havoc Pennington  <hp@pobox.com>
10170
10171         * Makefile.am (SUBDIRS): rename subdir "server" to "bus"
10172         because any app can be a server, and any app can be a client,
10173         the bus is a special kind of server.
10174
10175 Thu Nov 21 23:35:31 2002  Zack Rusin  <zack@kde.org>
10176
10177         * Doxyfile : adding. Still needs Makefile rules to be generated
10178         automatically (just run "doxygen" in the toplevel dir for now to
10179         generate docs)
10180
10181         * dbus/dbus-message.h : Adding sample docs (javadoc since
10182         resembles gtk-doc a little more)
10183
10184         * dbus/dbus.h : Adding sample docs
10185
10186 2002-11-21  Havoc Pennington  <hp@redhat.com>
10187
10188         * dbus/Makefile.am (INCLUDES): define DBUS_COMPILATION
10189         so we can allow ourselves to include files directly,
10190         instead of having to use dbus.h
10191
10192         * dbus/dbus.h: fill in
10193
10194         * dbus/dbus-message.h: sketch out a sample header file.
10195         Include griping if you include it directly instead of
10196         via dbus.h
10197
10198         * dbus/dbus-macros.h: new file with macros for extern "C",
10199         TRUE/FALSE, NULL, etc.
10200
10201         * doc/file-boilerplate.c: put include guards in here
10202
10203 2002-11-21  Havoc Pennington  <hp@redhat.com>
10204
10205         * doc/file-boilerplate.c: include both AFL and GPL boilerplate.
10206
10207         * COPYING: include the GPL as well, and license code
10208         under both AFL and GPL.
10209
10210 2002-11-21  Havoc Pennington  <hp@redhat.com>
10211
10212         * acconfig.h: get rid of this
10213
10214         * autogen.sh (run_configure): add --no-configure option
10215
10216         * configure.in: remove AC_ARG_PROGRAM to make
10217         autoconf complain less. add AC_PREREQ.
10218         add AC_DEFINE third arg.
10219
10220 2002-11-21  Anders Carlsson  <andersca@codefactory.se>
10221
10222         * doc/Makefile.am:
10223         Fix references so we can distcheck.
10224
10225 2002-11-21  Havoc Pennington  <hp@redhat.com>
10226
10227         * Initial module creation
10228