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/
|