msgcopy and SOURCEMID

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf msgcopy and SOURCEMID

  • Creator
    Topic
  • #54723
    TorfinnK
    Participant

      Hello

      Here’s a snippet from the Cloverleaf Documentation:


      msgcopy

      Produces a new message with data identical to msgId.

      msgcopy msgId

      Some metadata fields are copied, some are not (for example, the new message receives a different mid and its srcmid is set to the original message’s mid).

      This command returns the new message handle.


      I have the following tcl:

      Code:

                keylget args MSGID mh
                echo “——————”
                echo MID [msgmetaget $mh MID]
                echo SOURCEMID [msgmetaget $mh SOURCEMID]
                echo msgcopy….
                set newmh [msgcopy $mh]
                echo MID [msgmetaget $newmh MID]
                echo SOURCEMID [msgmetaget $newmh SOURCEMID]
                echo “——————”
                lappend dispList “KILL $mh”
                lappend dispList “CONTINUE $newmh”

      The output from the tcl is like this.


      MID {DOMAIN 0} {HUB 0} {NUM 61100}

      SOURCEMID {DOMAIN {}} {HUB {}} {NUM {}}

      msgcopy….

      MID {DOMAIN 0} {HUB 0} {NUM 61101}

      SOURCEMID {DOMAIN {}} {HUB {}} {NUM {}}


      I would expect that the second SOURCEMID should have NUM=61100,

      What am I missing here

      /Torfinn

    Viewing 0 reply threads
    • Author
      Replies
      • #82720
        Robert Kersemakers
        Participant

          Hi Torfinn,

          You are creating a new message by copying the current message. Current message had id 0.0.61100; the new/copied message must have a unique id as well, so it gets id 0.0.61101.

          Looks totally normal to me, although I must admit I have never looked at this in such detail. Command ‘msgcopy’ always did what it should do, so…

          Zuyderland Medisch Centrum; Heerlen/Sittard; The Netherlands

      Viewing 0 reply threads
      • The forum ‘Cloverleaf’ is closed to new topics and replies.