Changeset 24665
- Timestamp:
- 11/23/08 02:20:50 (7 weeks ago)
- Files:
-
- 1 modified
-
lang/c/AutoUpdater/AutoUpdater.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/c/AutoUpdater/AutoUpdater.c
r24023 r24665 34 34 #pragma comment(lib, "wininet.lib") 35 35 #endif 36 static unsigned int sleep(unsigned int seconds) { 37 Sleep(1000 * seconds); 38 return 0; 39 } 36 40 #endif 41 #endif 42 43 #ifndef _countof 44 #define _countof(array) (sizeof(array) / sizeof(array[0])) 37 45 #endif 38 46 … … 177 185 178 186 { 179 //size_t url_bytes = 0;180 187 AU_Source* source = *new_source; 181 188 AU_API_PRECONDITION; … … 260 267 free(source->url_list); 261 268 } 269 if (source->update_information.file) { 270 fclose(source->update_information.file); 271 } 262 272 263 273 // clear memory … … 276 286 AU_Result AU_GetUpdateInformation(AU_Source* source) { 277 287 AU_API_PRECONDITION; 278 288 { 289 if (!source->update_information.file) { 290 source->update_information.file = tmpfile(); 291 if (!source->update_information.file) { 292 sleep(1); 293 source->update_information.file = tmpfile(); 294 if (!source->update_information.file) { 295 return AU_ERROR_NETWORK; 296 } 297 } 298 } 299 } 279 300 #ifdef AU_WINDOWS 280 301 {
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)