[systemd-devel] question about BUS_MATCH_ARG_PATH

eshark eshark77 at 163.com
Wed Jun 10 05:50:21 PDT 2015





Sorry for forgetting attach the C file.


Best Regards,
Li Cheng



At 2015-06-10 20:35:11, eshark77 at 163.com wrote:

Hi, All,
     According to the DBus protocol, http://dbus.freedesktop.org/doc/dbus-specification.html 
       " An example argument path match is arg0path='/aa/bb/'. This would match messages with first arguments of '/', '/aa/', '/aa/bb/', '/aa/bb/cc/' and '/aa/bb/cc'. It would not match messages with first arguments of '/aa/b', '/aa' or even '/aa/bb'. "       
  
    Then  I did a simple  test using the  attached  test-bus-kernel-bloom.c , and I found that  if  I used arg0path='/p1/p2/' , the callback function couldn't run when I sent emit signal with  '/' , '/p1/' , '/p1/p2/p3'.


   I traced into the codes , and modified bloom_add_prefixes() , then I can watch the signals with '/p1/p2/p3' , and '/p1/p2/' , but still cannot watch the signals with '/' or '/p1/'.


  Any recommendations are appreciated.   


 Thanks!




Best Regards,
Li Cheng




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150610/619548f6/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test-bus-kernel-bloom.c
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20150610/619548f6/attachment-0001.c>


More information about the systemd-devel mailing list