Changeset 10225


Ignore:
Timestamp:
08/27/08 16:36:44 (5 years ago)
Author:
BrainSlayer
Message:

another try to get around the crash problem (could be stack related)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/httpd/httpd.c

    r10139 r10225  
    10371037 
    10381038  getpeername (conn_fp, (struct sockaddr *) &sa, &len); 
    1039   nvram_safe_set ("http_client_ip", inet_ntoa (sa.sin_addr)); 
     1039  char *peer = inet_ntoa (sa.sin_addr); 
     1040  char *client = malloc(strlen(peer)+1); 
     1041   
     1042  nvram_set ("http_client_ip", client); 
     1043  free(client); 
    10401044  //if(strcmp(nvram_safe_get("http_client_ip"), inet_ntoa(sa.sin_addr))) 
    10411045  //      nvram_set("http_client_ip", inet_ntoa(sa.sin_addr)); 
    10421046  m = get_mac_from_ip (inet_ntoa (sa.sin_addr)); 
    1043   nvram_safe_set ("http_client_mac", m); 
     1047  nvram_set ("http_client_mac", m); 
    10441048  //if(m){ 
    10451049  //      if(strcmp(nvram_safe_get("http_client_mac"), m)) 
Note: See TracChangeset for help on using the changeset viewer.