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