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