ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/projects/cms/source/ihost/ihost.c
(Generate patch)

Comparing projects/cms/source/ihost/ihost.c (file contents):
Revision 1.35 by pajs, Sun Mar 9 21:04:20 2003 UTC vs.
Revision 1.38 by pajs, Wed Mar 19 21:51:50 2003 UTC

# Line 163 | Line 163 | void log_msg(int level, char *format, ...){
163                  }else{
164                          fprintf(ihost_config.log, "\n");
165                  }
166 +                fflush(ihost_config.log);
167          }
168   }
169  
# Line 222 | Line 223 | FILE *create_tcp_connection(char *hostname, int port){
223  
224          if((get_host_addr(hostname, &haddr))!=0){
225                  log_msg(LOG_CRIT, "Failed to lookup name for %s", hostname);
226 +                close(sock);
227                  return NULL;
228          }
229  
# Line 233 | Line 235 | FILE *create_tcp_connection(char *hostname, int port){
235          log_msg(LOG_DEBUG, "Creating a tcp connection");
236          if(connect(sock, (struct sockaddr *)&addr, sizeof(addr)) !=0){
237                  log_msg(LOG_CRIT, "Failed to connect to hostname %s on port %d", hostname, port);
238 +                close(sock);
239                  return NULL;
240          }
241  
# Line 578 | Line 581 | int get_system_stats(int seq_no, ihost_state_t *ihost_
581                          y=page_stats->pages_pageout;
582                  }
583                  snprintf(tmp, size, \
584 <                        "<pages><swapins>%lld</swapins><swapouts>%lld</swapouts></pages>", \
584 >                        "<pages><pageins>%lld</pageins><pageouts>%lld</pageouts></pages>", \
585                          x, \
586                          y);
587          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines