1
1

Fix senddata.c for 32bits machines

Этот коммит содержится в:
Aris Adamantiadis 2010-10-27 22:53:20 +02:00
родитель ea4aa26dbb
Коммит b6901ec4b9

Просмотреть файл

@ -10,8 +10,8 @@ int main(void) {
ssh_channel channel; ssh_channel channel;
char buffer[1024*1024]; char buffer[1024*1024];
int rc; int rc;
long total=0; uint64_t total=0;
long lastshown=4096; uint64_t lastshown=4096;
session = connect_ssh("localhost", NULL, 0); session = connect_ssh("localhost", NULL, 0);
if (session == NULL) { if (session == NULL) {
return 1; return 1;
@ -41,7 +41,7 @@ int main(void) {
while ((rc = ssh_channel_write(channel, buffer, sizeof(buffer))) > 0) { while ((rc = ssh_channel_write(channel, buffer, sizeof(buffer))) > 0) {
total += rc; total += rc;
if(total/2 >= lastshown){ if(total/2 >= lastshown){
printf("written %lx\n",total); printf("written %llx\n",total);
lastshown=total; lastshown=total;
} }
if(total > LIMIT) if(total > LIMIT)