add support for named db

This commit is contained in:
Ron Pedde 2003-11-17 16:40:09 +00:00
parent 718a9a0af3
commit 87c324a1c2
2 changed files with 7 additions and 4 deletions

View File

@ -73,6 +73,9 @@
Change History (most recent first): Change History (most recent first):
$Log$ $Log$
Revision 1.3 2003/11/17 16:40:09 ron
add support for named db
Revision 1.2 2003/11/14 04:54:55 ron Revision 1.2 2003/11/14 04:54:55 ron
Use port 53 Use port 53
@ -511,7 +514,7 @@ static void DeregisterOurServices(void)
#pragma mark **** Main #pragma mark **** Main
int rend_init(pid_t *pid) { int rend_init(pid_t *pid,char *name, int port) {
mStatus status; mStatus status;
mDNSBool result; mDNSBool result;
@ -531,8 +534,8 @@ int rend_init(pid_t *pid) {
} }
DPRINTF(ERR_DEBUG,"Registering tcp service\n"); DPRINTF(ERR_DEBUG,"Registering tcp service\n");
RegisterOneService("mt-daapd","_http._tcp",NULL,0,3689); RegisterOneService(name,"_http._tcp",NULL,0,port);
RegisterOneService("mt-daapd","_daap._tcp",NULL,0,3689); RegisterOneService(name,"_daap._tcp",NULL,0,port);
signal(SIGINT, HandleSigInt); // SIGINT is what you get for a Ctrl-C signal(SIGINT, HandleSigInt); // SIGINT is what you get for a Ctrl-C
signal(SIGQUIT, HandleSigQuit); // SIGQUIT is what you get for a Ctrl-\ (indeed) signal(SIGQUIT, HandleSigQuit); // SIGQUIT is what you get for a Ctrl-\ (indeed)

View File

@ -6,6 +6,6 @@
#ifndef _REND_H_ #ifndef _REND_H_
#define _REND_H_ #define _REND_H_
int rend_init(pid_t *pid); int rend_init(pid_t *pid, char *name, int port);
#endif /* _REND_H_ */ #endif /* _REND_H_ */