Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:p_conrad
phreebird
phreebird-types.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File phreebird-types.patch of Package phreebird
--- phreebird_suite_1.02.orig/phreebird.c 2011-04-06 15:50:51.000000000 +0200 +++ phreebird_suite_1.02/phreebird.c 2011-04-06 15:51:28.000000000 +0200 @@ -134,16 +134,16 @@ void listen_handler(int listenfd, short event, void *arg) ; void stub_handle_request(phreebird_opts *opts, char *buf, size_t len, request_cache *store_cache); void backend_handler_UDP(int fd, short event, void *arg); -void backend_handle_response(phreebird_opts *opts, char *buf, size_t len, struct sockaddr_in* cAddr); +void backend_handle_response(phreebird_opts *opts, uint8_t *buf, size_t len, struct sockaddr_in* cAddr); void send_response_pkt(ldns_pkt *response, request_cache *store_cache, phreebird_opts *opts); -void http_reply(int rcode, unsigned char *buf, int len, struct evhttp_request *req); +void http_reply(int rcode, char *buf, int len, struct evhttp_request *req); void response_fixup(ldns_pkt *response, int edns); int do_sign(ldns_rr_list *dest, ldns_rr_list *src, ldns_key_list *keylist); void do_help(); ldns_pkt *build_response(ldns_rdf *orig_q, ldns_rr *rr, ldns_key_list *keylist, bool sign); ldns_rr_list *build_nsec3_response(ldns_rdf *name, ldns_rdf *shortname, char *mask, bool do_bangbang); void pb_abort(char *str); -bool validate_name(char *str); +bool validate_name(uint8_t *str); // SECTION 4: MAIN @@ -732,12 +732,12 @@ // SECTION 7: BACKEND COMMS void backend_handler_UDP(int fd, short event, void *arg){ - unsigned char buf[2048]; + uint8_t buf[2048]; int len; // NOT size_t, as I discovered. struct sockaddr_in cAddr; phreebird_opts *opts = arg; - int l = sizeof(struct sockaddr); + socklen_t l = sizeof(struct sockaddr); len = recvfrom(fd, buf, 2048, 0, (struct sockaddr*)&cAddr, &l); if(len<0) return; @@ -747,7 +747,7 @@ } -void backend_handle_response(phreebird_opts *opts, char *buf, size_t len, struct sockaddr_in* cAddr){ +void backend_handle_response(phreebird_opts *opts, uint8_t *buf, size_t len, struct sockaddr_in* cAddr){ ldns_pkt *response = NULL; ldns_pkt *response_signed = NULL; ldns_status status; @@ -1049,7 +1049,7 @@ // XXX add caching headers matched with TTL of reply -void http_reply(int rcode, unsigned char *buf, int len, struct evhttp_request *req){ +void http_reply(int rcode, char *buf, int len, struct evhttp_request *req){ struct evbuffer *evbuf; char *ok = "OK"; char *bad = "Bad Packet"; @@ -1218,13 +1218,13 @@ BIGNUM *left, *right; ldns_status status; int llen, rlen, len; - char *lbuf, *rbuf; + unsigned char *lbuf, *rbuf; ldns_rr_list *nsec3_rr_list = NULL; char nsec_descrip[2048]; char lhash[64], rhash[64]; ldns_rr *nsec3_rr; ldns_buffer *shortname_buf = NULL; - char buf[1024]; + unsigned char buf[1024]; // 0: Get a shortname buffer shortname_buf = ldns_buffer_new(2048); @@ -1316,7 +1316,7 @@ // from RDF assembly. // [updated to restrict to a-zA-Z0-9-_, which isn't technically legal anymore (all should be UTF-8 now] -bool validate_name(char *str){ +bool validate_name(uint8_t *str){ int i=0; while(str[i]!=0){ if(i>0 && str[i]=='.' && str[i-1]=='.') { return false; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor