[commit] r1688 - trunk/GME/Gme
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Tue Nov 15 17:20:04 CST 2011
Author: ksmyth
Date: Tue Nov 15 17:20:04 2011
New Revision: 1688
Log:
Abort any active transaction before emergency save
Modified:
trunk/GME/Gme/GMEApp.cpp
Modified: trunk/GME/Gme/GMEApp.cpp
==============================================================================
--- trunk/GME/Gme/GMEApp.cpp Tue Nov 15 13:34:02 2011 (r1687)
+++ trunk/GME/Gme/GMEApp.cpp Tue Nov 15 17:20:04 2011 (r1688)
@@ -490,6 +490,10 @@
static int emnum;
emcode.Format(_T("-emergency%ld"), ++emnum);
embackupname.Insert(p, emcode);
+ long status = 0;
+ mgaProject->get_ProjectStatus(&status); // ignore failure
+ if (status == 3 || status == 4) // i.e. in tx
+ mgaProject->AbortTransaction(); // ignore failure
HRESULT hr = mgaProject->Save(PutInBstr(embackupname), VARIANT_TRUE);
if (proj_type_is_xmlbackend) {
AfxMessageBox(_T("Your current work can be found in the local checkout directory."));
@@ -3152,3 +3156,19 @@
else
AfxMessageBox( p_msg);
}
+
+void* alloc10() {
+ return malloc(10 * 1024 * 1024);
+}
+void* alloc100() {
+ return malloc(100 * 1024 * 1024);
+}
+void* alloc1000() {
+ return malloc(1000 * 1024 * 1024);
+}
+
+void allocstr() {
+ //while (SysAllocString(L"11111111111111111111111111111111111111111111111111"))
+ while (SysAllocStringLen(0, 4096))
+ ;
+}
\ No newline at end of file
More information about the gme-commit
mailing list