/[monit]/monit/socket.c
ViewVC logotype

Diff of /monit/socket.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.39 by martinp, Fri Jan 28 20:53:51 2005 UTC revision 1.40 by martinp, Sat Feb 12 23:44:07 2005 UTC
# Line 108  Socket_T socket_new(const char *host, in Line 108  Socket_T socket_new(const char *host, in
108  Socket_T socket_create(void *port) {  Socket_T socket_create(void *port) {
109    
110    int s;    int s;
   Socket_T S;  
111    Port_T p= port;    Port_T p= port;
112    
113    ASSERT(port);    ASSERT(port);
114    
115    if((s= create_generic_socket(p)) != -1) {    if((s= create_generic_socket(p)) != -1) {
116    
117        Socket_T S= NULL;
118    
119      NEW(S);      NEW(S);
120      S->socket= s;      S->socket= s;
121      S->type= p->type;      S->type= p->type;
# Line 172  Socket_T socket_create_t(const char *hos Line 173  Socket_T socket_create_t(const char *hos
173                           int timeout) {                           int timeout) {
174    
175    int s;    int s;
   Socket_T S;  
176    int proto= type==SOCKET_UDP?SOCK_DGRAM:SOCK_STREAM;    int proto= type==SOCKET_UDP?SOCK_DGRAM:SOCK_STREAM;
177        
178    ASSERT(host);    ASSERT(host);
# Line 184  Socket_T socket_create_t(const char *hos Line 184  Socket_T socket_create_t(const char *hos
184    
185    if((s= create_socket(host, port, proto, timeout)) != -1) {    if((s= create_socket(host, port, proto, timeout)) != -1) {
186            
187        Socket_T S= NULL;
188    
189      NEW(S);      NEW(S);
190      S->socket= s;      S->socket= s;
191      S->port= port;      S->port= port;

Legend:
Removed from v.1.39  
changed lines
  Added in v.1.40

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26