X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=octopi%2Flibrary%2Fsockets%2Fspocket.cpp;h=c73158aa77b89dadc3035858249a96b077266940;hb=6d9fa0f15a77c1e5b34ae85c0ff1cddf6ab74104;hp=3f469baebc21feb6e615c5b077ff53d18c7aff7d;hpb=19ab994d8ea15bf16ed2f20c651f1a1d5abd12e3;p=feisty_meow.git diff --git a/octopi/library/sockets/spocket.cpp b/octopi/library/sockets/spocket.cpp index 3f469bae..c73158aa 100644 --- a/octopi/library/sockets/spocket.cpp +++ b/octopi/library/sockets/spocket.cpp @@ -27,7 +27,8 @@ #include #include -#ifdef __UNIX__ +//hmmm: put this bag o headers into a similar thing to windoze helper. maybe just have an os_helper file that combines both? +//#ifdef __UNIX__ #include #include #include @@ -38,7 +39,7 @@ #include #include #include -#endif +//#endif using namespace basis; using namespace loggers; @@ -76,6 +77,7 @@ const int RESOLVE_INTERVAL = 300; #define CHECK_BOGUS(retval) \ if (is_bogus()) { return retval; /* this spocket is junk. */ } +/* #undef GRAB_LOCK #ifdef __WIN32__ // win32 seems to trip over selects unless we protect them. @@ -86,10 +88,13 @@ const int RESOLVE_INTERVAL = 300; #else #define GRAB_LOCK #endif +*/ + #define GRAB_LOCK -#ifdef __UNIX__ + +//#ifdef __UNIX__ SAFE_STATIC(mutex, __broken_pipe_synch, ) -#endif +//#endif spocket::spocket(const internet_address &where, sock_types type) : _type(type), @@ -338,7 +343,7 @@ outcome spocket::connect(int communication_wait) //moving to always re-resolving before a connect. otherwise we have somewhat //hard to predict behavior about when the re-resolve will happen. ) { - // we know we need to resolve if the address is NIL or if the re-resolve + // we know we need to resolve if the address is NULL_POINTER or if the re-resolve // interval has elapsed. astring full_host; byte_array ip_addr = _stack->full_resolve(_where->hostname, full_host); @@ -460,7 +465,7 @@ outcome spocket::accept(spocket * &sock, bool wait) // we don't lock in here; we should not be locking on the server socket. - sock = NIL; // reset. + sock = NULL_POINTER; // reset. if (_socket) { #ifdef DEBUG_SPOCKET