Logo Search packages:      
Sourcecode: avahi version File versions  Download package

int avahi_domain_equal ( const char *  a,
const char *  b 
)

Return 1 when the specified domain names are equal, 0 otherwise

Definition at line 229 of file domain.c.

References AVAHI_LABEL_MAX.

                                                     {
    assert(a);
    assert(b);

    if (a == b)
        return 1;

    for (;;) {
        char ca[AVAHI_LABEL_MAX], cb[AVAHI_LABEL_MAX], *r;

        r = avahi_unescape_label(&a, ca, sizeof(ca));
        assert(r);
        r = avahi_unescape_label(&b, cb, sizeof(cb));
        assert(r);

        if (strcasecmp(ca, cb))
            return 0;

        if (!*a && !*b)
            return 1;
    }

    return 1;
}


Generated by  Doxygen 1.6.0   Back to index