Changeset 31088 in project


Ignore:
Timestamp:
07/04/14 19:09:55 (6 years ago)
Author:
ecloud
Message:

default-signal-handler takes 3 args: context, member name and args (payload)

But didn't extract the payload from the message yet.

Location:
release/4/dbus/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/dbus/trunk/dbus.scm

    r31086 r31088  
    190190(define default-signal-handler (make-parameter #f))
    191191
    192 (define (printing-signal-handler #!optional port)
    193         (lambda (bus path svc iface mber)
    194                 (let ([str (format "failed to find callback for ~a ~a ~a ~a on ~a~%" path svc iface mber (bus-name bus))])
    195                         (if port
    196                                 (display str port)
    197                                 (display str)))))
     192(define printing-signal-handler)
    198193
    199194(define dump-callback-table)
     
    341336                        ))
    342337                        callbacks-table)))
     338
     339        (set! printing-signal-handler (lambda (#!optional port)
     340                (lambda (context mber args)
     341                        (let ([str (format "failed to find callback for ~a ~a ~a ~a on ~a~%"
     342                                                (vector-ref context context-idx-path)
     343                                                (vector-ref context context-idx-service)
     344                                                (vector-ref context context-idx-interface)
     345                                                mber (bus-name (vector-ref context context-idx-bus)))])
     346                                (if port
     347                                        (display str port)
     348                                        (display str))))))
    343349
    344350        (define (next-context-ID) (set! context-count (+ 1 context-count)) context-count)
     
    708714                                (unless ret
    709715                                        (when (default-signal-handler)
    710                                                 ((default-signal-handler) bus path svc iface mber)))
     716                                                ((default-signal-handler) (make-context bus: bus path: path path service: svc interface: iface) mber #f)))  ;; TODO get payload (args)
    711717                                ret))))
    712718
  • release/4/dbus/trunk/examples/receive-car-turn.scm

    r31086 r31088  
    11(use (prefix dbus dbus:))
    22
    3 (dbus:default-signal-handler (lambda (bus path svc iface mber)
    4         ((dbus:printing-signal-handler) bus path svc iface mber)
     3(dbus:default-signal-handler (lambda (ctx mber args)
     4        ((dbus:printing-signal-handler) ctx mber args)
    55        (dbus:dump-callback-table)))
    66
Note: See TracChangeset for help on using the changeset viewer.