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