static void CpdList_ccs_list_items_fmt(char *msg) { CpdListItemsRequest req; CpdListAccessor *acc=CpdListHeader_ccs_list_items(msg,req); if (acc!=NULL) { int bufLen; { PUP_toNetwork_sizer ps; PUP_fmt p(ps); pupCpd(p,acc,req); bufLen=ps.size(); } char *buf=new char[bufLen]; { PUP_toNetwork_pack pp(buf); PUP_fmt p(pp); pupCpd(p,acc,req); if (pp.size()!=bufLen) CmiError("ERROR! Sizing/packing length mismatch for %s list pup function (%d sizing, %d packing)\n", acc->getPath(),bufLen,pp.size()); } CcsSendReply(bufLen,(void *)buf); delete[] buf; } CmiFree(msg); }
/* CCS handler "lvConfig", taking no arguments, returning a liveVizConfig. A client requests our configuration. */ extern "C" void getImageConfigHandler(char * msg) { PUP_toNetwork_sizer sp; config.pupNetwork(sp); int len=sp.size(); char *buf=new char[len]; PUP_toNetwork_pack pp(buf); config.pupNetwork(pp); if (len!=pp.size()) CkAbort("liveVizConfig get pup mismatch"); if (config.getVerbose(1)) CmiPrintf("CCS getImageConfig> Sending a new client my configuration\n"); CcsSendReply(len,buf); delete[] buf; CmiFree(msg); //Throw away the client's request }