removed debugging code

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3337 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper 2003-05-26 12:37:05 +00:00
parent bedcc99335
commit 5b4256ce42

View File

@ -13,8 +13,6 @@
#include "DataExchange.h" #include "DataExchange.h"
#include "ServerInterface.h" // NEW_MEDIA_SERVER_SIGNATURE #include "ServerInterface.h" // NEW_MEDIA_SERVER_SIGNATURE
#define CRASH_ON_ERRROR 0
#define TIMEOUT 15000000 // 15 seconds timeout! #define TIMEOUT 15000000 // 15 seconds timeout!
namespace BPrivate { namespace BPrivate {
@ -31,12 +29,6 @@ static port_id MediaAddonServerPort;
void find_media_server_port(); void find_media_server_port();
void find_media_addon_server_port(); void find_media_addon_server_port();
#if CRASH_ON_ERRROR
#define crash_now() debugger("crash")
#else
#define crash_now() ((void)0)
#endif
class initit class initit
{ {
public: public:
@ -93,7 +85,6 @@ status_t SendToServer(BMessage *msg)
rv = MediaServerMessenger->SendMessage(msg, static_cast<BHandler *>(NULL), TIMEOUT); rv = MediaServerMessenger->SendMessage(msg, static_cast<BHandler *>(NULL), TIMEOUT);
if (rv != B_OK) { if (rv != B_OK) {
FATAL("SendToServer: SendMessage failed\n"); FATAL("SendToServer: SendMessage failed\n");
crash_now();
} }
return rv; return rv;
} }
@ -137,13 +128,11 @@ status_t SendToPort(port_id sendport, int32 msgcode, command_data *msg, int size
find_media_addon_server_port(); find_media_addon_server_port();
sendport = MediaAddonServerPort; sendport = MediaAddonServerPort;
} else { } else {
crash_now();
return rv; return rv;
} }
rv = write_port_etc(sendport, msgcode, msg, size, B_RELATIVE_TIMEOUT, TIMEOUT); rv = write_port_etc(sendport, msgcode, msg, size, B_RELATIVE_TIMEOUT, TIMEOUT);
if (rv != B_OK) { if (rv != B_OK) {
FATAL("SendToPort: retrying write_port failed, port %ld, error %#lx (%s)\n", sendport, rv, strerror(rv)); FATAL("SendToPort: retrying write_port failed, port %ld, error %#lx (%s)\n", sendport, rv, strerror(rv));
crash_now();
return rv; return rv;
} }
} }
@ -169,14 +158,12 @@ status_t QueryPort(port_id requestport, int32 msgcode, request_data *request, in
find_media_addon_server_port(); find_media_addon_server_port();
requestport = MediaAddonServerPort; requestport = MediaAddonServerPort;
} else { } else {
crash_now();
_PortPool->PutPort(request->reply_port); _PortPool->PutPort(request->reply_port);
return rv; return rv;
} }
rv = write_port_etc(requestport, msgcode, request, requestsize, B_RELATIVE_TIMEOUT, TIMEOUT); rv = write_port_etc(requestport, msgcode, request, requestsize, B_RELATIVE_TIMEOUT, TIMEOUT);
if (rv != B_OK) { if (rv != B_OK) {
FATAL("QueryPort: retrying write_port failed, port %ld, error %#lx (%s)\n", requestport, rv, strerror(rv)); FATAL("QueryPort: retrying write_port failed, port %ld, error %#lx (%s)\n", requestport, rv, strerror(rv));
crash_now();
_PortPool->PutPort(request->reply_port); _PortPool->PutPort(request->reply_port);
return rv; return rv;
} }
@ -187,7 +174,6 @@ status_t QueryPort(port_id requestport, int32 msgcode, request_data *request, in
if (rv < B_OK) { if (rv < B_OK) {
FATAL("QueryPort: read_port failed, port %ld, error %#lx (%s)\n", request->reply_port, rv, strerror(rv)); FATAL("QueryPort: read_port failed, port %ld, error %#lx (%s)\n", request->reply_port, rv, strerror(rv));
crash_now();
} }
return (rv < B_OK) ? rv : reply->result; return (rv < B_OK) ? rv : reply->result;