X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fmdnsd.git;a=blobdiff_plain;f=service.c;h=049de52b511b10c71b77cbf7f7669024c2bcfd66;hp=9d3f0841a9cfca6d3ddd053efbcef19e9214680e;hb=f295a52969b5926e9fc43ec5125f7d7863b727ce;hpb=d9a8000d2e08085132a5832db0480323c509ad22 diff --git a/service.c b/service.c index 9d3f084..049de52 100644 --- a/service.c +++ b/service.c @@ -70,8 +70,8 @@ char *hostname = NULL; static char *sdudp = "_services._dns-sd._udp.local"; static char *sdtcp = "_services._dns-sd._tcp.local"; -char* -service_name(char *domain) +char * +service_name(const char *domain) { static char buffer[256]; @@ -84,7 +84,7 @@ static void service_send_ptr(struct uloop_fd *u, struct service *s) { unsigned char buffer[MAX_NAME_LEN]; - char *host = service_name(s->service); + const char *host = service_name(s->service); int len = dn_comp(host, buffer, MAX_NAME_LEN, NULL, NULL); if (len < 1) @@ -173,7 +173,7 @@ service_reply_a(struct uloop_fd *u, int type) } void -service_reply(struct uloop_fd *u, char *match) +service_reply(struct uloop_fd *u, const char *match) { struct service *s; @@ -209,7 +209,7 @@ service_reply(struct uloop_fd *u, char *match) } void -service_announce_services(struct uloop_fd *u, char *service) +service_announce_services(struct uloop_fd *u, const char *service) { struct service *s; int tcp = 1;