Changes in uspace/srv/net/dnsrsrv/dnsrsrv.c [5d1cb8a:959d2ec] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/dnsrsrv/dnsrsrv.c
r5d1cb8a r959d2ec 89 89 char *name; 90 90 dns_host_info_t *hinfo; 91 ipc_callid_t rcallid; 92 size_t size; 93 sysarg_t retval; 94 size_t act_size; 91 95 int rc; 92 96 … … 100 104 } 101 105 106 if (!async_data_read_receive(&rcallid, &size)) { 107 async_answer_0(rcallid, EREFUSED); 108 async_answer_0(callid, EREFUSED); 109 return; 110 } 111 102 112 rc = dns_name2host(name, &hinfo); 103 113 if (rc != EOK) { 114 async_answer_0(rcallid, rc); 104 115 async_answer_0(callid, rc); 105 116 return; 106 117 } 107 118 108 async_answer_1(callid, EOK, hinfo->addr.ipv4); 119 act_size = str_size(hinfo->cname); 120 if (act_size > size) { 121 async_answer_0(rcallid, EOVERFLOW); 122 async_answer_0(callid, EOVERFLOW); 123 return; 124 } 125 126 retval = async_data_read_finalize(rcallid, hinfo->cname, act_size); 127 async_answer_1(callid, retval, hinfo->addr.ipv4); 109 128 110 129 dns_hostinfo_destroy(hinfo);
Note:
See TracChangeset
for help on using the changeset viewer.