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