|
|
@ -112,8 +112,18 @@ main(){ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
FCGI_FILE *d = fopen(hex, "w"); |
|
|
|
FCGI_FILE *d = fopen(hex, "w"); |
|
|
|
|
|
|
|
if (d == NULL) { |
|
|
|
|
|
|
|
fprintf(stderr, "Error openning file %s/%s for writing\n", DIR, hex); |
|
|
|
|
|
|
|
http_code = HTTP_ERROR; |
|
|
|
|
|
|
|
goto fcgi_out; |
|
|
|
|
|
|
|
} |
|
|
|
fprintf(d, "%s", ip); |
|
|
|
fprintf(d, "%s", ip); |
|
|
|
fclose(d); |
|
|
|
rc = fclose(d); |
|
|
|
|
|
|
|
if (rc != 0) { |
|
|
|
|
|
|
|
fprintf(stderr, "Error closing file %s/%s\n", DIR, hex); |
|
|
|
|
|
|
|
http_code = HTTP_ERROR; |
|
|
|
|
|
|
|
goto fcgi_out; |
|
|
|
|
|
|
|
} |
|
|
|
http_code = HTTP_OK; |
|
|
|
http_code = HTTP_OK; |
|
|
|
fcgi_out: |
|
|
|
fcgi_out: |
|
|
|
printf("Status: %d\n", http_code); |
|
|
|
printf("Status: %d\n", http_code); |
|
|
|