Changeset 1183:eb366f837862
- Timestamp:
- 03/16/09 10:01:26 (3 years ago)
- Branch:
- default
- Location:
- trunk
- Files:
-
- 35 edited
-
include/libdodo/ioEvent.h (modified) (1 diff)
-
include/libdodo/ioFileFifo.h (modified) (4 diffs)
-
include/libdodo/ioFileRegular.h (modified) (4 diffs)
-
include/libdodo/ioFileTemp.h (modified) (4 diffs)
-
include/libdodo/ioMemory.h (modified) (1 diff)
-
include/libdodo/ioNetworkClient.h (modified) (5 diffs)
-
include/libdodo/ioNetworkConnection.h (modified) (2 diffs)
-
include/libdodo/ioNetworkExchange.h (modified) (1 diff)
-
include/libdodo/ioNetworkHttp.h (modified) (5 diffs)
-
include/libdodo/ioPipe.h (modified) (3 diffs)
-
include/libdodo/rpcHttpClient.h (modified) (1 diff)
-
include/libdodo/rpcJsonClient.h (modified) (1 diff)
-
include/libdodo/rpcJsonMethod.h (modified) (1 diff)
-
include/libdodo/rpcJsonResponse.h (modified) (1 diff)
-
include/libdodo/rpcJsonValue.h (modified) (1 diff)
-
include/libdodo/rpcXmlClient.h (modified) (1 diff)
-
include/libdodo/rpcXmlMethod.h (modified) (1 diff)
-
include/libdodo/rpcXmlResponse.h (modified) (1 diff)
-
include/libdodo/rpcXmlValue.h (modified) (1 diff)
-
src/cgiBasicExchange.cc (modified) (1 diff)
-
src/cgiDialogue.cc (modified) (1 diff)
-
src/graphicsTransform.cc (modified) (3 diffs)
-
src/ioChannel.cc (modified) (1 diff)
-
src/ioEvent.cc (modified) (2 diffs)
-
src/ioFileFifo.cc (modified) (26 diffs)
-
src/ioFileRegular.cc (modified) (31 diffs)
-
src/ioFileTemp.cc (modified) (29 diffs)
-
src/ioMemory.cc (modified) (6 diffs)
-
src/ioNetworkClient.cc (modified) (3 diffs)
-
src/ioNetworkConnection.cc (modified) (2 diffs)
-
src/ioNetworkExchange.cc (modified) (4 diffs)
-
src/ioNetworkHttp.cc (modified) (1 diff)
-
src/ioPipe.cc (modified) (32 diffs)
-
src/toolsLogger.cc (modified) (1 diff)
-
tests/image_test/test.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/libdodo/ioEvent.h
r1166 r1183 34 34 #include <libdodo/directives.h> 35 35 36 #include <poll.h>37 38 #include <libdodo/ioEventEx.h>39 36 #include <libdodo/types.h> 40 #include <libdodo/toolsMisc.h>41 #include <libdodo/ioEventInfo.h>42 #include <libdodo/pcSyncProcessSection.h>43 #include <libdodo/pcSyncProtector.h>44 37 45 38 namespace dodo 46 39 { 40 namespace pc 41 { 42 namespace sync 43 { 44 class section; 45 }; 46 }; 47 47 48 namespace io 48 49 { 50 class eventInfo; 51 49 52 /** 50 53 * @struct __eventInOutDescriptors -
trunk/include/libdodo/ioFileFifo.h
r1166 r1183 33 33 #include <libdodo/directives.h> 34 34 35 #include <unistd.h>36 #include <sys/types.h>37 #include <sys/stat.h>38 39 #include <libdodo/toolsMisc.h>40 #include <libdodo/toolsFilesystem.h>41 #include <libdodo/ioFileFifoEx.h>42 35 #include <libdodo/types.h> 43 36 #include <libdodo/ioChannel.h> … … 50 43 { 51 44 #ifndef IO_WO_XEXEC 52 53 45 /** 54 46 * @enum fileOperationTypeEnum defines type of operation for hook … … 59 51 FIFO_OPERATION_CLOSE 60 52 }; 61 62 53 #endif 63 54 … … 189 180 short mode; ///< file open mode[see fileOpenmodeEnum] 190 181 191 FILE*handler; ///< file handler182 void *handler; ///< file handler 192 183 193 184 bool blocked; ///< true if stream is blocked -
trunk/include/libdodo/ioFileRegular.h
r1166 r1183 33 33 #include <libdodo/directives.h> 34 34 35 #include <unistd.h>36 #include <sys/types.h>37 #include <sys/stat.h>38 39 #include <libdodo/toolsMisc.h>40 #include <libdodo/toolsFilesystem.h>41 #include <libdodo/ioFileRegularEx.h>42 35 #include <libdodo/types.h> 43 36 #include <libdodo/ioChannel.h> … … 50 43 { 51 44 #ifndef IO_WO_XEXEC 52 53 45 /** 54 46 * @enum regularOperationTypeEnum defines type of operation for hook … … 59 51 REGULAR_OPERATION_CLOSE 60 52 }; 61 62 53 #endif 63 54 … … 194 185 short mode; ///< file open mode[see fileOpenmodeEnum] 195 186 196 FILE*handler; ///< file handler187 void *handler; ///< file handler 197 188 }; 198 189 }; -
trunk/include/libdodo/ioFileTemp.h
r1166 r1183 33 33 #include <libdodo/directives.h> 34 34 35 #include <unistd.h>36 #include <sys/types.h>37 #include <sys/stat.h>38 39 #include <libdodo/toolsMisc.h>40 #include <libdodo/toolsFilesystem.h>41 #include <libdodo/ioFileTempEx.h>42 #include <libdodo/types.h>43 35 #include <libdodo/ioChannel.h> 44 36 … … 50 42 { 51 43 #ifndef IO_WO_XEXEC 52 53 44 /** 54 45 * @enum tempOperationTypeEnum defines type of operation for hook … … 59 50 TEMP_OPERATION_CLOSE 60 51 }; 61 62 52 #endif 63 53 … … 169 159 private: 170 160 171 FILE*handler; ///< file handler161 void *handler; ///< file handler 172 162 }; 173 163 }; -
trunk/include/libdodo/ioMemory.h
r1166 r1183 33 33 #include <libdodo/directives.h> 34 34 35 #include <unistd.h>36 #include <sys/types.h>37 #include <sys/stat.h>38 39 35 #include <libdodo/types.h> 40 36 #include <libdodo/ioChannel.h> 41 #include <libdodo/ioMemoryEx.h>42 37 43 38 namespace dodo -
trunk/include/libdodo/ioNetworkClient.h
r1164 r1183 33 33 #include <libdodo/directives.h> 34 34 35 #include <sys/types.h>36 #include <sys/stat.h>37 #include <netinet/in.h>38 #include <arpa/inet.h>39 #include <netdb.h>40 #include <sys/un.h>41 #include <sys/socket.h>42 #include <net/if.h>43 #include <sys/ioctl.h>44 #include <fcntl.h>45 46 #include <libdodo/toolsFilesystem.h>47 #include <libdodo/ioNetworkClientEx.h>48 35 #include <libdodo/types.h> 49 36 #include <libdodo/ioNetworkConnection.h> 50 #include <libdodo/ioNetworkExchange.h>51 37 #include <libdodo/xexec.h> 52 #include <libdodo/ioEventInfo.h>53 38 54 39 namespace dodo … … 62 47 class client; 63 48 }; 49 50 class exchange; 64 51 65 52 /** … … 77 64 78 65 #ifndef IO_WO_XEXEC 79 80 66 /** 81 67 * @class __xexecIoNetworkClientCollectedData … … 93 79 __xexecIoNetworkClientCollectedData(xexec *executor, short execObject); 94 80 }; 95 96 81 #endif 97 82 … … 182 167 183 168 #ifndef IO_WO_XEXEC 184 185 169 __xexecIoNetworkClientCollectedData collectedData; ///< data collected for xexec 186 187 170 #endif 188 171 }; -
trunk/include/libdodo/ioNetworkConnection.h
r1160 r1183 33 33 #include <libdodo/directives.h> 34 34 35 #include <sys/types.h>36 #include <sys/socket.h>37 #include <unistd.h>38 #include <fcntl.h>39 40 #include <libdodo/toolsFilesystem.h>41 #include <libdodo/ioNetworkConnectionEx.h>42 35 #include <libdodo/types.h> 43 36 … … 77 70 CONNECTION_OPTION_BROADCAST, ///< Permits sending of broadcast messages, if this is supported by the protocol. 78 71 CONNECTION_OPTION_OOB_INLINE, ///< Out-of-band(marked urgent) data keep inline in recieve operation. 79 #ifdef SO_REUSEPORT80 CONNECTION_OPTION_REUSE_PORT, ///< Should allow reuse of local port.81 #endif82 72 }; 83 73 -
trunk/include/libdodo/ioNetworkExchange.h
r1166 r1183 33 33 #include <libdodo/directives.h> 34 34 35 #include <sys/types.h>36 #include <netinet/in.h>37 #include <arpa/inet.h>38 #include <netdb.h>39 #include <sys/un.h>40 #include <sys/socket.h>41 #include <net/if.h>42 #include <sys/ioctl.h>43 #include <fcntl.h>44 #include <poll.h>45 46 35 #include <libdodo/ioNetworkConnection.h> 47 36 #include <libdodo/ioChannel.h> 48 #include <libdodo/ioNetworkExchangeEx.h>49 #include <libdodo/types.h>50 37 #include <libdodo/xexec.h> 51 38 -
trunk/include/libdodo/ioNetworkHttp.h
r1164 r1183 33 33 #include <libdodo/directives.h> 34 34 35 #include <unistd.h> 36 #include <sys/types.h> 37 #include <sys/stat.h> 38 39 #include <libdodo/toolsMisc.h> 40 #include <libdodo/ioNetworkClient.h> 41 #include <libdodo/ioNetworkSslClient.h> 42 #include <libdodo/toolsNetwork.h> 43 #include <libdodo/ioNetworkHttpEx.h> 35 #include <libdodo/toolsCode.h> 36 #include <libdodo/ioSsl.h> 44 37 #include <libdodo/types.h> 45 #include <libdodo/cgiDialogue.h>46 38 47 39 namespace dodo 48 40 { 41 namespace cgi 42 { 43 struct __cgiCookie; 44 }; 45 49 46 namespace io 50 47 { 51 48 namespace network 52 49 { 50 class exchange; 51 53 52 #define HTTP_REQUESTHEADERSTATEMENTS 12 54 53 … … 169 168 170 169 #ifdef OPENSSL_EXT 171 172 170 /** 173 171 * set certificates information … … 180 178 */ 181 179 virtual void removeSertificates(); 182 183 180 #endif 184 181 … … 396 393 397 394 #ifdef OPENSSL_EXT 398 399 395 SCHEME_HTTPS, 400 401 396 #endif 402 397 }; … … 437 432 438 433 #ifdef OPENSSL_EXT 439 440 434 io::ssl::__certificates certs; ///< SSL certificates 441 435 bool certsSet; 442 443 436 #endif 444 437 }; -
trunk/include/libdodo/ioPipe.h
r1166 r1183 31 31 #define _IOPIPE_H_ 1 32 32 33 #include <fcntl.h>34 #include <sys/un.h>35 #include <sys/socket.h>36 #include <netinet/in.h>37 #include <arpa/inet.h>38 #include <netdb.h>39 40 33 #include <libdodo/directives.h> 41 34 42 #include <libdodo/toolsMisc.h>43 #include <libdodo/ioPipeEx.h>44 #include <libdodo/types.h>45 35 #include <libdodo/ioChannel.h> 46 #include <libdodo/ioNetwork.h>47 36 48 37 namespace dodo … … 50 39 namespace io 51 40 { 41 namespace network 42 { 43 struct __peerInfo; 44 }; 45 52 46 /** 53 47 * @enum pipeOperationTypeEnum defines type of operation for hook … … 166 160 virtual void _writeStream(const char * const data); 167 161 168 FILE*inHandle; ///< input stream descriptor169 FILE*outHandle; ///< output stream descriptor162 void *inHandle; ///< input stream descriptor 163 void *outHandle; ///< output stream descriptor 170 164 171 165 private: -
trunk/include/libdodo/rpcHttpClient.h
r1160 r1183 33 33 #include <libdodo/directives.h> 34 34 35 #include <libdodo/cgi.h> 35 36 #include <libdodo/types.h> 36 37 #include <libdodo/ioNetworkHttp.h> -
trunk/include/libdodo/rpcJsonClient.h
r1160 r1183 37 37 #include <libdodo/rpcClient.h> 38 38 #include <libdodo/rpcJsonMethod.h> 39 #include <libdodo/dataFormatJsonNode.h> 39 40 #include <libdodo/rpcJsonResponse.h> 40 41 -
trunk/include/libdodo/rpcJsonMethod.h
r1160 r1183 34 34 35 35 #include <libdodo/types.h> 36 #include <libdodo/dataFormatJsonNode.h> 36 37 #include <libdodo/toolsString.h> 37 38 #include <libdodo/rpcMethod.h> -
trunk/include/libdodo/rpcJsonResponse.h
r1160 r1183 34 34 35 35 #include <libdodo/types.h> 36 #include <libdodo/dataFormatJsonNode.h> 36 37 #include <libdodo/toolsString.h> 37 38 #include <libdodo/rpcResponse.h> -
trunk/include/libdodo/rpcJsonValue.h
r1160 r1183 34 34 35 35 #include <libdodo/types.h> 36 #include <libdodo/dataFormatJsonNode.h> 36 37 #include <libdodo/toolsString.h> 37 38 #include <libdodo/rpcValue.h> -
trunk/include/libdodo/rpcXmlClient.h
r1160 r1183 34 34 35 35 #include <libdodo/types.h> 36 #include <libdodo/dataFormatXmlNode.h> 36 37 #include <libdodo/toolsString.h> 37 38 #include <libdodo/rpcClient.h> -
trunk/include/libdodo/rpcXmlMethod.h
r1160 r1183 34 34 35 35 #include <libdodo/types.h> 36 #include <libdodo/dataFormatXmlNode.h> 36 37 #include <libdodo/toolsString.h> 37 38 #include <libdodo/rpcMethod.h> -
trunk/include/libdodo/rpcXmlResponse.h
r1160 r1183 34 34 35 35 #include <libdodo/types.h> 36 #include <libdodo/dataFormatXmlNode.h> 36 37 #include <libdodo/toolsString.h> 37 38 #include <libdodo/rpcResponse.h> -
trunk/include/libdodo/rpcXmlValue.h
r1160 r1183 34 34 35 35 #include <libdodo/types.h> 36 #include <libdodo/dataFormatXmlNode.h> 36 37 #include <libdodo/toolsString.h> 37 38 #include <libdodo/rpcValue.h> -
trunk/src/cgiBasicExchange.cc
r1177 r1183 29 29 30 30 #include <libdodo/directives.h> 31 32 #include <stdlib.h> 31 33 32 34 #include <libdodo/cgiBasicExchange.h> -
trunk/src/cgiDialogue.cc
r1177 r1183 38 38 #include <libdodo/cgiExchange.h> 39 39 #include <libdodo/cgiDialogueEx.h> 40 #include <libdodo/toolsString.h> 41 #include <libdodo/toolsCode.h> 42 #include <libdodo/toolsMisc.h> 40 43 41 44 using namespace dodo::cgi; -
trunk/src/graphicsTransform.cc
r1181 r1183 88 88 } 89 89 90 GetExceptionInfo( &(im->exInfo));90 GetExceptionInfo((ExceptionInfo *)im->exInfo); 91 91 92 Image *image = ScaleImage(im->collectedData.handle->imHandle, width, height, &(im->exInfo));92 Image *image = ScaleImage(im->collectedData.handle->imHandle, width, height, (ExceptionInfo *)im->exInfo); 93 93 94 94 if (image == NULL) 95 95 { 96 throw exception::basic(exception::ERRMODULE_GRAPHICSTRANSFORM, TRANSFORMEX_SCALE, exception::ERRNO_IMAGEMAGICK, im->exInfo.error_number, im->exInfo.reason, __LINE__, __FILE__, im->exInfo.description);96 throw exception::basic(exception::ERRMODULE_GRAPHICSTRANSFORM, TRANSFORMEX_SCALE, exception::ERRNO_IMAGEMAGICK, ((ExceptionInfo *)im->exInfo)->error_number, ((ExceptionInfo *)im->exInfo)->reason, __LINE__, __FILE__, ((ExceptionInfo *)im->exInfo)->description); 97 97 } 98 98 … … 114 114 float mult = (float)size / (float)((im->collectedData.handle->imHandle->columns > im->collectedData.handle->imHandle->rows) ? im->collectedData.handle->imHandle->columns : im->collectedData.handle->imHandle->rows); 115 115 116 GetExceptionInfo( &(im->exInfo));116 GetExceptionInfo((ExceptionInfo *)im->exInfo); 117 117 118 Image *image = ScaleImage(im->collectedData.handle->imHandle, (unsigned long)floor(im->collectedData.handle->imHandle->columns * mult), (unsigned long)floor(im->collectedData.handle->imHandle->rows * mult), &(im->exInfo));118 Image *image = ScaleImage(im->collectedData.handle->imHandle, (unsigned long)floor(im->collectedData.handle->imHandle->columns * mult), (unsigned long)floor(im->collectedData.handle->imHandle->rows * mult), (ExceptionInfo *)im->exInfo); 119 119 120 120 if (image == NULL) 121 121 { 122 throw exception::basic(exception::ERRMODULE_GRAPHICSTRANSFORM, TRANSFORMEX_SCALE, exception::ERRNO_IMAGEMAGICK, im->exInfo.error_number, im->exInfo.reason, __LINE__, __FILE__, im->exInfo.description);122 throw exception::basic(exception::ERRMODULE_GRAPHICSTRANSFORM, TRANSFORMEX_SCALE, exception::ERRNO_IMAGEMAGICK, ((ExceptionInfo *)im->exInfo)->error_number, ((ExceptionInfo *)im->exInfo)->reason, __LINE__, __FILE__, ((ExceptionInfo *)im->exInfo)->description); 123 123 } 124 124 … … 138 138 } 139 139 140 GetExceptionInfo( &(im->exInfo));140 GetExceptionInfo((ExceptionInfo *)im->exInfo); 141 141 142 Image *image = RotateImage(im->collectedData.handle->imHandle, angle, &(im->exInfo));142 Image *image = RotateImage(im->collectedData.handle->imHandle, angle, (ExceptionInfo *)im->exInfo); 143 143 144 144 if (image == NULL) 145 145 { 146 throw exception::basic(exception::ERRMODULE_GRAPHICSTRANSFORM, TRANSFORMEX_ROTATE, exception::ERRNO_IMAGEMAGICK, im->exInfo.error_number, im->exInfo.reason, __LINE__, __FILE__, im->exInfo.description);146 throw exception::basic(exception::ERRMODULE_GRAPHICSTRANSFORM, TRANSFORMEX_ROTATE, exception::ERRNO_IMAGEMAGICK, ((ExceptionInfo *)im->exInfo)->error_number, ((ExceptionInfo *)im->exInfo)->reason, __LINE__, __FILE__, ((ExceptionInfo *)im->exInfo)->description); 147 147 } 148 148 -
trunk/src/ioChannel.cc
r1180 r1183 66 66 if (protection == CHANNEL_PROTECTION_PROCESS) 67 67 { 68 keeper = new pc::sync::process::section ;68 keeper = new pc::sync::process::section(0); 69 69 } 70 70 } -
trunk/src/ioEvent.cc
r1162 r1183 28 28 */ 29 29 30 31 #include <libdodo/directives.h> 32 33 #include <poll.h> 34 30 35 #include <libdodo/ioEvent.h> 36 #include <libdodo/ioEventEx.h> 37 #include <libdodo/types.h> 38 #include <libdodo/toolsMisc.h> 39 #include <libdodo/ioEventInfo.h> 40 #include <libdodo/pcSyncProcessSection.h> 41 #include <libdodo/pcSyncProtector.h> 31 42 32 43 using namespace dodo::io; … … 41 52 42 53 event::event() : descs(0), 43 keeper(new pc::sync::process::section )54 keeper(new pc::sync::process::section(0)) 44 55 { 45 56 } -
trunk/src/ioFileFifo.cc
r1166 r1183 28 28 */ 29 29 30 #include <libdodo/directives.h> 31 32 #include <unistd.h> 33 #include <sys/types.h> 34 #include <sys/stat.h> 35 30 36 #include <libdodo/ioFileFifo.h> 37 #include <libdodo/toolsFilesystem.h> 38 #include <libdodo/ioFileFifoEx.h> 39 #include <libdodo/types.h> 40 #include <libdodo/ioChannel.h> 41 #include <libdodo/pcSyncProtector.h> 31 42 32 43 using namespace dodo::io::file; … … 39 50 { 40 51 #ifndef IO_WO_XEXEC 41 42 52 collectedData.setExecObject(XEXEC_OBJECT_IOFILEFIFO); 43 44 53 #endif 45 54 } … … 58 67 { 59 68 #ifndef IO_WO_XEXEC 60 61 69 collectedData.setExecObject(XEXEC_OBJECT_IOFILEFIFO); 62 63 70 #endif 64 71 … … 148 155 { 149 156 #ifndef IO_WO_XEXEC 150 151 157 collectedData.setExecObject(XEXEC_OBJECT_IOFILEFIFO); 152 153 158 #endif 154 159 … … 160 165 int oldDesc, newDesc; 161 166 162 oldDesc = fileno( fd.handler);167 oldDesc = fileno((FILE *)fd.handler); 163 168 if (oldDesc == -1) 164 169 { … … 199 204 if (handler != NULL) 200 205 { 201 fclose( handler);206 fclose((FILE *)handler); 202 207 } 203 208 } … … 215 220 } 216 221 217 return fileno( handler);222 return fileno((FILE *)handler); 218 223 } 219 224 … … 230 235 } 231 236 232 return fileno( handler);237 return fileno((FILE *)handler); 233 238 } 234 239 … … 242 247 if (handler != NULL) 243 248 { 244 if (fclose( handler) != 0)249 if (fclose((FILE *)handler) != 0) 245 250 { 246 251 throw exception::basic(exception::ERRMODULE_IOFILEFIFO, FIFOEX_CLONE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 262 267 int oldDesc, newDesc; 263 268 264 oldDesc = fileno( fd.handler);269 oldDesc = fileno((FILE *)fd.handler); 265 270 if (oldDesc == -1) 266 271 { … … 309 314 if (handler != NULL) 310 315 { 311 if (fclose( handler) != 0)316 if (fclose((FILE *)handler) != 0) 312 317 { 313 318 throw exception::basic(exception::ERRMODULE_IOFILEFIFO, FIFOEX_CLOSE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__, path); … … 340 345 if (handler != NULL) 341 346 { 342 if (fclose( handler) != 0)347 if (fclose((FILE *)handler) != 0) 343 348 { 344 349 throw exception::basic(exception::ERRMODULE_IOFILEFIFO, FIFOEX_OPEN, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__, path); … … 459 464 int blockFlag; 460 465 461 int desc = fileno( handler);466 int desc = fileno((FILE *)handler); 462 467 if (desc == -1) 463 468 { … … 514 519 while (true) 515 520 { 516 if ((n = fread(data, 1, batch, handler)) == 0)517 { 518 if (feof( handler) != 0 || errno == EAGAIN)521 if ((n = fread(data, 1, batch, (FILE *)handler)) == 0) 522 { 523 if (feof((FILE *)handler) != 0 || errno == EAGAIN) 519 524 { 520 525 break; … … 526 531 } 527 532 528 if (ferror( handler) != 0)533 if (ferror((FILE *)handler) != 0) 529 534 { 530 535 throw exception::basic(exception::ERRMODULE_IOFILEFIFO, FIFOEX__READ, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 547 552 while (true) 548 553 { 549 if ((n = fread(data, 1, batch, handler)) == 0)550 { 551 if (feof( handler) != 0 || errno == EAGAIN)554 if ((n = fread(data, 1, batch, (FILE *)handler)) == 0) 555 { 556 if (feof((FILE *)handler) != 0 || errno == EAGAIN) 552 557 { 553 558 break; … … 559 564 } 560 565 561 if (ferror( handler) != 0)566 if (ferror((FILE *)handler) != 0) 562 567 { 563 568 throw exception::basic(exception::ERRMODULE_IOFILEFIFO, FIFOEX__READ, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 598 603 while (true) 599 604 { 600 if ((n = fwrite(data, 1, batch, handler)) == 0)605 if ((n = fwrite(data, 1, batch, (FILE *)handler)) == 0) 601 606 { 602 607 if (errno == EINTR) … … 610 615 } 611 616 612 if (ferror( handler) != 0)617 if (ferror((FILE *)handler) != 0) 613 618 { 614 619 throw exception::basic(exception::ERRMODULE_IOFILEFIFO, FIFOEX__WRITE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 631 636 while (true) 632 637 { 633 if ((n = fwrite(data, 1, batch, handler)) == 0)638 if ((n = fwrite(data, 1, batch, (FILE *)handler)) == 0) 634 639 { 635 640 if (errno == EINTR) … … 643 648 } 644 649 645 if (ferror( handler) != 0)650 if (ferror((FILE *)handler) != 0) 646 651 { 647 652 throw exception::basic(exception::ERRMODULE_IOFILEFIFO, FIFOEX__WRITE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 670 675 } 671 676 672 if (fflush( handler) != 0)677 if (fflush((FILE *)handler) != 0) 673 678 { 674 679 throw exception::basic(exception::ERRMODULE_IOFILEFIFO, FIFOEX_FLUSH, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__, path); … … 692 697 while (true) 693 698 { 694 if (fgets(a_data, readSize, handler) == NULL)699 if (fgets(a_data, readSize, (FILE *)handler) == NULL) 695 700 { 696 701 if (errno == EINTR) … … 704 709 } 705 710 706 if (ferror( handler) != 0)711 if (ferror((FILE *)handler) != 0) 707 712 { 708 713 throw exception::basic(exception::ERRMODULE_IOFILEFIFO, FIFOEX__READSTREAM, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 736 741 while (true) 737 742 { 738 if (fputc('\n', handler) == EOF)743 if (fputc('\n', (FILE *)handler) == EOF) 739 744 { 740 745 if (errno == EINTR) … … 748 753 } 749 754 750 if (ferror( handler) != 0)755 if (ferror((FILE *)handler) != 0) 751 756 { 752 757 throw exception::basic(exception::ERRMODULE_IOFILEFIFO, FIFOEX__WRITESTREAM, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); -
trunk/src/ioFileRegular.cc
r1166 r1183 1 1 2 /*************************************************************************** 2 3 * ioFileRegular.cc … … 28 29 */ 29 30 31 #include <libdodo/directives.h> 32 33 #include <unistd.h> 34 #include <sys/types.h> 35 #include <sys/stat.h> 36 30 37 #include <libdodo/ioFileRegular.h> 38 #include <libdodo/toolsFilesystem.h> 39 #include <libdodo/ioFileRegularEx.h> 40 #include <libdodo/types.h> 41 #include <libdodo/pcSyncProtector.h> 42 #include <libdodo/ioChannel.h> 31 43 32 44 using namespace dodo::io::file; … … 40 52 { 41 53 #ifndef IO_WO_XEXEC 42 43 54 collectedData.setExecObject(XEXEC_OBJECT_IOFILEREGULAR); 44 45 55 #endif 46 56 } … … 60 70 { 61 71 #ifndef IO_WO_XEXEC 62 63 72 collectedData.setExecObject(XEXEC_OBJECT_IOFILEREGULAR); 64 65 73 #endif 66 74 … … 147 155 { 148 156 #ifndef IO_WO_XEXEC 149 150 157 collectedData.setExecObject(XEXEC_OBJECT_IOFILEREGULAR); 151 152 158 #endif 153 159 … … 155 161 outSize = fd.outSize; 156 162 157 if (fd.handler != NULL)163 if (fd.handler != NULL) 158 164 { 159 165 int oldDesc, newDesc; 160 166 161 oldDesc = fileno( fd.handler);167 oldDesc = fileno((FILE *)fd.handler); 162 168 if (oldDesc == -1) 163 169 { … … 203 209 regular::~regular() 204 210 { 205 if (handler != NULL)206 { 207 fclose( handler);211 if (handler != NULL) 212 { 213 fclose((FILE *)handler); 208 214 } 209 215 } … … 221 227 } 222 228 223 return fileno( handler);229 return fileno((FILE *)handler); 224 230 } 225 231 … … 236 242 } 237 243 238 return fileno( handler);244 return fileno((FILE *)handler); 239 245 } 240 246 … … 246 252 pc::sync::protector pg(keeper); 247 253 248 if (handler != NULL)249 { 250 if (fclose( handler) != 0)254 if (handler != NULL) 255 { 256 if (fclose((FILE *)handler) != 0) 251 257 { 252 258 throw exception::basic(exception::ERRMODULE_IOFILEREGULAR, REGULAREX_CLONE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 265 271 outSize = fd.outSize; 266 272 267 if (fd.handler != NULL)273 if (fd.handler != NULL) 268 274 { 269 275 int oldDesc, newDesc; 270 276 271 oldDesc = fileno( fd.handler);277 oldDesc = fileno((FILE *)fd.handler); 272 278 if (oldDesc == -1) 273 279 { … … 321 327 #endif 322 328 323 if (handler != NULL)324 { 325 if (fclose( handler) != 0)329 if (handler != NULL) 330 { 331 if (fclose((FILE *)handler) != 0) 326 332 { 327 333 throw exception::basic(exception::ERRMODULE_IOFILEREGULAR, REGULAREX_CLOSE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__, path); … … 352 358 mode = a_mode; 353 359 354 if (handler != NULL)355 { 356 if (fclose( handler) != 0)360 if (handler != NULL) 361 { 362 if (fclose((FILE *)handler) != 0) 357 363 { 358 364 throw exception::basic(exception::ERRMODULE_IOFILEREGULAR, REGULAREX_OPEN, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__, path); … … 447 453 unsigned long pos = blockOffset ? this->pos * inSize : this->pos; 448 454 449 if (fseek( handler, pos, SEEK_SET) == -1)455 if (fseek((FILE *)handler, pos, SEEK_SET) == -1) 450 456 { 451 457 throw exception::basic(exception::ERRMODULE_IOFILEREGULAR, REGULAREX__READ, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__, path); … … 456 462 while (true) 457 463 { 458 if (fread(a_data, inSize, 1, handler) == 0)459 { 460 if (feof( handler) != 0 || errno == EAGAIN)464 if (fread(a_data, inSize, 1, (FILE *)handler) == 0) 465 { 466 if (feof((FILE *)handler) != 0 || errno == EAGAIN) 461 467 { 462 468 break; … … 468 474 } 469 475 470 if (ferror( handler) != 0)476 if (ferror((FILE *)handler) != 0) 471 477 { 472 478 throw exception::basic(exception::ERRMODULE_IOFILEREGULAR, REGULAREX__READ, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 492 498 if (append) 493 499 { 494 if (fseek( handler, 0, SEEK_END) == -1)500 if (fseek((FILE *)handler, 0, SEEK_END) == -1) 495 501 { 496 502 throw exception::basic(exception::ERRMODULE_IOFILEREGULAR, REGULAREX__WRITE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__, path); … … 502 508 if (!overwrite) 503 509 { 504 if (fseek( handler, pos, SEEK_SET) == -1)510 if (fseek((FILE *)handler, pos, SEEK_SET) == -1) 505 511 { 506 512 throw exception::basic(exception::ERRMODULE_IOFILEREGULAR, REGULAREX__WRITE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__, path); … … 509 515 char *t_buf = new char[outSize]; 510 516 511 size_t read = fread(t_buf, outSize, 1, handler);517 size_t read = fread(t_buf, outSize, 1, (FILE *)handler); 512 518 513 519 delete [] t_buf; … … 519 525 } 520 526 521 if (fseek( handler, pos, SEEK_SET) == -1)527 if (fseek((FILE *)handler, pos, SEEK_SET) == -1) 522 528 { 523 529 throw exception::basic(exception::ERRMODULE_IOFILEREGULAR, REGULAREX__WRITE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__, path); … … 528 534 while (true) 529 535 { 530 if (fwrite(a_data, outSize, 1, handler) == 0)536 if (fwrite(a_data, outSize, 1, (FILE *)handler) == 0) 531 537 { 532 538 if (errno == EINTR) … … 540 546 } 541 547 542 if (ferror( handler) != 0)548 if (ferror((FILE *)handler) != 0) 543 549 { 544 550 throw exception::basic(exception::ERRMODULE_IOFILEREGULAR, REGULAREX__WRITE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 594 600 } 595 601 596 if (fflush( handler) != 0)602 if (fflush((FILE *)handler) != 0) 597 603 { 598 604 throw exception::basic(exception::ERRMODULE_IOFILEREGULAR, REGULAREX_FLUSH, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__, path); … … 614 620 if (blockOffset) 615 621 { 616 if (fseek( handler, 0, SEEK_SET) == -1)622 if (fseek((FILE *)handler, 0, SEEK_SET) == -1) 617 623 { 618 624 throw exception::basic(exception::ERRMODULE_IOFILEREGULAR, REGULAREX__READSTREAM, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__, path); … … 621 627 for (unsigned long i = 0; i < pos; ++i) 622 628 { 623 if (fgets(a_data, readSize, handler) == NULL)629 if (fgets(a_data, readSize, (FILE *)handler) == NULL) 624 630 { 625 631 switch (errno) … … 639 645 } 640 646 } 641 else if (fseek( handler, pos, SEEK_SET) == -1)647 else if (fseek((FILE *)handler, pos, SEEK_SET) == -1) 642 648 { 643 649 throw exception::basic(exception::ERRMODULE_IOFILEREGULAR, REGULAREX__READSTREAM, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__, path); … … 648 654 while (true) 649 655 { 650 if (fgets(a_data, readSize, handler) == NULL)656 if (fgets(a_data, readSize, (FILE *)handler) == NULL) 651 657 { 652 658 if (errno == EINTR) … … 660 666 } 661 667 662 if (ferror( handler) != 0)668 if (ferror((FILE *)handler) != 0) 663 669 { 664 670 throw exception::basic(exception::ERRMODULE_IOFILEREGULAR, REGULAREX__READSTREAM, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 684 690 if (mode != REGULAR_OPENMODE_APPEND) 685 691 { 686 if (fseek( handler, 0, SEEK_END) == -1)692 if (fseek((FILE *)handler, 0, SEEK_END) == -1) 687 693 { 688 694 throw exception::basic(exception::ERRMODULE_IOFILEREGULAR, REGULAREX__WRITESTREAM, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__, path); … … 701 707 while (true) 702 708 { 703 if (fwrite(a_data, _outSize, 1, handler) == 0)709 if (fwrite(a_data, _outSize, 1, (FILE *)handler) == 0) 704 710 { 705 711 if (errno == EINTR) … … 708 714 } 709 715 710 if (ferror( handler) != 0)716 if (ferror((FILE *)handler) != 0) 711 717 { 712 718 throw exception::basic(exception::ERRMODULE_IOFILEREGULAR, REGULAREX__WRITESTREAM, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); -
trunk/src/ioFileTemp.cc
r1166 r1183 28 28 */ 29 29 30 #include <libdodo/directives.h> 31 32 #include <unistd.h> 33 #include <sys/types.h> 34 #include <sys/stat.h> 35 30 36 #include <libdodo/ioFileTemp.h> 37 #include <libdodo/ioFileTempEx.h> 38 #include <libdodo/types.h> 39 #include <libdodo/ioChannel.h> 40 #include <libdodo/pcSyncProtector.h> 31 41 32 42 using namespace dodo::io::file; … … 41 51 { 42 52 #ifndef IO_WO_XEXEC 43 44 53 collectedData.setExecObject(XEXEC_OBJECT_IOFILETEMP); 45 46 54 #endif 47 55 … … 67 75 { 68 76 #ifndef IO_WO_XEXEC 69 70 77 collectedData.setExecObject(XEXEC_OBJECT_IOFILETEMP); 71 72 78 #endif 73 79 … … 79 85 int oldDesc, newDesc; 80 86 81 oldDesc = fileno( fd.handler);87 oldDesc = fileno((FILE *)fd.handler); 82 88 if (oldDesc == -1) 83 89 { … … 106 112 if (handler != NULL) 107 113 { 108 fclose( handler);114 fclose((FILE *)handler); 109 115 } 110 116 } … … 122 128 } 123 129 124 return fileno( handler);130 return fileno((FILE *)handler); 125 131 } 126 132 … … 137 143 } 138 144 139 return fileno( handler);145 return fileno((FILE *)handler); 140 146 } 141 147 … … 149 155 if (handler != NULL) 150 156 { 151 if (fclose( handler) != 0)157 if (fclose((FILE *)handler) != 0) 152 158 { 153 159 throw exception::basic(exception::ERRMODULE_IOFILETEMP, TEMPEX_CLONE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 168 174 int oldDesc, newDesc; 169 175 170 oldDesc = fileno( fd.handler);176 oldDesc = fileno((FILE *)fd.handler); 171 177 if (oldDesc == -1) 172 178 { … … 203 209 if (handler != NULL) 204 210 { 205 if (fclose( handler) != 0)211 if (fclose((FILE *)handler) != 0) 206 212 { 207 213 throw exception::basic(exception::ERRMODULE_IOFILETEMP, TEMPEX_CLOSE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 230 236 if (handler != NULL) 231 237 { 232 if (fclose( handler) != 0)238 if (fclose((FILE *)handler) != 0) 233 239 { 234 240 throw exception::basic(exception::ERRMODULE_IOFILETEMP, TEMPEX_OPEN, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 261 267 unsigned long pos = blockOffset ? this->pos * inSize : this->pos; 262 268 263 if (fseek( handler, pos * inSize, SEEK_SET) == -1)269 if (fseek((FILE *)handler, pos * inSize, SEEK_SET) == -1) 264 270 { 265 271 throw exception::basic(exception::ERRMODULE_IOFILETEMP, TEMPEX__READ, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 270 276 while (true) 271 277 { 272 if (fread(a_data, inSize, 1, handler) == 0)273 { 274 if (feof( handler) != 0 || errno == EAGAIN)278 if (fread(a_data, inSize, 1, (FILE *)handler) == 0) 279 { 280 if (feof((FILE *)handler) != 0 || errno == EAGAIN) 275 281 { 276 282 break; … … 282 288 } 283 289 284 if (ferror( handler) != 0)290 if (ferror((FILE *)handler) != 0) 285 291 { 286 292 throw exception::basic(exception::ERRMODULE_IOFILETEMP, TEMPEX__READ, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 304 310 if (append) 305 311 { 306 if (fseek( handler, 0, SEEK_END) == -1)312 if (fseek((FILE *)handler, 0, SEEK_END) == -1) 307 313 { 308 314 throw exception::basic(exception::ERRMODULE_IOFILETEMP, TEMPEX__WRITE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 314 320 if (!overwrite) 315 321 { 316 if (fseek( handler, pos, SEEK_SET) == -1)322 if (fseek((FILE *)handler, pos, SEEK_SET) == -1) 317 323 { 318 324 throw exception::basic(exception::ERRMODULE_IOFILETEMP, TEMPEX__WRITE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 321 327 char *t_buf = new char[outSize]; 322 328 323 size_t read = fread(t_buf, outSize, 1, handler);329 size_t read = fread(t_buf, outSize, 1, (FILE *)handler); 324 330 325 331 delete [] t_buf; … … 331 337 } 332 338 333 if (fseek( handler, pos, SEEK_SET) == -1)339 if (fseek((FILE *)handler, pos, SEEK_SET) == -1) 334 340 { 335 341 throw exception::basic(exception::ERRMODULE_IOFILETEMP, TEMPEX__WRITE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 339 345 while (true) 340 346 { 341 if (fwrite(a_data, outSize, 1, handler) == 0)347 if (fwrite(a_data, outSize, 1, (FILE *)handler) == 0) 342 348 { 343 349 if (errno == EINTR) … … 351 357 } 352 358 353 if (ferror( handler) != 0)359 if (ferror((FILE *)handler) != 0) 354 360 { 355 361 throw exception::basic(exception::ERRMODULE_IOFILETEMP, TEMPEX__WRITE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 405 411 } 406 412 407 if (fflush( handler) != 0)413 if (fflush((FILE *)handler) != 0) 408 414 { 409 415 throw exception::basic(exception::ERRMODULE_IOFILETEMP, TEMPEX_FLUSH, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 425 431 if (blockOffset) 426 432 { 427 if (fseek( handler, 0, SEEK_SET) == -1)433 if (fseek((FILE *)handler, 0, SEEK_SET) == -1) 428 434 { 429 435 throw exception::basic(exception::ERRMODULE_IOFILETEMP, TEMPEX__READSTREAM, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 432 438 for (unsigned long i = 0; i < pos; ++i) 433 439 { 434 if (fgets(a_data, readSize, handler) == NULL)440 if (fgets(a_data, readSize, (FILE *)handler) == NULL) 435 441 { 436 442 switch (errno) … … 450 456 } 451 457 } 452 else if (fseek( handler, pos, SEEK_SET) == -1)458 else if (fseek((FILE *)handler, pos, SEEK_SET) == -1) 453 459 { 454 460 throw exception::basic(exception::ERRMODULE_IOFILETEMP, TEMPEX__READSTREAM, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 459 465 while (true) 460 466 { 461 if (fgets(a_data, readSize, handler) == NULL)467 if (fgets(a_data, readSize, (FILE *)handler) == NULL) 462 468 { 463 469 if (errno == EINTR) … … 471 477 } 472 478 473 if (ferror( handler) != 0)479 if (ferror((FILE *)handler) != 0) 474 480 { 475 481 throw exception::basic(exception::ERRMODULE_IOFILETEMP, TEMPEX__READSTREAM, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 493 499 } 494 500 495 if (fseek( handler, 0, SEEK_END) == -1)501 if (fseek((FILE *)handler, 0, SEEK_END) == -1) 496 502 { 497 503 throw exception::basic(exception::ERRMODULE_IOFILETEMP, TEMPEX__WRITESTREAM, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 509 515 while (true) 510 516 { 511 if (fwrite(a_data, _outSize, 1, handler) == 0)517 if (fwrite(a_data, _outSize, 1, (FILE *)handler) == 0) 512 518 { 513 519 if (errno == EINTR) … … 516 522 } 517 523 518 if (ferror( handler) != 0)524 if (ferror((FILE *)handler) != 0) 519 525 { 520 526 throw exception::basic(exception::ERRMODULE_IOFILETEMP, TEMPEX__WRITESTREAM, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); -
trunk/src/ioMemory.cc
r1166 r1183 28 28 */ 29 29 30 #include <libdodo/directives.h> 31 30 32 #include <libdodo/ioMemory.h> 33 #include <libdodo/types.h> 34 #include <libdodo/ioChannel.h> 35 #include <libdodo/ioMemoryEx.h> 36 #include <libdodo/pcSyncProtector.h> 31 37 32 38 using namespace dodo::io; … … 38 44 { 39 45 #ifndef IO_WO_XEXEC 40 41 46 collectedData.setExecObject(XEXEC_OBJECT_IOMEMORY); 42 43 47 #endif 44 48 } … … 53 57 { 54 58 #ifndef IO_WO_XEXEC 55 56 59 collectedData.setExecObject(XEXEC_OBJECT_IOFILEREGULAR); 57 58 60 #endif 59 61 … … 72 74 { 73 75 #ifndef IO_WO_XEXEC 74 75 76 collectedData.setExecObject(XEXEC_OBJECT_IOFILEREGULAR); 76 77 77 #endif 78 78 } … … 90 90 { 91 91 throw exception::basic(exception::ERRMODULE_IOMEMORY, MEMORYEX_GETINDESCRIPTOR, exception::ERRNO_LIBDODO, MEMORYEX_CANTBEUSEDWITHIOEVENT, IOMEMORYEX_CANTBEUSEDWITHIOEVENT_STR, __LINE__, __FILE__); 92 93 return -1;94 92 } 95 93 … … 100 98 { 101 99 throw exception::basic(exception::ERRMODULE_IOMEMORY, MEMORYEX_GETOUTDESCRIPTOR, exception::ERRNO_LIBDODO, MEMORYEX_CANTBEUSEDWITHIOEVENT, IOMEMORYEX_CANTBEUSEDWITHIOEVENT_STR, __LINE__, __FILE__); 102 103 return -1;104 100 } 105 101 -
trunk/src/ioNetworkClient.cc
r1166 r1183 28 28 */ 29 29 30 #include <libdodo/directives.h> 31 32 #include <sys/types.h> 33 #include <sys/stat.h> 34 #include <netinet/in.h> 35 #include <arpa/inet.h> 36 #include <netdb.h> 37 #include <sys/un.h> 38 #include <sys/socket.h> 39 #include <net/if.h> 40 #include <sys/ioctl.h> 41 #include <fcntl.h> 42 30 43 #include <libdodo/ioNetworkClient.h> 44 #include <libdodo/ioNetworkClientEx.h> 45 #include <libdodo/types.h> 46 #include <libdodo/ioNetworkConnection.h> 47 #include <libdodo/ioNetworkExchange.h> 48 #include <libdodo/xexec.h> 31 49 32 50 using namespace dodo::io::network; 33 51 34 52 #ifndef IO_WO_XEXEC 35 36 53 __xexecIoNetworkClientCollectedData::__xexecIoNetworkClientCollectedData(xexec *executor, 37 54 short execObject) : __xexecCollectedData(executor, execObject) 38 55 { 39 56 } 40 41 57 #endif 42 58 … … 44 60 45 61 client::client(client &fs) 46 47 #ifndef IO_WO_XEXEC 48 62 #ifndef IO_WO_XEXEC 49 63 : collectedData(this, XEXEC_OBJECT_IONETWORKCLIENT) 50 51 #endif 52 64 #endif 53 65 { 54 66 } … … 61 73 blockInherited(false) 62 74 #ifndef IO_WO_XEXEC 63 64 75 , 65 76 collectedData(this, XEXEC_OBJECT_IONETWORKCLIENT) 66 67 77 #endif 68 78 { -
trunk/src/ioNetworkConnection.cc
r1166 r1183 28 28 */ 29 29 30 #include <libdodo/directives.h> 31 32 #include <sys/socket.h> 33 #include <fcntl.h> 34 30 35 #include <libdodo/ioNetworkConnection.h> 36 #include <libdodo/ioNetworkConnectionEx.h> 31 37 32 38 using namespace dodo::io::network; … … 268 274 break; 269 275 270 #ifdef SO_REUSEPORT271 272 case CONNECTION_OPTION_REUSE_PORT:273 274 real_option = SO_REUSEPORT;275 276 break;277 278 #endif279 280 276 default: 281 277 -
trunk/src/ioNetworkExchange.cc
r1166 r1183 28 28 */ 29 29 30 #include <libdodo/directives.h> 31 32 #include <arpa/inet.h> 33 #include <poll.h> 34 30 35 #include <libdodo/ioNetworkExchange.h> 36 #include <libdodo/ioNetworkConnection.h> 37 #include <libdodo/ioChannel.h> 38 #include <libdodo/ioNetworkExchangeEx.h> 39 #include <libdodo/types.h> 40 #include <libdodo/pcSyncProtector.h> 31 41 32 42 using namespace dodo::io::network; … … 48 58 { 49 59 #ifndef IO_WO_XEXEC 50 51 60 collectedData.setExecObject(XEXEC_OBJECT_IONETWORKEXCHANGE); 52 53 61 #endif 54 62 … … 73 81 { 74 82 #ifndef IO_WO_XEXEC 75 76 83 collectedData.setExecObject(XEXEC_OBJECT_IONETWORKEXCHANGE); 77 78 84 #endif 79 85 } … … 85 91 { 86 92 #ifndef IO_WO_XEXEC 87 88 93 collectedData.setExecObject(XEXEC_OBJECT_IONETWORKEXCHANGE); 89 90 94 #endif 91 95 -
trunk/src/ioNetworkHttp.cc
r1166 r1183 28 28 */ 29 29 30 #include <libdodo/directives.h> 31 32 #include <unistd.h> 33 #include <sys/types.h> 34 #include <sys/stat.h> 35 30 36 #include <libdodo/ioNetworkHttp.h> 37 #include <libdodo/toolsCode.h> 38 #include <libdodo/ioNetworkClient.h> 39 #include <libdodo/ioNetworkSslClient.h> 40 #include <libdodo/toolsNetwork.h> 41 #include <libdodo/ioNetworkHttpEx.h> 42 #include <libdodo/ioNetworkClientEx.h> 43 #include <libdodo/ioNetworkExchangeEx.h> 44 #include <libdodo/types.h> 45 #include <libdodo/cgi.h> 31 46 32 47 using namespace dodo::io::network; -
trunk/src/ioPipe.cc
r1166 r1183 28 28 */ 29 29 30 #include <libdodo/directives.h> 31 32 #include <stdio.h> 33 #include <arpa/inet.h> 34 #include <fcntl.h> 35 30 36 #include <libdodo/ioPipe.h> 37 #include <libdodo/ioPipeEx.h> 38 #include <libdodo/ioChannel.h> 39 #include <libdodo/ioNetworkConnection.h> 40 #include <libdodo/pcSyncProtector.h> 31 41 32 42 using namespace dodo; … … 41 51 { 42 52 #ifndef IO_WO_XEXEC 43 44 53 collectedData.setExecObject(XEXEC_OBJECT_IOPIPE); 45 46 54 #endif 47 55 … … 79 87 { 80 88 #ifndef IO_WO_XEXEC 81 82 89 collectedData.setExecObject(XEXEC_OBJECT_IOPIPE); 83 84 90 #endif 85 91 … … 91 97 int oldDesc, newDesc; 92 98 93 oldDesc = fileno( fd.inHandle);99 oldDesc = fileno((FILE *)fd.inHandle); 94 100 if (oldDesc == -1) 95 101 { … … 109 115 } 110 116 111 oldDesc = fileno( fd.outHandle);117 oldDesc = fileno((FILE *)fd.outHandle); 112 118 if (oldDesc == -1) 113 119 { … … 135 141 if (inHandle != NULL) 136 142 { 137 fclose( inHandle);143 fclose((FILE *)inHandle); 138 144 } 139 145 140 146 if (outHandle != NULL) 141 147 { 142 fclose( outHandle);148 fclose((FILE *)outHandle); 143 149 } 144 150 } … … 153 159 if (inHandle != NULL) 154 160 { 155 if (fclose( inHandle) != 0)161 if (fclose((FILE *)inHandle) != 0) 156 162 { 157 163 throw exception::basic(exception::ERRMODULE_IOPIPE, PIPEEX_CLONE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 163 169 if (outHandle != NULL) 164 170 { 165 if (fclose( outHandle) != 0)171 if (fclose((FILE *)outHandle) != 0) 166 172 { 167 173 throw exception::basic(exception::ERRMODULE_IOPIPE, PIPEEX_CLONE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 181 187 int oldDesc, newDesc; 182 188 183 oldDesc = fileno( fd.inHandle);189 oldDesc = fileno((FILE *)fd.inHandle); 184 190 if (oldDesc == -1) 185 191 { … … 199 205 } 200 206 201 oldDesc = fileno( fd.outHandle);207 oldDesc = fileno((FILE *)fd.outHandle); 202 208 if (oldDesc == -1) 203 209 { … … 231 237 } 232 238 233 return fileno( inHandle);239 return fileno((FILE *)inHandle); 234 240 } 235 241 … … 246 252 } 247 253 248 return fileno( outHandle);254 return fileno((FILE *)outHandle); 249 255 } 250 256 … … 263 269 if (inHandle != NULL) 264 270 { 265 if (fclose( inHandle) != 0)271 if (fclose((FILE *)inHandle) != 0) 266 272 { 267 273 throw exception::basic(exception::ERRMODULE_IOPIPE, PIPEEX_CLOSE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 273 279 if (outHandle != NULL) 274 280 { 275 if (fclose( outHandle) != 0)281 if (fclose((FILE *)outHandle) != 0) 276 282 { 277 283 throw exception::basic(exception::ERRMODULE_IOPIPE, PIPEEX_CLOSE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 300 306 if (inHandle != NULL) 301 307 { 302 if (fclose( inHandle) != 0)308 if (fclose((FILE *)inHandle) != 0) 303 309 { 304 310 throw exception::basic(exception::ERRMODULE_IOPIPE, PIPEEX_OPEN, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 310 316 if (outHandle != NULL) 311 317 { 312 if (fclose( outHandle) != 0)318 if (fclose((FILE *)outHandle) != 0) 313 319 { 314 320 throw exception::basic(exception::ERRMODULE_IOPIPE, PIPEEX_OPEN, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 368 374 while (true) 369 375 { 370 if ((n = fread(data, 1, batch, inHandle)) == 0)376 if ((n = fread(data, 1, batch, (FILE *)inHandle)) == 0) 371 377 { 372 if (feof( inHandle) != 0 || errno == EAGAIN)378 if (feof((FILE *)inHandle) != 0 || errno == EAGAIN) 373 379 { 374 380 break; … … 380 386 } 381 387 382 if (ferror( inHandle) != 0)388 if (ferror((FILE *)inHandle) != 0) 383 389 { 384 390 throw exception::basic(exception::ERRMODULE_IOPIPE, PIPEEX__READ, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 401 407 while (true) 402 408 { 403 if ((n = fread(data, 1, batch, inHandle)) == 0)409 if ((n = fread(data, 1, batch, (FILE *)inHandle)) == 0) 404 410 { 405 if (feof( inHandle) != 0 || errno == EAGAIN)411 if (feof((FILE *)inHandle) != 0 || errno == EAGAIN) 406 412 { 407 413 break; … … 413 419 } 414 420 415 if (ferror( inHandle) != 0)421 if (ferror((FILE *)inHandle) != 0) 416 422 { 417 423 throw exception::basic(exception::ERRMODULE_IOPIPE, PIPEEX__READ, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 452 458 while (true) 453 459 { 454 if ((n = fwrite(data, 1, batch, outHandle)) == 0)460 if ((n = fwrite(data, 1, batch, (FILE *)outHandle)) == 0) 455 461 { 456 462 if (errno == EINTR) … … 464 470 } 465 471 466 if (ferror( outHandle) != 0)472 if (ferror((FILE *)outHandle) != 0) 467 473 { 468 474 throw exception::basic(exception::ERRMODULE_IOPIPE, PIPEEX__WRITE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 485 491 while (true) 486 492 { 487 if ((n = fwrite(data, 1, batch, outHandle)) == 0)493 if ((n = fwrite(data, 1, batch, (FILE *)outHandle)) == 0) 488 494 { 489 495 if (errno == EINTR) … … 497 503 } 498 504 499 if (ferror( outHandle) != 0)505 if (ferror((FILE *)outHandle) != 0) 500 506 { 501 507 throw exception::basic(exception::ERRMODULE_IOPIPE, PIPEEX__WRITE, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 524 530 } 525 531 526 if (fflush( outHandle) != 0)532 if (fflush((FILE *)outHandle) != 0) 527 533 { 528 534 throw exception::basic(exception::ERRMODULE_IOPIPE, PIPEEX_FLUSH, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 548 554 socklen_t len = sizeof(sockaddr_in6); 549 555 550 int desc = fileno( inHandle);556 int desc = fileno((FILE *)inHandle); 551 557 if (desc == -1) 552 558 { … … 634 640 int desc; 635 641 636 desc = fileno( inHandle);642 desc = fileno((FILE *)inHandle); 637 643 if (desc == -1) 638 644 { … … 660 666 } 661 667 662 desc = fileno( outHandle);668 desc = fileno((FILE *)outHandle); 663 669 if (desc == -1) 664 670 { … … 705 711 while (true) 706 712 { 707 if (fgets(a_data, readSize, inHandle) == NULL)713 if (fgets(a_data, readSize, (FILE *)inHandle) == NULL) 708 714 { 709 715 if (errno == EINTR) … … 717 723 } 718 724 719 if (ferror( inHandle) != 0)725 if (ferror((FILE *)inHandle) != 0) 720 726 { 721 727 throw exception::basic(exception::ERRMODULE_IOPIPE, PIPEEX__READSTREAM, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); … … 749 755 while (true) 750 756 { 751 if (fputc('\n', outHandle) == EOF)757 if (fputc('\n', (FILE *)outHandle) == EOF) 752 758 { 753 759 if (errno == EINTR) … … 761 767 } 762 768 763 if (ferror( outHandle) != 0)769 if (ferror((FILE *)outHandle) != 0) 764 770 { 765 771 throw exception::basic(exception::ERRMODULE_IOPIPE, PIPEEX__WRITESTREAM, exception::ERRNO_ERRNO, errno, strerror(errno), __LINE__, __FILE__); -
trunk/src/toolsLogger.cc
r1162 r1183 65 65 timeFormat(" %d/%m/%Y.%H-%M-%S: "), 66 66 forward(false), 67 keeper(new pc::sync::process::section )67 keeper(new pc::sync::process::section(0)) 68 68 { 69 69 } -
trunk/tests/image_test/test.cc
r1181 r1183 155 155 catch (dodo::exception::basic ex) 156 156 { 157 cout << endl << ex.baseErrstr << endl << ex.line << endl << ex.baseErrno << endl ;157 cout << endl << ex.baseErrstr << endl << ex.line << endl << ex.baseErrno << endl << ex.getCallStack() << endl; 158 158 } 159 159
Note: See TracChangeset
for help on using the changeset viewer.
