Re: [classad-users] minor ClassAd mutilation


Date: Thu, 28 Mar 2002 18:56:07 -0600 (CST)
From: Alain Aslag Roy <roy@xxxxxxxxxxx>
Subject: Re: [classad-users] minor ClassAd mutilation
I think John wants the old ClassAd format, but is mystified as to why it is 
changing true to 1 and false to 0. It shouldn't be necessary, right?

-alain

At 06:52 PM 3/28/2002 -0600, you wrote:

>When you declare your PrettyPrint object you want to do the following:
>
>   PrettyPrint pp;
>   pp.SetOldClassAd( false );
>
>This only exists for purposes of back compatibility.  If you have any
>other questions let me know.
>
>On Tue, 26 Mar 2002, John Bethencourt wrote:
>
> > Hi, I'm sending a ClassAd over a Sock using putOldClassAd and 
> getOldClassAd,
> > and it seems to be getting altered in the process. Before sending, it looks
> > like this (as output by a PrettyPrint):
> >
> >     [
> >         Requirements = true;
> >         MyType = "Job";
> >         TargetType = "Machine"
> >     ]
> >
> > After sending, it looks like this (as output by a PrettyPrint):
> >
> >     [
> >         Requirements = 1;
> >         MyType = "Job";
> >         TargetType = "Machine"
> >     ]
> >
> > Here are code fragments:
> >
> > (Client)
> >
> >   string adString;
> >   pp.Unparse(adString, requestAd);
> >   printf("The ad is this: \n%s\n\n", adString.data());
> >
> >   if (!putOldClassAd(sock, *requestAd)) {
> >     fprintf(stderr, "Error: unable to send ClassAd\n");
> >   }
> >   sock->end_of_message();
> >
> >
> > (Server)
> >
> >   ClassAd *requestAd = new ClassAd;
> >   if (!getOldClassAd(s, *requestAd)) {
> >     dprintf(D_ALWAYS, "Check command did not send a classad!\n");
> >     delete requestAd;
> >     s->end_of_message();
> >     return FALSE;
> >   }
> >   s->end_of_message();
> >
> >   string adString;
> >   pp.Unparse(adString, requestAd);
> >   dprintf(D_ALWAYS, "The ad is this: \n%s\n\n", adString.data());
> >
> >
> > Any ideas about what might be going on are appreciated.
> >
> > John
> > Condor Classads Info:
> > http://www.cs.wisc.edu/condor/classad/
> >
> >
>
>- Nick
>
>
>
>Condor Classads Info:
>http://www.cs.wisc.edu/condor/classad/




[← Prev in Thread] Current Thread [Next in Thread→]