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.7 by pajs, Mon May 13 09:22:02 2002 UTC vs.
Revision 1.8 by pajs, Mon May 13 11:01:27 2002 UTC

# Line 71 | Line 71 | int ihost_configure(ihost_state_t *ihost_state){
71  
72          /* Need to open 2 files, one for reading one for writing, as it gets confused if we only use 1 :) */
73          if ((fm_fd_r=fdopen(sd,"r")) == NULL){
74 <                errf("Failed to open stream (%m)");
74 >                errf("Failed to open read stream (%m)");
75                  return -1;
76          }
77  
78          if ((fm_fd_w=fdopen(dup(sd),"w")) == NULL){
79 <                errf("Failed to open stream (%m)");
79 >                errf("Failed to open write stream (%m)");
80                  return -1;
81          }
82  
# Line 155 | Line 155 | int ihost_configure(ihost_state_t *ihost_state){
155                  errf("strdup failed (%m)");
156                  return -1;
157          }
158 <        reply=++reply_ptr;
158 >        reply=reply_ptr + 1;
159          reply_ptr=strchr(reply,';');
160          if (reply_ptr==NULL){
161                  errf("Incorrect data returned 2");
# Line 163 | Line 163 | int ihost_configure(ihost_state_t *ihost_state){
163          }
164          *reply_ptr='\0';
165          ihost_state->server_udp_port=atoi(reply);
166 <        reply=++reply_ptr;
166 >        reply=reply_ptr+1;
167          ihost_state->server_tcp_port=atoi(reply);
168          if ((ihost_state->server_tcp_port==0) || (ihost_state->server_udp_port==0)){
169                  errf("Incorrect data returned 3 ");
# Line 177 | Line 177 | int ihost_configure(ihost_state_t *ihost_state){
177          }
178  
179          if(fclose(fm_fd_r) !=0){
180 <                errf("Failed to close FD (%m)");
180 >                errf("Failed to close read FD (%m)");
181                  return -1;
182          }
183          if(fclose(fm_fd_w) !=0){
184 <                errf("Failed to close FD (%m)");
184 >                errf("Failed to close write FD (%m)");
185                  return -1;
186          }
187  
# Line 273 | Line 273 | int heartbeat(ihost_state_t *ihost_state){
273          }
274  
275          if(fclose(fm_fd_r) !=0){
276 <                errf("Failed to close FD (%m)");
276 >                errf("Failed to close read FD (%m)");
277                  return -1;
278          }
279          if(fclose(fm_fd_w) !=0){
280 <                errf("Failed to close FD (%m)");
280 >                errf("Failed to close write FD (%m)");
281                  return -1;
282          }
283  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines