~ubuntu-branches/ubuntu/quantal/maradns/quantal

« back to all changes in this revision

Viewing changes to update/2.0.03/maradns-2.0.02-debian_bug_607739_fix.patch

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2012-01-12 23:35:38 UTC
  • mto: This revision was merged to the branch mainline in revision 26.
  • Revision ID: package-import@ubuntu.com-20120112233538-5jkaqrh9nbqtf1ey
Tags: upstream-2.0.04+really1.4.09
ImportĀ upstreamĀ versionĀ 2.0.04+really1.4.09

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--- maradns-2.0.02/server/MaraBigHash.c 2011-02-05 19:21:39.000000000 -0700
2
 
+++ maradns-2.0.03/server/MaraBigHash.c 2011-02-18 15:15:04.000000000 -0700
3
 
@@ -992,12 +992,33 @@
4
 
 */
5
 
 
6
 
 int warn_ddip(js_string *query) {
7
 
-    if(log_level == 0)
8
 
+    int a = 0, l = 0;
9
 
+    if(log_level == 0 || query == 0 || query->string == 0)
10
 
         return JS_SUCCESS;
11
 
     /* "Dotted decimal IP for NS, CNAME, or MX does not work with some DNS servers" */
12
 
     printf("%s%s",L_DDIP_WARN,L_F);
13
 
-    return JS_SUCCESS;
14
 
+    printf("Hostname of record with problem: ");
15
 
+    for(a = 0 ; a < query->unit_count ; a++) {
16
 
+       l = *(query->string + a);
17
 
+        if(l < 1 || l > 64) {
18
 
+           printf("\n");
19
 
+           return JS_SUCCESS;
20
 
+       }
21
 
+       for(;l>0;l--) {
22
 
+            char c;
23
 
+           a++;
24
 
+            c = *(query->string + a);
25
 
+            if(c>' ' && c < '~') {
26
 
+                printf("%c",c);
27
 
+            } else {
28
 
+                printf("~");
29
 
+           }
30
 
+        } 
31
 
+        printf(".");
32
 
     }
33
 
+    printf("\n");
34
 
+    return JS_SUCCESS;
35
 
+}   
36
 
 
37
 
 /* Synthesize a DDIP record, just in case a MX, NS, or CNAME points to a
38
 
    dotted-decimal IP