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