2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-30 05:57:52 +00:00

conform to buffer API changes

This commit is contained in:
Andreas Gustafsson 2000-04-27 22:09:59 +00:00
parent 89b117b756
commit 96eb58dd46
4 changed files with 14 additions and 14 deletions

View File

@ -236,11 +236,11 @@ main(int argc, char *argv[]) {
dns_fixedname_init(&fdomain);
domain = dns_fixedname_name(&fdomain);
isc_buffer_init(&b, argv[0], strlen(argv[0]), ISC_BUFFERTYPE_TEXT);
isc_buffer_init(&b, argv[0], strlen(argv[0]));
isc_buffer_add(&b, strlen(argv[0]));
result = dns_name_fromtext(domain, &b, dns_rootname, ISC_FALSE, NULL);
check_result(result, "dns_name_fromtext()");
isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1, ISC_BUFFERTYPE_TEXT);
isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1);
result = dns_name_totext(domain, ISC_FALSE, &b);
check_result(result, "dns_name_totext()");
isc_buffer_usedregion(&b, &r);
@ -306,7 +306,7 @@ main(int argc, char *argv[]) {
data = isc_mem_get(mctx, BUFSIZE);
if (data == NULL)
check_result(ISC_R_NOMEMORY, "isc_mem_get()");
isc_buffer_init(&b, data, BUFSIZE, ISC_BUFFERTYPE_BINARY);
isc_buffer_init(&b, data, BUFSIZE);
result = dst_key_todns(key, &b);
check_result(result, "dst_key_todns()");
isc_buffer_usedregion(&b, &r);
@ -339,7 +339,7 @@ main(int argc, char *argv[]) {
data = isc_mem_get(mctx, BUFSIZE);
if (data == NULL)
check_result(ISC_R_NOMEMORY, "isc_mem_get()");
isc_buffer_init(&b, data, BUFSIZE, ISC_BUFFERTYPE_BINARY);
isc_buffer_init(&b, data, BUFSIZE);
result = dns_dnssec_sign(domain, &rdataset, keynode->key,
&starttime, &endtime, mctx, &b, rdata);
check_result(result, "dst_key_todns()");

View File

@ -219,11 +219,11 @@ main(int argc, char *argv[]) {
dns_fixedname_init(&fdomain);
domain = dns_fixedname_name(&fdomain);
isc_buffer_init(&b, argv[0], strlen(argv[0]) - 7, ISC_BUFFERTYPE_TEXT);
isc_buffer_init(&b, argv[0], strlen(argv[0]) - 7);
isc_buffer_add(&b, strlen(argv[0]) - 7);
result = dns_name_fromtext(domain, &b, dns_rootname, ISC_FALSE, NULL);
check_result(result, "dns_name_fromtext()");
isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1, ISC_BUFFERTYPE_TEXT);
isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1);
result = dns_name_totext(domain, ISC_FALSE, &b);
check_result(result, "dns_name_totext()");
isc_buffer_usedregion(&b, &r);
@ -331,7 +331,7 @@ main(int argc, char *argv[]) {
data = isc_mem_get(mctx, BUFSIZE);
if (data == NULL)
check_result(ISC_R_NOMEMORY, "isc_mem_get()");
isc_buffer_init(&b, data, BUFSIZE, ISC_BUFFERTYPE_BINARY);
isc_buffer_init(&b, data, BUFSIZE);
result = dns_dnssec_sign(domain, &rdataset, key,
&sig.timesigned, &sig.timeexpire,
mctx, &b, rdata);

View File

@ -236,11 +236,11 @@ main(int argc, char *argv[]) {
dns_fixedname_init(&fdomain);
domain = dns_fixedname_name(&fdomain);
isc_buffer_init(&b, argv[0], strlen(argv[0]), ISC_BUFFERTYPE_TEXT);
isc_buffer_init(&b, argv[0], strlen(argv[0]));
isc_buffer_add(&b, strlen(argv[0]));
result = dns_name_fromtext(domain, &b, dns_rootname, ISC_FALSE, NULL);
check_result(result, "dns_name_fromtext()");
isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1, ISC_BUFFERTYPE_TEXT);
isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1);
result = dns_name_totext(domain, ISC_FALSE, &b);
check_result(result, "dns_name_totext()");
isc_buffer_usedregion(&b, &r);
@ -306,7 +306,7 @@ main(int argc, char *argv[]) {
data = isc_mem_get(mctx, BUFSIZE);
if (data == NULL)
check_result(ISC_R_NOMEMORY, "isc_mem_get()");
isc_buffer_init(&b, data, BUFSIZE, ISC_BUFFERTYPE_BINARY);
isc_buffer_init(&b, data, BUFSIZE);
result = dst_key_todns(key, &b);
check_result(result, "dst_key_todns()");
isc_buffer_usedregion(&b, &r);
@ -339,7 +339,7 @@ main(int argc, char *argv[]) {
data = isc_mem_get(mctx, BUFSIZE);
if (data == NULL)
check_result(ISC_R_NOMEMORY, "isc_mem_get()");
isc_buffer_init(&b, data, BUFSIZE, ISC_BUFFERTYPE_BINARY);
isc_buffer_init(&b, data, BUFSIZE);
result = dns_dnssec_sign(domain, &rdataset, keynode->key,
&starttime, &endtime, mctx, &b, rdata);
check_result(result, "dst_key_todns()");

View File

@ -219,11 +219,11 @@ main(int argc, char *argv[]) {
dns_fixedname_init(&fdomain);
domain = dns_fixedname_name(&fdomain);
isc_buffer_init(&b, argv[0], strlen(argv[0]) - 7, ISC_BUFFERTYPE_TEXT);
isc_buffer_init(&b, argv[0], strlen(argv[0]) - 7);
isc_buffer_add(&b, strlen(argv[0]) - 7);
result = dns_name_fromtext(domain, &b, dns_rootname, ISC_FALSE, NULL);
check_result(result, "dns_name_fromtext()");
isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1, ISC_BUFFERTYPE_TEXT);
isc_buffer_init(&b, tdomain, sizeof(tdomain) - 1);
result = dns_name_totext(domain, ISC_FALSE, &b);
check_result(result, "dns_name_totext()");
isc_buffer_usedregion(&b, &r);
@ -331,7 +331,7 @@ main(int argc, char *argv[]) {
data = isc_mem_get(mctx, BUFSIZE);
if (data == NULL)
check_result(ISC_R_NOMEMORY, "isc_mem_get()");
isc_buffer_init(&b, data, BUFSIZE, ISC_BUFFERTYPE_BINARY);
isc_buffer_init(&b, data, BUFSIZE);
result = dns_dnssec_sign(domain, &rdataset, key,
&sig.timesigned, &sig.timeexpire,
mctx, &b, rdata);