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