![]() |
Home page |
Mailing list |
Docs
Asterisk developer's documentation :: Codename Pineapple
srv.h File Reference
Definition in file srv.h.
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 at line 117 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(). 00118 { 00119 struct srv_context context; 00120 int ret; 00121 00122 context.host = host; 00123 context.hostlen = hostlen; 00124 context.port = port; 00125 00126 if (chan && ast_autoservice_start(chan) < 0) 00127 return -1; 00128 00129 ret = ast_search_dns(&context, service, C_IN, T_SRV, srv_callback); 00130 00131 if (chan) 00132 ret |= ast_autoservice_stop(chan); 00133 00134 if (ret <= 0) { 00135 host[0] = '\0'; 00136 *port = -1; 00137 return ret; 00138 } 00139 return ret; 00140 }
|