lugu/qiloop

When registring to a signal, events messages are sent before the reply message.

lugu opened this issue · 0 comments

lugu commented

When registering to a signal, events can be sent before the response.

Instead, after the call message, reply should be sent and then the event messages.

Here is the sequence observed with tcpdump (full capture is attached):

Frame 16: 110 bytes on wire (880 bits), 110 bytes captured (880 bits)
Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst: 00:00:00_00:00:00 (00:00:00:00:00:00)
Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
Transmission Control Protocol, Src Port: 60332, Dst Port: 9559, Seq: 145, Ack: 2465, Len: 44
Data (44 bytes)
qi::Messaging
    Source: 127.0.0.1:60332
    Destination: 127.0.0.1:9559
    Magic: 0x42dead42
    Id: 284
    Size: 16
    Version: 0
    Type: 1
    Type: Call
    Flags: 0
    Service: 1
    Service description: ServiceDirectory
    Object: 1
    Action: 0
    Action description: RegisterEvent
    Data: 0100000056000000414299a819a14c04

Then

Frame 17: 159 bytes on wire (1272 bits), 159 bytes captured (1272 bits)
Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst: 00:00:00_00:00:00 (00:00:00:00:00:00)
Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
Transmission Control Protocol, Src Port: 9559, Dst Port: 60332, Seq: 2465, Ack: 189, Len: 93
Data (93 bytes)
qi::Messaging
    Source: 127.0.0.1:9559
    Destination: 127.0.0.1:60332
    Magic: 0x42dead42
    Id: 284
    Size: 65
    Version: 0
    Type: 5
    Type: Event
    Flags: 0
    Service: 1
    Service description: ServiceDirectory
    Object: 1
    Action: 86
    Data: 010000000200000000000000010000004c414299a819a14c0413000000000000009ec809…

Then:

Frame 19: 102 bytes on wire (816 bits), 102 bytes captured (816 bits)
Ethernet II, Src: 00:00:00_00:00:00 (00:00:00:00:00:00), Dst: 00:00:00_00:00:00 (00:00:00:00:00:00)
Internet Protocol Version 4, Src: 127.0.0.1, Dst: 127.0.0.1
Transmission Control Protocol, Src Port: 9559, Dst Port: 60332, Seq: 2558, Ack: 189, Len: 36
Data (36 bytes)
qi::Messaging
    Source: 127.0.0.1:9559
    Destination: 127.0.0.1:60332
    Magic: 0x42dead42
    Id: 284
    Size: 8
    Version: 0
    Type: 2
    Type: Reply
    Flags: 0
    Service: 1
    Service description: ServiceDirectory
    Object: 1
    Action: 0
    Action description: RegisterEvent
    Data: 414299a819a14c04

auth.pcap.gz