#include <string.h>
#include <unistd.h>
#include <netdb.h>
+#include <acess/sys.h> // _SysDebug
enum eProcols
{
continue ;
}
+ if( proto != PROTO_HTTP ) {
+ fprintf(stderr, "TODO: Support protocols other than HTTP\n");
+ free(uri);
+ continue ;
+ }
+
rv = getaddrinfo(uri->Host, "http", NULL, &addrinfo);
if( rv != 0 ) {
fprintf(stderr, "Unable to resolve %s: %s\n", uri->Host, gai_strerror(rv));
if( state == 2 )
{
_SysDebug("RXing %i bytes to '%s'", bytes_wanted, outfile);
- int outfd = open(outfile, O_WR|O_CREAT, 0666);
+ int outfd = open(outfile, O_WRONLY|O_CREAT, 0666);
if( outfd == -1 ) {
fprintf(stderr, "Unable to open '%s' for writing\n", outfile);
}