Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/dnsr.c

    r959d2ec rfff7ef4  
    7171{
    7272        async_exch_t *exch = dnsr_exchange_begin();
    73         char cname_buf[DNSR_NAME_MAX_SIZE + 1];
    74         ipc_call_t cnreply;
    75         size_t act_size;
    7673        dnsr_hostinfo_t *info;
    7774
     
    7976        aid_t req = async_send_0(exch, DNSR_NAME2HOST, &answer);
    8077        sysarg_t retval = async_data_write_start(exch, name, str_size(name));
    81         aid_t cnreq = async_data_read(exch, cname_buf, DNSR_NAME_MAX_SIZE,
    82             &cnreply);
    8378
    8479        dnsr_exchange_end(exch);
     
    8681        if (retval != EOK) {
    8782                async_forget(req);
    88                 async_forget(cnreq);
    8983                return retval;
    9084        }
    9185
    9286        async_wait_for(req, &retval);
    93         if (retval != EOK) {
    94                 async_forget(cnreq);
    95                 return EIO;
    96         }
    97 
    98         async_wait_for(cnreq, &retval);
    9987        if (retval != EOK)
    10088                return EIO;
     
    10492                return ENOMEM;
    10593
    106         act_size = IPC_GET_ARG2(cnreply);
    107         assert(act_size <= DNSR_NAME_MAX_SIZE);
    108         cname_buf[act_size] = '\0';
    109 
    110         info->cname = str_dup(cname_buf);
     94        info->name = str_dup(name);
    11195        info->addr.ipv4 = IPC_GET_ARG1(answer);
    11296
     
    120104                return;
    121105
    122         free(info->cname);
     106        free(info->name);
    123107        free(info);
    124108}
Note: See TracChangeset for help on using the changeset viewer.