extern "C" int __declspec(dllexport) Unload(void) { FreeLogFonts(); Chat_Unload(); int iRet = SplitmsgShutdown(); Skin->setupTabCloseBitmap(true); Skin->UnloadAeroTabs(); CleanTempFiles(); delete Skin; DestroyServiceFunction(hTypingNotify); delete sendLater; delete sendQueue; return iRet; }
// decode! bool CodeTorrent::Decode() { int i; //struct timeval start_dec, end_dec; if (identity != CT_CLIENT) {// if I'm a server, why do it? HAGGLE_ERR("Server is trying to decode\n"); return false; } //why in the world does the identity get reset to server? //identity = CT_SERVER; if (GetGenCompleted() != GetNumGens()) { // make sure all generations are in! HAGGLE_DBG("The file is not complete, decoding failed - GenCompleted=%d NumGens=%d\n",GetGenCompleted(),GetNumGens()); //fprintf(stderr, "The file download is not complete, decoding failed.\n"); return false; } //gettimeofday(&start_dec, &ct_tz); //printf("Decoding: "); for (i = 0; i < GetNumGens(); i++) { //printf("%d : ", i); if(!DecodeGen(i)) { HAGGLE_ERR("Decoding failure\n"); // MOS return false; } } /* gettimeofday(&end_dec, &ct_tz); printf("Decoding time: %ld.%ld\n", CT_GetTimeDifference(start_dec, end_dec)/1000, CT_GetTimeDifference(start_dec, end_dec)%1000); */ //printf("done!\n"); //gettimeofday(&ct_tv_end, &ct_tz); //printf("TIME!!! %ld.%ld\n", CT_GetTimeDifference(ct_tv_beg, ct_tv_end)/1000, CT_GetTimeDifference(ct_tv_beg, ct_tv_end)%1000); // we don't need this stuff anymore CleanBuffer(); CleanTempFiles(); return true; }