(file) Return to socket.c CVS log (file) (dir) Up to [RizwankCVS] / wine4 / wine / dlls / winsock

Diff for /wine4/wine/dlls/winsock/socket.c between version 1.1 and 1.3

version 1.1, 2005/03/11 02:52:49 version 1.3, 2005/03/11 03:30:35
Line 104 
Line 104 
 # define HAVE_IPX # define HAVE_IPX
 #endif #endif
  
   #ifdef HAVE_POLL_H
   #include <poll.h>
   #endif
 #ifdef HAVE_SYS_POLL_H #ifdef HAVE_SYS_POLL_H
 # include <sys/poll.h> # include <sys/poll.h>
 #endif #endif
Line 206 
Line 209 
 { {
     int opentype;     int opentype;
     struct WS_hostent *he_buffer;     struct WS_hostent *he_buffer;
     struct WS_servent *se_buffer;  
     struct WS_protoent *pe_buffer;     struct WS_protoent *pe_buffer;
   
       char *se_buffer;
       struct WS_servent se;
   
     int he_len;     int he_len;
     int se_len;     int se_len;
     int pe_len;     int pe_len;
Line 402 
Line 408 
     {     {
         ptb = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ptb) );         ptb = HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ptb) );
         TlsSetValue( tls_index, ptb );         TlsSetValue( tls_index, ptb );
   
           ptb->se_len = 0;
     }     }
     return ptb;     return ptb;
 } }
Line 727 
Line 735 
     return ptb->he_buffer;     return ptb->he_buffer;
 } }
  
 static struct WS_servent *check_buffer_se(int size)  static char *check_buffer_se(int size)
 { {
     struct per_thread_data * ptb = get_per_thread_data();     struct per_thread_data * ptb = get_per_thread_data();
     if (ptb->se_buffer)      if (ptb->se_len > 0)
     {     {
         if (ptb->se_len >= size ) return ptb->se_buffer;         if (ptb->se_len >= size ) return ptb->se_buffer;
         HeapFree( GetProcessHeap(), 0, ptb->se_buffer );         HeapFree( GetProcessHeap(), 0, ptb->se_buffer );
Line 3375 
Line 3383 
 static struct WS_servent *WS_dup_se(const struct servent* p_se) static struct WS_servent *WS_dup_se(const struct servent* p_se)
 { {
     char *p;     char *p;
     struct WS_servent *p_to;      struct per_thread_data * ptb = get_per_thread_data();
  
     int size = (sizeof(*p_se) +      int size = (strlen(p_se->s_proto) + 1 +
                 strlen(p_se->s_proto) + 1 +  
                 strlen(p_se->s_name) + 1 +                 strlen(p_se->s_name) + 1 +
                 list_size(p_se->s_aliases, 0));                 list_size(p_se->s_aliases, 0));
  
     if (!(p_to = check_buffer_se(size))) return NULL;      if (!(p = check_buffer_se(size))) return NULL;
     p_to->s_port = p_se->s_port;      ptb->se.s_port = p_se->s_port;
  
     p = (char *)(p_to + 1);      ptb->se.s_name = p;
     p_to->s_name = p;  
     strcpy(p, p_se->s_name);     strcpy(p, p_se->s_name);
     p += strlen(p) + 1;     p += strlen(p) + 1;
  
     p_to->s_proto = p;      ptb->se.s_proto = p;
     strcpy(p, p_se->s_proto);     strcpy(p, p_se->s_proto);
     p += strlen(p) + 1;     p += strlen(p) + 1;
  
     p_to->s_aliases = (char **)p;      ptb->se.s_aliases = (char **)p;
     list_dup(p_se->s_aliases, p_to->s_aliases, 0);      list_dup(p_se->s_aliases, ptb->se.s_aliases, 0);
     return p_to;  
       return &ptb->se;
 } }
  
 /* ----------------------------------- error handling */ /* ----------------------------------- error handling */


Legend:
Removed from v.1.1  
changed lines
  Added in v.1.3

Rizwan Kassim
Powered by
ViewCVS 0.9.2