Path: utzoo!attcan!utgpu!watmath!iuvax!mailrus!cornell!ken
From: ken@gvax.cs.cornell.edu (Ken Birman)
Newsgroups: comp.sys.isis
Subject: Re: Broadcasting messages in messages
Message-ID: <31124@cornell.UUCP>
Date: 16 Aug 89 12:46:34 GMT
References: <4169@cps3xx.UUCP>
Reply-To: ken@gvax.cs.cornell.edu (Ken Birman)
Organization: Cornell Univ. CS Dept, Ithaca NY
Lines: 127

>> Alan Cabrera puts a message in another message and then
>> has probelsm reconstructing it.  He asks "am I doing something
>> wrong"...

I copied your program into my machine and ran it.  Here's my
full-length program:

#include "isis.h"
 
address *gid;

int receive();

main(argc, argv)
  {
        isis_init(1643);
        isis_start_done();
        isis_entry(1, receive, "receive");
        gid = pg_join("test", 0);
        update();
        isis_mainloop(0);
  }

update ()
{
        message *msg_p;
        int i;

        msg_p = msg_newmsg ();
        for (i=0; i<10; i++)
                msg_put (msg_p, "%d", i);
        bcast (gid, 1, "%m", msg_p, 0);
        msg_delete (msg_p);
}

#define finish 10
#define start  1

receive (mp)
message *mp;
{
        int index, i;
        message *msg_p;

print("receive mp: "); pmsg(mp);
        msg_get (mp, "%m", &msg_p);
        for (i=0; i