Changeset 651 for abuse/trunk/src/nfclient.cpp
- Timestamp:
- May 14, 2011, 3:06:27 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/nfclient.cpp
r555 r651 30 30 #include "cache.h" 31 31 32 #include "gserver.h" 33 34 #if !defined __CELLOS_LV2__ 32 #include "net/gserver.h" 35 33 36 34 void remove_client(int client_number) { ; } … … 115 113 } 116 114 117 115 #if HAVE_NETWORK 118 116 if (local_only) 119 117 { 118 #endif 120 119 local=new jFILE(filename,mode); 121 120 if (local->open_failure()) { delete local; local=NULL; } 121 #if HAVE_NETWORK 122 122 } 123 123 else 124 124 { 125 126 127 125 char nm[256]; 128 126 strcpy(nm,filename); … … 135 133 } 136 134 } 135 #endif 137 136 } 138 137 … … 149 148 if (local) 150 149 return local->read(buf,count); 150 #if HAVE_NETWORK 151 151 else if (nfs_fd>=0) 152 152 { … … 158 158 return a; 159 159 } 160 #endif 160 161 else return 0; 161 162 } … … 165 166 if (local) 166 167 return local->write(buf,count); 168 #if HAVE_NETWORK 167 169 else 168 170 { … … 170 172 exit(0); 171 173 } 174 #endif 172 175 return 0; 173 176 } … … 178 181 if (local) 179 182 return local->seek(off,whence); 183 #if HAVE_NETWORK 180 184 else if (nfs_fd>=0) 181 185 { … … 185 189 return NF_seek(nfs_fd,off); 186 190 } 191 #endif 187 192 return 0; 188 193 } … … 191 196 { 192 197 if (local) return local->tell(); 198 #if HAVE_NETWORK 193 199 else if (nfs_fd>=0) return NF_tell(nfs_fd); 200 #endif 194 201 else return 0; 195 202 } … … 199 206 { 200 207 if (local) return local->file_size(); 208 #if HAVE_NETWORK 201 209 else if (nfs_fd>=0) return NF_filelength(nfs_fd); 210 #endif 202 211 else return 0; 203 212 } … … 207 216 flush_writes(); 208 217 if (local) delete local; 218 #if HAVE_NETWORK 209 219 else if (nfs_fd>=0) NF_close(nfs_fd); 220 #endif 210 221 } 211 222 212 223 int set_file_server(net_address *addr) 213 224 { 225 #if HAVE_NETWORK 214 226 if (NF_set_file_server(addr)) 215 227 { … … 229 241 return 1; 230 242 } 243 #endif 231 244 return 0; 232 245 } … … 247 260 } 248 261 249 #endif250
Note: See TracChangeset
for help on using the changeset viewer.