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