This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Functions | |
int | ast_get_srv (struct ast_channel *chan, char *host, int hostlen, int *port, const char *service) |
Definition in file srv.h.
|
Definition at line 114 of file srv.c. References ast_autoservice_start(), ast_autoservice_stop(), ast_search_dns(), context, and srv_callback(). Referenced by ast_get_ip_or_srv(), and create_addr(). 00115 { 00116 struct srv_context context; 00117 int ret; 00118 00119 context.host = host; 00120 context.hostlen = hostlen; 00121 context.port = port; 00122 00123 if (chan && ast_autoservice_start(chan) < 0) 00124 return -1; 00125 00126 ret = ast_search_dns(&context, service, C_IN, T_SRV, srv_callback); 00127 00128 if (chan) 00129 ret |= ast_autoservice_stop(chan); 00130 00131 if (ret <= 0) { 00132 host[0] = '\0'; 00133 *port = -1; 00134 return ret; 00135 } 00136 return ret; 00137 }
|