]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Eliminate the worst of the errors; need to fix up the main loop so that we
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 12 Apr 2012 22:51:00 +0000 (22:51 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 12 Apr 2012 22:51:00 +0000 (22:51 +0000)
issue queries as needed.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10401 7a7537e8-13f0-0310-91df-b6672ffda945

backend/dnssd.c

index c665c50028ffd81c96b3b7b9b8192bda123be53b..c097c5a348827ebfac43cf7d071fcd359e7fc7e6 100644 (file)
@@ -399,10 +399,10 @@ main(int  argc,                           /* I - Number of command-line args */
       announce = 1;
 
 #elif defined(HAVE_AVAHI)
-    avahi_got_callback = 0;
+    got_callback = 0;
 
     if ((error = avahi_simple_poll_iterate(simple_poll, 3)) != 0 &&
-        r != EINTR)
+        errno != EINTR)
     {
      /*
       * We've been told to exit the loop.  Perhaps the connection to
@@ -412,7 +412,7 @@ main(int  argc,                             /* I - Number of command-line args */
       break;
     }
 
-    if (avahi_got_callback)
+    if (got_callback)
       announce = 1;
 #endif /* HAVE_DNSSD */
 
@@ -473,7 +473,7 @@ main(int  argc,                             /* I - Number of command-line args */
        else
 #endif /* HAVE_DNSSD */
 #ifdef HAVE_AVAHI
-       if (!device->resolved)
+       if (!device->ref)
          continue;
         else
 #endif /* HAVE_AVAHI */
@@ -708,8 +708,8 @@ browse_callback(
                    "DEBUG: browse_callback: Failed to resolve service \"%s\": "
                    "%s\n", name, avahi_strerror(avahi_client_errno(client)));
          }
-       }
 #endif /* 0 */
+       }
        break;
 
     case AVAHI_BROWSER_REMOVE:
@@ -1245,7 +1245,7 @@ query_callback(
        device->make_and_model = strdup(model);
 
 #  ifdef HAVE_AVAHI
-      avahi_got_callback = 1;
+      got_callback = 1;
 #  endif /* HAVE_AVAHI */
 
       break;