| 1116 | } |
| 1117 | |
| 1118 | static FILE *get_fsockin(struct handle_data *handle_data_arg) |
| 1119 | { |
| 1120 | #ifdef __MINGW32__ |
| 1121 | int sock_osfhandle = _open_osfhandle(handle_data_arg->sock, _O_RDONLY); |
| 1122 | |
| 1123 | if (sock_osfhandle == -1) |
| 1124 | { |
| 1125 | rig_debug(RIG_DEBUG_ERR, "_open_osfhandle error: %s\n", strerror(errno)); |
| 1126 | return NULL; |
| 1127 | } |
| 1128 | |
| 1129 | return _fdopen(sock_osfhandle, "rb"); |
| 1130 | #else |
| 1131 | return fdopen(handle_data_arg->sock, "rb"); |
| 1132 | #endif |
| 1133 | } |
| 1134 | |
| 1135 | /* |
| 1136 | * This is the function run by the threads |
no test coverage detected