int i;
MassiveUnit *mu;
- TCMsg *pmsg = (TCMsg*)malloc( TCMSGHDRSZ );
+ TCMsg *pmsg;
TC_Connection cs;
- pmsg->type = TOPGETTYPE;
- pmsg->len = TCMSGHDRSZ;
+ opentlog( TL_OPEN_STDERR, TL_INFO, NULL);
while( (ch=getopt(argc, argv, "Dh:p:"))!=-1) {
switch(ch) {
opentlog( TL_OPEN_STDERR, (debug) ? TL_DEBUG : TL_INFO, NULL);
TC_fillConnection(&cs, host, port);
+
+ pmsg = (TCMsg*)tmalloc( TCMSGHDRSZ );
+ pmsg->type = TOPGETTYPE;
+ pmsg->len = TCMSGHDRSZ;
cs.buf = (char*)pmsg;
cs.len = pmsg->len;
- if ( TC_Talk(&cs) == CS_OK ) {
+
+ if ( TC_Talk(&cs, 0) == CS_OK ) {
pmsg = (TCMsg*) cs.buf;
mu = (MassiveUnit*)pmsg->data;