Author: mladen.turk(a)jboss.com
Date: 2007-09-28 05:03:39 -0400 (Fri, 28 Sep 2007)
New Revision: 1056
Modified:
trunk/sight/native/os/windows/service.c
trunk/sight/native/share/dir.c
Log:
Add more refcounts
Modified: trunk/sight/native/os/windows/service.c
===================================================================
--- trunk/sight/native/os/windows/service.c 2007-09-28 08:26:55 UTC (rev 1055)
+++ trunk/sight/native/os/windows/service.c 2007-09-28 09:03:39 UTC (rev 1056)
@@ -356,7 +356,7 @@
return APR_EINVAL;
}
hsvc = no->native;
-
+ SIGHT_NO_IREF(no);
if (!QueryServiceStatusEx(hsvc, SC_STATUS_PROCESS_INFO,
buf, sizeof(buf), &cbBytesNeeded)) {
rc = GetLastError();
@@ -398,6 +398,7 @@
CALL_METHOD1(0000, thiz, lpStatus->dwCurrentState);
cleanup:
+ SIGHT_NO_DREF(no);
return APR_FROM_OS_ERROR(rc);
}
@@ -425,6 +426,7 @@
return APR_EINVAL;
}
hsvc = no->native;
+ SIGHT_NO_IREF(no);
if (!QueryServiceStatusEx(hsvc, SC_STATUS_PROCESS_INFO,
buf, sizeof(buf), &cbBytesNeeded)) {
@@ -439,12 +441,14 @@
cb.msig = "(I)I";
cb.object = progress;
cb.method = (*_E)->GetMethodID(_E, c, cb.name, cb.msig);
- if (!cb.method || (*_E)->ExceptionCheck(_E)) {
- return APR_EINVAL;
+ if (!cb.method || (*_E)->ExceptionCheck(_E)) {
+ rc = EINVAL;
+ goto cleanup;
}
cres = (*_E)->CallIntMethod(_E, cb.object, cb.method, tick, NULL);
if ((*_E)->ExceptionCheck(_E)) {
- return APR_FROM_OS_ERROR(EINTR);
+ rc = EINTR;
+ goto cleanup;
}
if (timeout > 0) {
timeout_value = timeout * 1000L;
@@ -490,5 +494,6 @@
CALL_METHOD1(0000, thiz, lpStatus->dwCurrentState);
cleanup:
+ SIGHT_NO_DREF(no);
return APR_FROM_OS_ERROR(rc);
}
Modified: trunk/sight/native/share/dir.c
===================================================================
--- trunk/sight/native/share/dir.c 2007-09-28 08:26:55 UTC (rev 1055)
+++ trunk/sight/native/share/dir.c 2007-09-28 09:03:39 UTC (rev 1056)
@@ -279,10 +279,12 @@
}
else
d = (apr_dir_t *)no->native;
+ SIGHT_NO_IREF(no);
if (recursive)
len = calc_size_r((apr_dir_t *)no->native, J2S(path), no->pool);
else
len = calc_size_d((apr_dir_t *)no->native);
+ SIGHT_NO_DREF(no);
cleanup:
SIGHT_FREE_CSTRING(path);
SIGHT_GLOBAL_CLEANUP();
Show replies by date