#include "portab.h"
-#ifdef RENDEZVOUS
+#ifdef ZEROCONF
-static char UNUSED id[] = "$Id: rendezvous.c,v 1.5 2005/03/19 18:43:49 fw Exp $";
+static char UNUSED id[] = "$Id: rendezvous.c,v 1.8 2006/05/10 21:24:01 alex Exp $";
#include "imp.h"
#include <assert.h>
#endif
} SERVICE;
-LOCAL SERVICE My_Rendezvous[MAX_RENDEZVOUS];
+static SERVICE My_Rendezvous[MAX_RENDEZVOUS];
-LOCAL void Unregister( int Idx );
+static void Unregister( int Idx );
/* -- Apple API -- */
#define MAX_MACH_MSG_SIZE 512
-LOCAL void Registration_Reply_Handler( DNSServiceRegistrationReplyErrorType ErrCode, void *Context );
+static void Registration_Reply_Handler( DNSServiceRegistrationReplyErrorType ErrCode, void *Context );
#endif /* Apple */
#ifdef HOWL
-LOCAL sw_discovery My_Discovery_Session = NULL;
-LOCAL sw_salt My_Salt;
+static sw_discovery My_Discovery_Session = NULL;
+static sw_salt My_Salt;
-LOCAL sw_result HOWL_API Registration_Reply_Handler( sw_discovery Session, sw_discovery_publish_status Status, sw_discovery_oid Id, sw_opaque Extra );
+static sw_result HOWL_API Registration_Reply_Handler( sw_discovery Session, sw_discovery_publish_status Status, sw_discovery_oid Id, sw_opaque Extra );
#endif /* Howl */
} /* Rendezvous_Exit */
-GLOBAL bool Rendezvous_Register( char *Name, char *Type, unsigned int Port )
+GLOBAL bool Rendezvous_Register( char *Name, char *Type, UINT16 Port )
{
/* Register new service */
} /* Rendezvous_Handler */
-LOCAL void Unregister( int Idx )
+static void Unregister( int Idx )
{
/* Unregister service */
#ifdef APPLE
-LOCAL void Registration_Reply_Handler( DNSServiceRegistrationReplyErrorType ErrCode, void *Context )
+static void Registration_Reply_Handler( DNSServiceRegistrationReplyErrorType ErrCode, void *Context )
{
SERVICE *s = (SERVICE *)Context;
char txt[50];
strcpy( txt, "name conflict!" );
break;
default:
- sprintf( txt, "error code %ld!", (long)ErrCode );
+ snprintf(txt, sizeof txt, "error code %ld!",
+ (long)ErrCode);
}
Log( LOG_INFO, "Can't register \"%s\" with Rendezvous: %s", s->Desc, txt );
#ifdef HOWL
-LOCAL sw_result HOWL_API Registration_Reply_Handler( sw_discovery Session, sw_discovery_publish_status Status, UNUSED sw_discovery_oid Id, sw_opaque Extra )
+static sw_result HOWL_API Registration_Reply_Handler( sw_discovery Session, sw_discovery_publish_status Status, UNUSED sw_discovery_oid Id, sw_opaque Extra )
{
SERVICE *s = (SERVICE *)Extra;
char txt[50];
strcpy( txt, "name conflict!" );
break;
default:
- sprintf( txt, "error code %ld!", (long)Status );
+ snprintf(txt, sizeof txt, "error code %ld!",
+ (long)Status);
}
Log( LOG_INFO, "Can't register \"%s\" with Rendezvous: %s", s->Desc, txt );
#endif /* Howl */
-#endif /* RENDEZVOUS */
+#endif /* ZEROCONF */
/* -eof- */