~ubuntu-branches/ubuntu/utopic/maradns/utopic

« back to all changes in this revision

Viewing changes to update/1.2.08/maradns-1.2.07.5-askmara_rcode.patch

  • Committer: Bazaar Package Importer
  • Author(s): Kai Hendry
  • Date: 2006-06-21 22:08:54 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20060621220854-51ev9apuhyiia6f3
Tags: 1.2.10-1
* New upstream release
* Added --oknodo to stop case
* Stopping maradns: invoke-rc.d: initscript maradns, action "stop"
  failed. (Closes: #374655)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- maradns-1.2.07.5/tools/askmara.c    2006-01-21 21:22:01.000000000 -0800
 
2
+++ maradns-1.2.07.6/tools/askmara.c    2006-06-01 02:55:58.000000000 -0700
 
3
@@ -542,6 +542,30 @@
 
4
     if(read_hdr(uindata,&header) == JS_ERROR)
 
5
         harderror(L_INHEADER_CONV); /* Problem converting inheader */
 
6
 
 
7
+    /* If not 0, show them the rcode from the remote server */
 
8
+    switch(header.rcode) {
 
9
+       case 1:
 
10
+               printf("# Remote server said: FORMAT ERROR\n");
 
11
+               break;
 
12
+       case 2:
 
13
+               printf("# Remote server said: SERVER FAILURE\n");
 
14
+               break;
 
15
+       case 3:
 
16
+               printf("# Remote server said: NAME ERROR\n");
 
17
+               break;
 
18
+       case 4:
 
19
+               printf("# Remote server said: NOT IMPLEMENTED\n");
 
20
+               break;
 
21
+       case 5:
 
22
+               printf("# Remote server said: REFUSED\n");
 
23
+               break;
 
24
+       case 0:
 
25
+               break;
 
26
+       default:
 
27
+               printf("# Non-RFC1035 RCODE %d sent from remote server\n",
 
28
+                       header.rcode);
 
29
+       }
 
30
+
 
31
     /* Move past the questions */
 
32
     place = 12;
 
33
     for(counter = 0;counter < header.qdcount;counter++) {