|
From: <asf...@us...> - 2010-10-22 01:24:38
|
Revision: 51752
http://firebird.svn.sourceforge.net/firebird/?rev=51752&view=rev
Author: asfernandes
Date: 2010-10-22 01:24:31 +0000 (Fri, 22 Oct 2010)
Log Message:
-----------
Misc
Modified Paths:
--------------
firebird/trunk/builds/win32/make_boot.bat
firebird/trunk/builds/win32/make_examples.bat
firebird/trunk/builds/win32/set_build_target.bat
firebird/trunk/src/common/fb_exception.cpp
firebird/trunk/src/dsql/ExprNodes.cpp
firebird/trunk/src/jrd/cch.cpp
firebird/trunk/src/jrd/vio.cpp
firebird/trunk/src/remote/os/win32/wnet.cpp
firebird/trunk/src/remote/os/win32/xnet.cpp
firebird/trunk/src/remote/server/os/win32/property.cpp
firebird/trunk/src/remote/server/os/win32/srvr_w32.cpp
firebird/trunk/src/remote/server/os/win32/window.cpp
Modified: firebird/trunk/builds/win32/make_boot.bat
===================================================================
--- firebird/trunk/builds/win32/make_boot.bat 2010-10-21 14:25:26 UTC (rev 51751)
+++ firebird/trunk/builds/win32/make_boot.bat 2010-10-22 01:24:31 UTC (rev 51752)
@@ -218,4 +218,3 @@
@goto :EOF
:END
-
Modified: firebird/trunk/builds/win32/make_examples.bat
===================================================================
--- firebird/trunk/builds/win32/make_examples.bat 2010-10-21 14:25:26 UTC (rev 51751)
+++ firebird/trunk/builds/win32/make_examples.bat 2010-10-22 01:24:31 UTC (rev 51752)
@@ -172,4 +172,3 @@
::------------
@goto :EOF
-
Modified: firebird/trunk/builds/win32/set_build_target.bat
===================================================================
--- firebird/trunk/builds/win32/set_build_target.bat 2010-10-21 14:25:26 UTC (rev 51751)
+++ firebird/trunk/builds/win32/set_build_target.bat 2010-10-22 01:24:31 UTC (rev 51752)
@@ -16,4 +16,3 @@
@echo Executed %0
@echo.
-
Modified: firebird/trunk/src/common/fb_exception.cpp
===================================================================
--- firebird/trunk/src/common/fb_exception.cpp 2010-10-21 14:25:26 UTC (rev 51751)
+++ firebird/trunk/src/common/fb_exception.cpp 2010-10-22 01:24:31 UTC (rev 51752)
@@ -203,7 +203,7 @@
{
memcpy(perm, ex.value(), sizeof(ISC_STATUS_ARRAY));
}
- catch (const BadAlloc& /*ex*/)
+ catch (const BadAlloc&)
{
*perm++ = isc_arg_gds;
*perm++ = isc_virmemexh;
Modified: firebird/trunk/src/dsql/ExprNodes.cpp
===================================================================
--- firebird/trunk/src/dsql/ExprNodes.cpp 2010-10-21 14:25:26 UTC (rev 51751)
+++ firebird/trunk/src/dsql/ExprNodes.cpp 2010-10-22 01:24:31 UTC (rev 51752)
@@ -3223,7 +3223,7 @@
ValueExprNode* ExtractNode::dsqlPass(DsqlCompilerScratch* dsqlScratch)
{
// Figure out the data type of the sub parameter, and make
- // sure the requested type of information can be extracted
+ // sure the requested type of information can be extracted.
dsql_nod* sub1 = PASS1_node(dsqlScratch, dsqlArg);
MAKE_desc(dsqlScratch, &sub1->nod_desc, sub1, NULL);
@@ -3397,6 +3397,7 @@
TimeStamp::decode_time(*(GDS_TIME*) value->dsc_address,
×.tm_hour, ×.tm_min, ×.tm_sec, &fractions);
break;
+
default:
ERR_post(Arg::Gds(isc_expression_eval_err) <<
Arg::Gds(isc_invalid_extractpart_time));
@@ -3413,6 +3414,7 @@
ERR_post(Arg::Gds(isc_expression_eval_err) <<
Arg::Gds(isc_invalid_extractpart_date));
break;
+
default:
TimeStamp::decode_date(*(GDS_DATE*) value->dsc_address, ×);
}
@@ -3435,15 +3437,19 @@
case blr_extract_year:
part = times.tm_year + 1900;
break;
+
case blr_extract_month:
part = times.tm_mon + 1;
break;
+
case blr_extract_day:
part = times.tm_mday;
break;
+
case blr_extract_hour:
part = times.tm_hour;
break;
+
case blr_extract_minute:
part = times.tm_min;
break;
@@ -3521,9 +3527,11 @@
case blr_extract_yearday:
part = times.tm_yday;
break;
+
case blr_extract_weekday:
part = times.tm_wday;
break;
+
default:
fb_assert(false);
part = 0;
@@ -5003,17 +5011,17 @@
switch (blrSubOp)
{
case blr_strlen_bit:
+ {
+ FB_UINT64 l = (FB_UINT64) blob->blb_length * 8;
+ if (l > MAX_SINT64)
{
- FB_UINT64 l = (FB_UINT64) blob->blb_length * 8;
- if (l > MAX_SINT64)
- {
- ERR_post(Arg::Gds(isc_arith_except) <<
- Arg::Gds(isc_numeric_out_of_range));
- }
+ ERR_post(Arg::Gds(isc_arith_except) <<
+ Arg::Gds(isc_numeric_out_of_range));
+ }
- length = l;
- }
+ length = l;
break;
+ }
case blr_strlen_octet:
length = blob->blb_length;
@@ -5058,17 +5066,17 @@
switch (blrSubOp)
{
case blr_strlen_bit:
+ {
+ FB_UINT64 l = (FB_UINT64) length * 8;
+ if (l > MAX_SINT64)
{
- FB_UINT64 l = (FB_UINT64) length * 8;
- if (l > MAX_SINT64)
- {
- ERR_post(Arg::Gds(isc_arith_except) <<
- Arg::Gds(isc_numeric_out_of_range));
- }
+ ERR_post(Arg::Gds(isc_arith_except) <<
+ Arg::Gds(isc_numeric_out_of_range));
+ }
- length = l;
- }
+ length = l;
break;
+ }
case blr_strlen_octet:
break;
@@ -5302,7 +5310,7 @@
blb* newBlob = BLB_create(tdbb, tdbb->getRequest()->req_transaction, &impure->vlu_misc.vlu_bid);
blb* blob = BLB_open(tdbb, tdbb->getRequest()->req_transaction,
- reinterpret_cast<bid*>(valueDsc->dsc_address));
+ reinterpret_cast<bid*>(valueDsc->dsc_address));
HalfStaticArray<UCHAR, BUFFER_LARGE> buffer;
CharSet* charSet = INTL_charset_lookup(tdbb, valueDsc->getCharSet());
@@ -5362,8 +5370,8 @@
// they aren't accepted, so they will cause error() to be called anyway.
VaryStr<32> temp;
USHORT ttype;
- desc.dsc_length =
- MOV_get_string_ptr(valueDsc, &ttype, &desc.dsc_address, &temp, sizeof(temp));
+ desc.dsc_length = MOV_get_string_ptr(valueDsc, &ttype, &desc.dsc_address,
+ &temp, sizeof(temp));
desc.setTextType(ttype);
// CVC: Why bother? If the start is greater or equal than the length in bytes,
Modified: firebird/trunk/src/jrd/cch.cpp
===================================================================
--- firebird/trunk/src/jrd/cch.cpp 2010-10-21 14:25:26 UTC (rev 51751)
+++ firebird/trunk/src/jrd/cch.cpp 2010-10-22 01:24:31 UTC (rev 51752)
@@ -1619,15 +1619,16 @@
// writer startup in progress
bcb->bcb_flags |= BCB_writer_start;
- try
+ try
{
Thread::start(cache_writer, dbb, THREAD_high);
}
- catch (const Firebird::Exception&)
+ catch (const Exception&)
{
bcb->bcb_flags &= ~BCB_writer_start;
ERR_bugcheck_msg("cannot start cache writer thread");
}
+
{ // scope
Database::Checkout dcoHolder(dbb);
dbb->dbb_writer_init.enter();
Modified: firebird/trunk/src/jrd/vio.cpp
===================================================================
--- firebird/trunk/src/jrd/vio.cpp 2010-10-21 14:25:26 UTC (rev 51751)
+++ firebird/trunk/src/jrd/vio.cpp 2010-10-22 01:24:31 UTC (rev 51752)
@@ -2096,14 +2096,15 @@
if (!(dbb->dbb_flags & DBB_garbage_collector))
{
- try
+ try
{
Thread::start(garbage_collector, dbb, THREAD_medium);
}
- catch (const Firebird::Exception&)
+ catch (const Exception&)
{
ERR_bugcheck_msg("cannot start garbage collector thread");
}
+
{ // scope
Database::Checkout dcoHolder(dbb);
dbb->dbb_gc_init.enter();
Modified: firebird/trunk/src/remote/os/win32/wnet.cpp
===================================================================
--- firebird/trunk/src/remote/os/win32/wnet.cpp 2010-10-21 14:25:26 UTC (rev 51751)
+++ firebird/trunk/src/remote/os/win32/wnet.cpp 2010-10-22 01:24:31 UTC (rev 51752)
@@ -113,9 +113,7 @@
};
-rem_port* WNET_analyze(const Firebird::PathName& file_name,
- const TEXT* node_name,
- bool uv_flag)
+rem_port* WNET_analyze(const Firebird::PathName& file_name, const TEXT* node_name, bool uv_flag)
{
/**************************************
*
@@ -320,9 +318,7 @@
}
-rem_port* WNET_connect(const TEXT* name,
- PACKET* packet,
- USHORT flag)
+rem_port* WNET_connect(const TEXT* name, PACKET* packet, USHORT flag)
{
/**************************************
*
@@ -441,9 +437,8 @@
CloseHandle(port->port_pipe);
}
- if (wnet_shutdown) {
+ if (wnet_shutdown)
disconnect(port);
- }
}
if (wnet_shutdown)
@@ -452,6 +447,7 @@
temp << Arg::Str("WNET");
temp.raise();
}
+
return NULL;
}
Modified: firebird/trunk/src/remote/os/win32/xnet.cpp
===================================================================
--- firebird/trunk/src/remote/os/win32/xnet.cpp 2010-10-21 14:25:26 UTC (rev 51751)
+++ firebird/trunk/src/remote/os/win32/xnet.cpp 2010-10-22 01:24:31 UTC (rev 51752)
@@ -130,28 +130,32 @@
static volatile bool xnet_initialized = false;
static volatile bool xnet_shutdown = false;
-static Firebird::GlobalPtr<Firebird::Mutex> xnet_mutex;
-static Firebird::GlobalPtr<PortsCleanup> xnet_ports;
+static GlobalPtr<Mutex> xnet_mutex;
+static GlobalPtr<PortsCleanup> xnet_ports;
static ULONG xnet_next_free_map_num = 0;
static bool connect_init();
static void connect_fini();
static void release_all();
-class ExitHandler
+namespace
{
-public:
- ExitHandler(MemoryPool&) {};
-
- ~ExitHandler()
+ class ExitHandler
{
- xnet_shutdown = true;
- release_all();
- }
-};
-static Firebird::GlobalPtr<ExitHandler> xnet_exit_handler;
+ public:
+ ExitHandler(MemoryPool&) {};
+ ~ExitHandler()
+ {
+ xnet_shutdown = true;
+ release_all();
+ }
+ };
+ static GlobalPtr<ExitHandler> xnet_exit_handler;
+}
+
+
inline void make_obj_name(char* buffer, size_t size, const char* format)
{
fb_assert(strcmp(xnet_endpoint, "") != 0);
@@ -178,7 +182,7 @@
static void xnet_log_error(const char* err_msg, const Exception& ex)
{
- Firebird::string str("XNET error: ");
+ string str("XNET error: ");
str += err_msg;
iscLogException(str.c_str(), ex);
}
@@ -196,8 +200,7 @@
#define ERR_STR(str) (str)
#endif
-rem_port* XNET_analyze(const Firebird::PathName& file_name,
- bool uv_flag)
+rem_port* XNET_analyze(const PathName& file_name, bool uv_flag)
{
/**************************************
*
@@ -221,8 +224,8 @@
// Pick up some user identification information
- Firebird::string buffer;
- Firebird::ClumpletWriter user_id(Firebird::ClumpletReader::UnTagged, MAX_DPB_SIZE);
+ string buffer;
+ ClumpletWriter user_id(ClumpletReader::UnTagged, MAX_DPB_SIZE);
ISC_get_user(&buffer, 0, 0);
buffer.lower();
@@ -381,7 +384,7 @@
// Once we've decided on a protocol, concatenate the version
// string to reflect it...
- Firebird::string temp;
+ string temp;
temp.printf("%s/P%d", port->port_version->str_data,
port->port_protocol & FB_PROTOCOL_MASK);
@@ -466,14 +469,14 @@
make_obj_name(name_buffer, sizeof(name_buffer), XNET_RESPONSE_EVENT);
xnet_response_event = OpenEvent(EVENT_ALL_ACCESS, FALSE, name_buffer);
if (!xnet_response_event) {
- Firebird::system_error::raise(ERR_STR("OpenEvent"));
+ system_error::raise(ERR_STR("OpenEvent"));
}
xpm = make_xpm(current_process_id, 0);
port = get_server_port(client_pid, xpm, current_process_id, 0, 0);
}
- catch (const Firebird::Exception& ex)
+ catch (const Exception& ex)
{
xnet_log_error("Unable to initialize child process", ex);
@@ -529,36 +532,36 @@
Arg::Gds(isc_unavailable).raise();
}
- Firebird::system_error::raise(ERR_STR("OpenMutex"));
+ system_error::raise(ERR_STR("OpenMutex"));
}
make_obj_name(name_buffer, sizeof(name_buffer), XNET_CONNECT_EVENT);
xnet_connect_event = OpenEvent(EVENT_ALL_ACCESS, FALSE, name_buffer);
if (!xnet_connect_event) {
- Firebird::system_error::raise(ERR_STR("OpenEvent"));
+ system_error::raise(ERR_STR("OpenEvent"));
}
make_obj_name(name_buffer, sizeof(name_buffer), XNET_RESPONSE_EVENT);
xnet_response_event = OpenEvent(EVENT_ALL_ACCESS, FALSE, name_buffer);
if (!xnet_response_event) {
- Firebird::system_error::raise(ERR_STR("OpenEvent"));
+ system_error::raise(ERR_STR("OpenEvent"));
}
make_obj_name(name_buffer, sizeof(name_buffer), XNET_CONNECT_MAP);
xnet_connect_map_h = OpenFileMapping(FILE_MAP_WRITE, TRUE, name_buffer);
if (!xnet_connect_map_h) {
- Firebird::system_error::raise(ERR_STR("OpenFileMapping"));
+ system_error::raise(ERR_STR("OpenFileMapping"));
}
xnet_connect_map = MapViewOfFile(xnet_connect_map_h, FILE_MAP_WRITE, 0, 0,
XNET_CONNECT_RESPONZE_SIZE);
if (!xnet_connect_map) {
- Firebird::system_error::raise(ERR_STR("MapViewOfFile"));
+ system_error::raise(ERR_STR("MapViewOfFile"));
}
return true;
}
- catch (const Firebird::Exception&)
+ catch (const Exception&)
{
connect_fini();
throw;
@@ -748,7 +751,7 @@
xcc->xcc_event_send_channel_filled =
OpenEvent(EVENT_ALL_ACCESS, FALSE, name_buffer);
if (!xcc->xcc_event_send_channel_filled) {
- Firebird::system_call_failed::raise(ERR_STR("OpenEvent"));
+ system_call_failed::raise(ERR_STR("OpenEvent"));
}
make_event_name(name_buffer, sizeof(name_buffer), XNET_E_C2S_EVNT_CHAN_EMPTED,
@@ -756,7 +759,7 @@
xcc->xcc_event_send_channel_empted =
OpenEvent(EVENT_ALL_ACCESS, FALSE, name_buffer);
if (!xcc->xcc_event_send_channel_empted) {
- Firebird::system_call_failed::raise(ERR_STR("OpenEvent"));
+ system_call_failed::raise(ERR_STR("OpenEvent"));
}
make_event_name(name_buffer, sizeof(name_buffer), XNET_E_S2C_EVNT_CHAN_FILLED,
@@ -764,7 +767,7 @@
xcc->xcc_event_recv_channel_filled =
OpenEvent(EVENT_ALL_ACCESS, FALSE, name_buffer);
if (!xcc->xcc_event_recv_channel_filled) {
- Firebird::system_call_failed::raise(ERR_STR("OpenEvent"));
+ system_call_failed::raise(ERR_STR("OpenEvent"));
}
make_event_name(name_buffer, sizeof(name_buffer), XNET_E_S2C_EVNT_CHAN_EMPTED,
@@ -772,7 +775,7 @@
xcc->xcc_event_recv_channel_empted =
OpenEvent(EVENT_ALL_ACCESS, FALSE, name_buffer);
if (!xcc->xcc_event_recv_channel_empted) {
- Firebird::system_call_failed::raise(ERR_STR("OpenEvent"));
+ system_call_failed::raise(ERR_STR("OpenEvent"));
}
// send and receive events channels
@@ -797,7 +800,7 @@
return new_port;
}
- catch (const Firebird::Exception&)
+ catch (const Exception&)
{
xnet_log_error("aux_connect() failed");
@@ -871,7 +874,7 @@
if (!xcc->xcc_event_recv_channel_filled ||
(xcc->xcc_event_recv_channel_filled && ERRNO == ERROR_ALREADY_EXISTS))
{
- Firebird::system_call_failed::raise(ERR_STR("CreateEvent"));
+ system_call_failed::raise(ERR_STR("CreateEvent"));
}
make_event_name(name_buffer, sizeof(name_buffer), XNET_E_C2S_EVNT_CHAN_EMPTED,
@@ -881,7 +884,7 @@
if (!xcc->xcc_event_recv_channel_empted ||
(xcc->xcc_event_recv_channel_empted && ERRNO == ERROR_ALREADY_EXISTS))
{
- Firebird::system_call_failed::raise(ERR_STR("CreateEvent"));
+ system_call_failed::raise(ERR_STR("CreateEvent"));
}
make_event_name(name_buffer, sizeof(name_buffer), XNET_E_S2C_EVNT_CHAN_FILLED,
@@ -891,7 +894,7 @@
if (!xcc->xcc_event_send_channel_filled ||
(xcc->xcc_event_send_channel_filled && ERRNO == ERROR_ALREADY_EXISTS))
{
- Firebird::system_call_failed::raise(ERR_STR("CreateEvent"));
+ system_call_failed::raise(ERR_STR("CreateEvent"));
}
make_event_name(name_buffer, sizeof(name_buffer), XNET_E_S2C_EVNT_CHAN_EMPTED,
@@ -901,7 +904,7 @@
if (!xcc->xcc_event_send_channel_empted ||
(xcc->xcc_event_send_channel_empted && ERRNO == ERROR_ALREADY_EXISTS))
{
- Firebird::system_call_failed::raise(ERR_STR("CreateEvent"));
+ system_call_failed::raise(ERR_STR("CreateEvent"));
}
// send and receive events channels
@@ -930,7 +933,7 @@
return new_port;
}
- catch (const Firebird::Exception&)
+ catch (const Exception&)
{
xnet_log_error("aux_request() failed");
@@ -1002,7 +1005,7 @@
static void cleanup_mapping(XPM xpm)
{
- Firebird::MutexLockGuard guard(xnet_mutex);
+ MutexLockGuard guard(xnet_mutex);
// if this was the last area for this map, unmap it
xpm->xpm_count--;
@@ -1054,9 +1057,9 @@
static void raise_lostconn_or_syserror(const char* msg)
{
if (ERRNO == ERROR_FILE_NOT_FOUND)
- Firebird::status_exception::raise(Arg::Gds(isc_conn_lost));
+ status_exception::raise(Arg::Gds(isc_conn_lost));
else
- Firebird::system_error::raise(msg);
+ system_error::raise(msg);
}
@@ -1075,7 +1078,7 @@
if (!xnet_initialized)
{
- Firebird::MutexLockGuard guard(xnet_mutex);
+ MutexLockGuard guard(xnet_mutex);
if (!xnet_initialized)
{
xnet_initialized = true;
@@ -1090,7 +1093,7 @@
XNET_RESPONSE response;
{ // xnet_mutex scope
- Firebird::MutexLockGuard guard(xnet_mutex);
+ MutexLockGuard guard(xnet_mutex);
// First, try to connect using default kernel namespace.
// This should work on Win9X, NT4 and on later OS when server is running
@@ -1125,7 +1128,7 @@
DWORD err = WaitForSingleObject(xnet_connect_mutex, timeout);
{ // xnet_mutex scope
- Firebird::MutexLockGuard guard(xnet_mutex);
+ MutexLockGuard guard(xnet_mutex);
if (err != WAIT_OBJECT_0)
{
@@ -1151,7 +1154,7 @@
err = WaitForSingleObject(xnet_response_event, timeout);
{ // xnet_mutex scope
- Firebird::MutexLockGuard guard(xnet_mutex);
+ MutexLockGuard guard(xnet_mutex);
if (err != WAIT_OBJECT_0)
{
@@ -1193,7 +1196,7 @@
try {
{ // xnet_mutex scope
- Firebird::MutexLockGuard guard(xnet_mutex);
+ MutexLockGuard guard(xnet_mutex);
// see if area is already mapped for this client
@@ -1221,7 +1224,7 @@
mapped_address = MapViewOfFile(file_handle, FILE_MAP_WRITE, 0L, 0L,
XPS_MAPPED_SIZE(global_slots_per_map, global_pages_per_slot));
if (!mapped_address) {
- Firebird::system_error::raise(ERR_STR("MapViewOfFile"));
+ system_error::raise(ERR_STR("MapViewOfFile"));
}
xpm = new struct xpm;
@@ -1256,7 +1259,7 @@
// only speak if server has correct protocol
if (xps->xps_server_protocol != XPI_SERVER_PROTOCOL_VERSION) {
- Firebird::fatal_exception::raise("Unknown XNET protocol version");
+ fatal_exception::raise("Unknown XNET protocol version");
}
xps->xps_client_protocol = XPI_CLIENT_PROTOCOL_VERSION;
@@ -1266,7 +1269,7 @@
xcc->xcc_proc_h = OpenProcess(SYNCHRONIZE, 0, xps->xps_server_proc_id);
if (!xcc->xcc_proc_h) {
- Firebird::system_error::raise(ERR_STR("OpenProcess"));
+ system_error::raise(ERR_STR("OpenProcess"));
}
make_event_name(name_buffer, sizeof(name_buffer), XNET_E_C2S_DATA_CHAN_FILLED,
@@ -1324,7 +1327,7 @@
return port;
}
- catch (const Firebird::Exception&)
+ catch (const Exception&)
{
if (xcc)
cleanup_comm(xcc);
@@ -1410,7 +1413,7 @@
return port;
}
- catch (const Firebird::Exception& ex)
+ catch (const Exception& ex)
{
xnet_log_error("Failed to allocate server port for communication", ex);
@@ -1636,7 +1639,7 @@
// mark all mapped areas connected to the process with pid == dead_proc_id
- Firebird::MutexLockGuard guard(xnet_mutex);
+ MutexLockGuard guard(xnet_mutex);
for (xpm = global_client_maps; xpm; xpm = xpm->xpm_next)
{
@@ -1694,7 +1697,7 @@
}
-static void xnet_gen_error (rem_port* port, const Firebird::Arg::StatusVector& v)
+static void xnet_gen_error (rem_port* port, const Arg::StatusVector& v)
{
/**************************************
*
@@ -2137,7 +2140,7 @@
connect_fini();
- Firebird::MutexLockGuard guard(xnet_mutex);
+ MutexLockGuard guard(xnet_mutex);
// release all map stuff left not released by broken ports
@@ -2184,15 +2187,15 @@
try
{
if (!(*map_handle) || (ERRNO == ERROR_ALREADY_EXISTS))
- Firebird::system_error::raise(ERR_STR("CreateFileMapping"));
+ system_error::raise(ERR_STR("CreateFileMapping"));
*map_address = MapViewOfFile(*map_handle, FILE_MAP_WRITE, 0, 0,
XPS_MAPPED_SIZE(global_slots_per_map, global_pages_per_slot));
if (!(*map_address))
- Firebird::system_error::raise(ERR_STR("MapViewOfFile"));
+ system_error::raise(ERR_STR("MapViewOfFile"));
}
- catch (const Firebird::Exception&)
+ catch (const Exception&)
{
if (*map_handle)
CloseHandle(*map_handle);
@@ -2233,7 +2236,7 @@
}
xpm->xpm_flags = 0;
- Firebird::MutexLockGuard guard(xnet_mutex);
+ MutexLockGuard guard(xnet_mutex);
xpm->xpm_next = global_client_maps;
global_client_maps = xpm;
@@ -2290,21 +2293,21 @@
xnet_connect_mutex = CreateMutex(ISC_get_security_desc(), FALSE, name_buffer);
if (!xnet_connect_mutex || (xnet_connect_mutex && ERRNO == ERROR_ALREADY_EXISTS))
{
- Firebird::system_error::raise(ERR_STR("CreateMutex"));
+ system_error::raise(ERR_STR("CreateMutex"));
}
make_obj_name(name_buffer, sizeof(name_buffer), XNET_CONNECT_EVENT);
xnet_connect_event = CreateEvent(ISC_get_security_desc(), FALSE, FALSE, name_buffer);
if (!xnet_connect_event || (xnet_connect_event && ERRNO == ERROR_ALREADY_EXISTS))
{
- Firebird::system_error::raise(ERR_STR("CreateEvent"));
+ system_error::raise(ERR_STR("CreateEvent"));
}
make_obj_name(name_buffer, sizeof(name_buffer), XNET_RESPONSE_EVENT);
xnet_response_event = CreateEvent(ISC_get_security_desc(), FALSE, FALSE, name_buffer);
if (!xnet_response_event || (xnet_response_event && ERRNO == ERROR_ALREADY_EXISTS))
{
- Firebird::system_error::raise(ERR_STR("CreateEvent"));
+ system_error::raise(ERR_STR("CreateEvent"));
}
make_obj_name(name_buffer, sizeof(name_buffer), XNET_CONNECT_MAP);
@@ -2316,16 +2319,16 @@
name_buffer);
if (!xnet_connect_map_h || (xnet_connect_map_h && ERRNO == ERROR_ALREADY_EXISTS))
{
- Firebird::system_error::raise(ERR_STR("CreateFileMapping"));
+ system_error::raise(ERR_STR("CreateFileMapping"));
}
xnet_connect_map = MapViewOfFile(xnet_connect_map_h, FILE_MAP_WRITE, 0L, 0L,
XNET_CONNECT_RESPONZE_SIZE);
if (!xnet_connect_map) {
- Firebird::system_error::raise(ERR_STR("MapViewOfFile"));
+ system_error::raise(ERR_STR("MapViewOfFile"));
}
}
- catch (const Firebird::Exception& ex)
+ catch (const Exception& ex)
{
xnet_log_error("XNET server initialization failed. "
"Probably another instance of server is already running.", ex);
@@ -2362,7 +2365,7 @@
XPM xpm = NULL;
ULONG free_slot = 0, free_map = 0;
- Firebird::MutexLockGuard guard(xnet_mutex);
+ MutexLockGuard guard(xnet_mutex);
// go through list of maps
@@ -2426,7 +2429,7 @@
TEXT name[MAXPATHLEN];
GetModuleFileName(NULL, name, sizeof(name));
- Firebird::string cmdLine;
+ string cmdLine;
cmdLine.printf("%s -x -h %"ULONGFORMAT, name, client_pid);
STARTUPINFO start_crud;
@@ -2500,7 +2503,7 @@
xcc->xcc_proc_h = OpenProcess(SYNCHRONIZE, 0, client_pid);
if (!xcc->xcc_proc_h) {
- Firebird::system_error::raise(ERR_STR("OpenProcess"));
+ system_error::raise(ERR_STR("OpenProcess"));
}
xcc->xcc_map_num = map_num;
@@ -2518,7 +2521,7 @@
xcc->xcc_event_recv_channel_filled =
CreateEvent(ISC_get_security_desc(), FALSE, FALSE, name_buffer);
if (!xcc->xcc_event_recv_channel_filled) {
- Firebird::system_error::raise(ERR_STR("CreateEvent"));
+ system_error::raise(ERR_STR("CreateEvent"));
}
make_event_name(name_buffer, sizeof(name_buffer), XNET_E_C2S_DATA_CHAN_EMPTED,
@@ -2526,7 +2529,7 @@
xcc->xcc_event_recv_channel_empted =
CreateEvent(ISC_get_security_desc(), FALSE, FALSE, name_buffer);
if (!xcc->xcc_event_recv_channel_empted) {
- Firebird::system_error::raise(ERR_STR("CreateEvent"));
+ system_error::raise(ERR_STR("CreateEvent"));
}
make_event_name(name_buffer, sizeof(name_buffer), XNET_E_S2C_DATA_CHAN_FILLED,
@@ -2534,7 +2537,7 @@
xcc->xcc_event_send_channel_filled =
CreateEvent(ISC_get_security_desc(), FALSE, FALSE, name_buffer);
if (!xcc->xcc_event_send_channel_filled) {
- Firebird::system_error::raise(ERR_STR("CreateEvent"));
+ system_error::raise(ERR_STR("CreateEvent"));
}
make_event_name(name_buffer, sizeof(name_buffer), XNET_E_S2C_DATA_CHAN_EMPTED,
@@ -2542,7 +2545,7 @@
xcc->xcc_event_send_channel_empted =
CreateEvent(ISC_get_security_desc(), FALSE, FALSE, name_buffer);
if (!xcc->xcc_event_send_channel_empted) {
- Firebird::system_error::raise(ERR_STR("CreateEvent"));
+ system_error::raise(ERR_STR("CreateEvent"));
}
// set up the channel structures
@@ -2586,7 +2589,7 @@
xnet_ports->registerPort(port);
}
- catch (const Firebird::Exception&)
+ catch (const Exception&)
{
if (port)
cleanup_port(port);
Modified: firebird/trunk/src/remote/server/os/win32/property.cpp
===================================================================
--- firebird/trunk/src/remote/server/os/win32/property.cpp 2010-10-21 14:25:26 UTC (rev 51751)
+++ firebird/trunk/src/remote/server/os/win32/property.cpp 2010-10-22 01:24:31 UTC (rev 51752)
@@ -269,6 +269,7 @@
ULONG num_att = 0, num_dbs = 0, num_svc = 0;
const HCURSOR hOldCursor = SetCursor(LoadCursor(NULL, IDC_WAIT));
+ //// FIXME: disabled!
//JRD_num_attachments(NULL, 0, JRD_info_none, &num_att, &num_dbs, &num_svc);
char szText[BUFFER_MEDIUM];
Modified: firebird/trunk/src/remote/server/os/win32/srvr_w32.cpp
===================================================================
--- firebird/trunk/src/remote/server/os/win32/srvr_w32.cpp 2010-10-21 14:25:26 UTC (rev 51751)
+++ firebird/trunk/src/remote/server/os/win32/srvr_w32.cpp 2010-10-22 01:24:31 UTC (rev 51752)
@@ -267,9 +267,8 @@
else if (server_flag & SRVR_xnet)
port = XNET_reconnect((ULONG) connection_handle);
- if (port) {
+ if (port)
service_connection(port);
- }
}
catch (const Firebird::Exception& ex)
{
@@ -383,7 +382,7 @@
break;
}
- try
+ try
{
Thread::start(process_connection_thread, port, THREAD_medium);
}
@@ -424,14 +423,13 @@
ISC_STATUS_ARRAY status_vector;
ex.stuff_exception(status_vector);
wnet_down = (status_vector[1] == isc_net_server_shutdown);
- if (!wnet_down) {
+
+ if (!wnet_down)
iscLogException("WNET_connect", ex);
- }
}
- if (!port && wnet_down) {
+ if (!port && wnet_down)
break;
- }
try
{
@@ -477,14 +475,13 @@
ex.stuff_exception(status_vector);
xnet_down = (status_vector[1] == isc_net_server_shutdown);
- if (!xnet_down ) {
+
+ if (!xnet_down)
iscLogException("XNET_connect", ex);
- }
}
- if (!port && xnet_down) {
+ if (!port && xnet_down)
break;
- }
try
{
Modified: firebird/trunk/src/remote/server/os/win32/window.cpp
===================================================================
--- firebird/trunk/src/remote/server/os/win32/window.cpp 2010-10-21 14:25:26 UTC (rev 51751)
+++ firebird/trunk/src/remote/server/os/win32/window.cpp 2010-10-22 01:24:31 UTC (rev 51752)
@@ -400,6 +400,7 @@
case WM_DEVICECHANGE:
pdbcv = (PDEV_BROADCAST_VOLUME) lParam;
+ //// FIXME: disabled!
//JRD_num_attachments(reinterpret_cast<UCHAR*>(&ulInUseMask),
// sizeof(ULONG), JRD_info_drivemask, &num_att, &num_dbs, &num_svc);
@@ -530,6 +531,7 @@
* the server can be shutdown.
*****************************************************************************/
ULONG usNumAtt = 0, usNumDbs = 0, usNumSvc = 0;
+ //// FIXME: disabled!
//JRD_num_attachments(NULL, 0, JRD_info_none, &usNumAtt, &usNumDbs, &usNumSvc);
if (!usNumAtt && !usNumSvc) // IF 0 CONNECTIONS, JUST SHUTDOWN
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|