cvs-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cvs-cvs] Changes to ccvs/src/server.c


From: Derek Robert Price
Subject: [Cvs-cvs] Changes to ccvs/src/server.c
Date: Sun, 04 Sep 2005 19:00:08 -0400

Index: ccvs/src/server.c
diff -u ccvs/src/server.c:1.440 ccvs/src/server.c:1.441
--- ccvs/src/server.c:1.440     Sun Sep  4 22:33:52 2005
+++ ccvs/src/server.c   Sun Sep  4 23:00:04 2005
@@ -553,80 +553,6 @@
 
 
 
-/* Return true if two paths match, resolving symlinks.
- */
-static inline bool
-isSamePath (const char *path1_in, const char *path2_in)
-{
-    char *p1, *p2;
-    bool same;
-
-    if (!strcmp (path1_in, path2_in))
-       return true;
-
-    /* Path didn't match, but try to resolve any links that may be
-     * present.
-     */
-    if (!isdir (path1_in) || !isdir (path2_in))
-       /* To be resolvable, paths must exist on this server.  */
-       return false;
-
-    p1 = xcanonicalize_file_name (path1_in);
-    p2 = xcanonicalize_file_name (path2_in);
-    if (strcmp (p1, p2))
-       same = false;
-    else
-       same = true;
-
-    free (p1);
-    free (p2);
-    return same;
-}
-
-
-
-/* From GNULIB lib/canon-host.c.  */
-extern char *canon_host (char const *host);
-
-/* Return true if OTHERHOST resolves to this host in the DNS.
- *
- * GLOBALS
- *   server_hostname   The name of this host, as determined by the call to
- *                     xgethostname() in main().
- *
- * RETURNS
- *   true      If OTHERHOST equals or resolves to HOSTNAME.
- *   false     Otherwise.
- */
-static inline bool
-isThisHost (const char *otherhost)
-{
-    char *fqdno;
-    char *fqdns;
-    bool retval;
-
-    /* As an optimization, check the literal strings before looking up
-     * OTHERHOST in the DNS.
-     */
-    if (!strcasecmp (server_hostname, otherhost))
-       return true;
-
-    fqdno = canon_host (otherhost);
-    if (!fqdno)
-       error (1, 0, "Name lookup failed for `%s'", otherhost);
-    fqdns = canon_host (server_hostname);
-    if (!fqdns)
-       error (1, 0, "Name lookup failed for `%s'", server_hostname);
-
-    retval = !strcasecmp (fqdns, fqdno);
-
-    free (fqdno);
-    free (fqdns);
-    return retval;
-}
-
-
-
 /*
  * Return true if we need to relay write requests to a primary server
  * and false otherwise.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]