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