Changeset 3273 in orxonox.OLD for orxonox/branches/updater/src/gui/orxonox_gui_update.cc
- Timestamp:
- Dec 24, 2004, 9:43:22 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/updater/src/gui/orxonox_gui_update.cc
r3272 r3273 200 200 } 201 201 202 #ifdef HAVE_CURL 202 203 CURL* OrxonoxGuiUpdate::curlHandle = NULL; 204 #endif /* HAVE_CURL */ 205 206 #ifdef HAVE_PTHREAD_H 203 207 pthread_t* OrxonoxGuiUpdate::downloadThreadID = new pthread_t; 208 #endif /* HAVE_PTHREAD_H */ 204 209 bool OrxonoxGuiUpdate::isDownloading = false; 205 210 … … 217 222 strcpy (fileOnDisk, info->localRoot); 218 223 strcat (fileOnDisk, info->fileName); 219 pthread_t test; 224 220 225 if(curlHandle) 221 226 { … … 234 239 { 235 240 //! \todo check if threads really were created. 241 #ifdef HAVE_PTHREAD_H 236 242 pthread_create(downloadThreadID, NULL, downloadThread, info); 243 #else 244 downloadThread(info); 245 #endif /* HAVE_PTHREAD_H */ 246 237 247 // else 238 248 // PRINTF(1)("thread already in use\n"); … … 252 262 if (curlHandle) 253 263 curl_easy_cleanup(curlHandle); 254 264 #ifdef HAVE_PTHREAD_H 255 265 pthread_join(*downloadThreadID, NULL); 266 #endif /* HAVE_PTHREAD_H */ 256 267 PRINTF(3)("Closing the downloaded file.\n"); 257 268 fclose(info->fileHandle);
Note: See TracChangeset
for help on using the changeset viewer.