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

AvahiRecord* avahi_record_new ( AvahiKey k,
uint32_t  ttl 
)

Create a new record object. Record data should be filled in right after creation. The reference counter is set to 1.

Definition at line 96 of file rr.c.

References AVAHI_DEFAULT_TTL, AvahiRecord::data, AvahiRecord::key, AvahiRecord::ref, and AvahiRecord::ttl.

                                                         {
    AvahiRecord *r;

    assert(k);

    if (!(r = avahi_new(AvahiRecord, 1))) {
        avahi_log_error("avahi_new() failed.");
        return NULL;
    }

    r->ref = 1;
    r->key = avahi_key_ref(k);

    memset(&r->data, 0, sizeof(r->data));

    r->ttl = ttl != (uint32_t) -1 ? ttl : AVAHI_DEFAULT_TTL;

    return r;
}


Generated by  Doxygen 1.6.0   Back to index