projects
/
remotetop.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
72d828b
)
Add maxsize of packet
author
teodor
<teodor>
Thu, 29 Nov 2007 18:17:59 +0000
(18:17 +0000)
committer
teodor
<teodor>
Thu, 29 Nov 2007 18:17:59 +0000
(18:17 +0000)
rtop.c
patch
|
blob
|
history
td_lmsg.c
patch
|
blob
|
history
diff --git
a/rtop.c
b/rtop.c
index
85a0eb3
..
59b1664
100644
(file)
--- a/
rtop.c
+++ b/
rtop.c
@@
-68,11
+68,10
@@
main( int argc, char *argv[] ) {
int i;
MassiveUnit *mu;
int i;
MassiveUnit *mu;
- TCMsg *pmsg
= (TCMsg*)malloc( TCMSGHDRSZ )
;
+ TCMsg *pmsg;
TC_Connection cs;
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) {
while( (ch=getopt(argc, argv, "Dh:p:"))!=-1) {
switch(ch) {
@@
-97,9
+96,14
@@
main( int argc, char *argv[] ) {
opentlog( TL_OPEN_STDERR, (debug) ? TL_DEBUG : TL_INFO, NULL);
TC_fillConnection(&cs, host, port);
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;
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;
pmsg = (TCMsg*) cs.buf;
mu = (MassiveUnit*)pmsg->data;
diff --git
a/td_lmsg.c
b/td_lmsg.c
index
24c3b22
..
cd6e6ad
100644
(file)
--- a/
td_lmsg.c
+++ b/
td_lmsg.c
@@
-102,7
+102,7
@@
ConnectionWorks() {
break;
case CS_READ:
if ( conn->readyio ) {
break;
case CS_READ:
if ( conn->readyio ) {
- TC_Read( conn );
+ TC_Read( conn
, TCMSGHDRSZ
);
if ( conn->state != CS_READ ) i--; /* check it one more time */
}
break;
if ( conn->state != CS_READ ) i--; /* check it one more time */
}
break;