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