mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-20 23:00:56 -05:00
testpkts const fixup.
git-svn-id: file:///svn/unbound/trunk@1243 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
91972c229d
commit
370236cb65
2 changed files with 10 additions and 9 deletions
|
|
@ -2,6 +2,7 @@
|
||||||
- locking for threadsafe bogus rrset counter.
|
- locking for threadsafe bogus rrset counter.
|
||||||
- ldns trunk no longer exports b32 functions, provide compat.
|
- ldns trunk no longer exports b32 functions, provide compat.
|
||||||
- ldns tarball updated.
|
- ldns tarball updated.
|
||||||
|
- testcode/ldns-testpkts.c const fixups.
|
||||||
|
|
||||||
16 September 2008: Wouter
|
16 September 2008: Wouter
|
||||||
- extended-statistics: yesno config option.
|
- extended-statistics: yesno config option.
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ static bool isendline(char c)
|
||||||
* @param keyword: the keyword to match
|
* @param keyword: the keyword to match
|
||||||
* @return: true if keyword present. False otherwise, and str unchanged.
|
* @return: true if keyword present. False otherwise, and str unchanged.
|
||||||
*/
|
*/
|
||||||
static bool str_keyword(const char** str, const char* keyword)
|
static bool str_keyword(char** str, const char* keyword)
|
||||||
{
|
{
|
||||||
size_t len = strlen(keyword);
|
size_t len = strlen(keyword);
|
||||||
assert(str && keyword);
|
assert(str && keyword);
|
||||||
|
|
@ -92,9 +92,9 @@ entry_add_reply(struct entry* entry)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** parse MATCH line */
|
/** parse MATCH line */
|
||||||
static void matchline(const char* line, struct entry* e)
|
static void matchline(char* line, struct entry* e)
|
||||||
{
|
{
|
||||||
const char* parse = line;
|
char* parse = line;
|
||||||
while(*parse) {
|
while(*parse) {
|
||||||
if(isendline(*parse))
|
if(isendline(*parse))
|
||||||
return;
|
return;
|
||||||
|
|
@ -131,9 +131,9 @@ static void matchline(const char* line, struct entry* e)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** parse REPLY line */
|
/** parse REPLY line */
|
||||||
static void replyline(const char* line, ldns_pkt *reply)
|
static void replyline(char* line, ldns_pkt *reply)
|
||||||
{
|
{
|
||||||
const char* parse = line;
|
char* parse = line;
|
||||||
while(*parse) {
|
while(*parse) {
|
||||||
if(isendline(*parse))
|
if(isendline(*parse))
|
||||||
return;
|
return;
|
||||||
|
|
@ -196,10 +196,10 @@ static void replyline(const char* line, ldns_pkt *reply)
|
||||||
}
|
}
|
||||||
|
|
||||||
/** parse ADJUST line */
|
/** parse ADJUST line */
|
||||||
static void adjustline(const char* line, struct entry* e,
|
static void adjustline(char* line, struct entry* e,
|
||||||
struct reply_packet* pkt)
|
struct reply_packet* pkt)
|
||||||
{
|
{
|
||||||
const char* parse = line;
|
char* parse = line;
|
||||||
while(*parse) {
|
while(*parse) {
|
||||||
if(isendline(*parse))
|
if(isendline(*parse))
|
||||||
return;
|
return;
|
||||||
|
|
@ -413,7 +413,7 @@ read_entry(FILE* in, const char* name, int *lineno, uint32_t* default_ttl,
|
||||||
{
|
{
|
||||||
struct entry* current = NULL;
|
struct entry* current = NULL;
|
||||||
char line[MAX_LINE];
|
char line[MAX_LINE];
|
||||||
const char* parse;
|
char* parse;
|
||||||
ldns_pkt_section add_section = LDNS_SECTION_QUESTION;
|
ldns_pkt_section add_section = LDNS_SECTION_QUESTION;
|
||||||
struct reply_packet *cur_reply = NULL;
|
struct reply_packet *cur_reply = NULL;
|
||||||
bool reading_hex = false;
|
bool reading_hex = false;
|
||||||
|
|
@ -439,7 +439,7 @@ read_entry(FILE* in, const char* name, int *lineno, uint32_t* default_ttl,
|
||||||
cur_reply = entry_add_reply(current);
|
cur_reply = entry_add_reply(current);
|
||||||
continue;
|
continue;
|
||||||
} else if(str_keyword(&parse, "$ORIGIN")) {
|
} else if(str_keyword(&parse, "$ORIGIN")) {
|
||||||
get_origin(name, *lineno, origin, (char*)parse);
|
get_origin(name, *lineno, origin, parse);
|
||||||
continue;
|
continue;
|
||||||
} else if(str_keyword(&parse, "$TTL")) {
|
} else if(str_keyword(&parse, "$TTL")) {
|
||||||
*default_ttl = (uint32_t)atoi(parse);
|
*default_ttl = (uint32_t)atoi(parse);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue