database id txt record to store settings
This commit is contained in:
parent
2a9533fb9f
commit
57bb0851cb
|
@ -156,8 +156,8 @@ void rend_callback(void) {
|
|||
NULL, /* domain */
|
||||
NULL, /* host */
|
||||
msg.port,
|
||||
NULL, /* text record */
|
||||
0, /* text record length */
|
||||
"Database ID=beddab1edeadbea7", /* text record */
|
||||
28, /* text record length */
|
||||
rend_howl_reply,
|
||||
NULL,
|
||||
&rend_oid)) != SW_OKAY) {
|
||||
|
|
|
@ -136,6 +136,18 @@ void *rend_pipe_monitor(void* arg) {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add a text stanza to the buffer (pascal-style multistring)
|
||||
*
|
||||
* @param buffer where to put the text info
|
||||
* @param string what pascal string to append
|
||||
*/
|
||||
void rend_add_text(char *buffer, char *string) {
|
||||
char *ptr=&buffer[strlen(buffer)];
|
||||
*ptr=strlen(string);
|
||||
strcpy(ptr+1,string);
|
||||
}
|
||||
|
||||
/*
|
||||
* rend_callback
|
||||
*
|
||||
|
@ -148,7 +160,6 @@ void rend_callback(void *info) {
|
|||
dns_service_discovery_ref dns_ref=NULL;
|
||||
|
||||
/* here, we've seen the message, now we have to process it */
|
||||
|
||||
if(rend_read_message(&msg) != sizeof(msg)) {
|
||||
DPRINTF(E_FATAL,L_REND,"Error reading rendezvous message\n");
|
||||
exit(EXIT_FAILURE);
|
||||
|
@ -158,7 +169,8 @@ void rend_callback(void *info) {
|
|||
case REND_MSG_TYPE_REGISTER:
|
||||
DPRINTF(E_DBG,L_REND,"Registering %s.%s (%d)\n",msg.type,msg.name,msg.port);
|
||||
usPort=msg.port;
|
||||
dns_ref=DNSServiceRegistrationCreate(msg.name,msg.type,"",usPort,"",rend_reply,nil);
|
||||
dns_ref=DNSServiceRegistrationCreate(msg.name,msg.type,"",usPort,
|
||||
"Database ID=bedabb1edeadbea7",rend_reply,nil);
|
||||
if(rend_addtorunloop(dns_ref)) {
|
||||
DPRINTF(E_WARN,L_REND,"Add to runloop failed\n");
|
||||
rend_send_response(-1);
|
||||
|
|
|
@ -89,6 +89,9 @@
|
|||
Change History (most recent first):
|
||||
|
||||
$Log$
|
||||
Revision 1.20 2004/11/30 04:04:17 rpedde
|
||||
database id txt record to store settings
|
||||
|
||||
Revision 1.19 2004/11/13 07:14:26 rpedde
|
||||
modularize debugging statements
|
||||
|
||||
|
@ -403,7 +406,8 @@ void rend_callback(void) {
|
|||
switch(msg.cmd) {
|
||||
case REND_MSG_TYPE_REGISTER:
|
||||
DPRINTF(E_DBG,L_REND,"Registering %s.%s (%d)\n",msg.name,msg.type,msg.port);
|
||||
RegisterOneService(msg.name,msg.type,"local.",NULL,0,msg.port);
|
||||
RegisterOneService(msg.name,msg.type,"local.","Database ID=beddab1edeadbea7",28,
|
||||
msg.port);
|
||||
rend_send_response(0); /* success */
|
||||
break;
|
||||
case REND_MSG_TYPE_UNREGISTER:
|
||||
|
|
Loading…
Reference in New Issue