|
|
|
@ -112,8 +112,18 @@ main(){ |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
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); |
|
|
|
|
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; |
|
|
|
|
fcgi_out: |
|
|
|
|
printf("Status: %d\n", http_code); |
|
|
|
|