Develop and Download Open Source Software

Browse Subversion Repository

Diff of /trunk_1/ftpsystem.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1 by hirohitohigashi, Wed Feb 18 08:06:53 2009 UTC revision 6 by hirohitohigashi, Fri Feb 20 02:19:48 2009 UTC
# Line 126  int ftp_system (int sck, int verbose) { Line 126  int ftp_system (int sck, int verbose) {
126    
127                  if (FD_ISSET(sck, &readfds)) {                  if (FD_ISSET(sck, &readfds)) {
128    
129                          if ( (n = recv(sck, buf, 1022, 0)) < 0)  {                      if ( (n = recv(sck, buf, 1022, 0)) < 0)  {
130                          if (verbose) {                          if (verbose) {
131                          perror("recv()");                              perror("recv()");
132                          }                          }
133                          free(buf);                          free(buf);
134                                    
135                          return -1;                          return -1;
136                          }                      }
137                        buf[n] = '\0';
138    
139                          if (verbose)                      if (verbose)
140                          printf("[Server] %s\n", buf);                          printf("[Server] %s\n", buf);
141                                                    
142                  }                  }
# Line 147  int ftp_system (int sck, int verbose) { Line 148  int ftp_system (int sck, int verbose) {
148                  }                  }
149          }          }
150    
         buf[n] = '\0';  
           
151          len = strlen(buf);          len = strlen(buf);
152                    
153                    

Legend:
Removed from v.1  
changed lines
  Added in v.6

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26