[Mt-daapd-cvs] SF.net SVN: mt-daapd: [1465] trunk/src
Status: Beta
Brought to you by:
andrew40
From: <rp...@us...> - 2006-12-19 05:06:49
|
Revision: 1465 http://svn.sourceforge.net/mt-daapd/?rev=1465&view=rev Author: rpedde Date: 2006-12-18 21:06:42 -0800 (Mon, 18 Dec 2006) Log Message: ----------- automatically shorten the rendezvous name if it's too long Modified Paths: -------------- trunk/src/conf.c trunk/src/ff-plugins.h Modified: trunk/src/conf.c =================================================================== --- trunk/src/conf.c 2006-12-19 01:48:27 UTC (rev 1464) +++ trunk/src/conf.c 2006-12-19 05:06:42 UTC (rev 1465) @@ -61,6 +61,8 @@ # define HOST_NAME_MAX 255 #endif +#define MAX_REND_LEN 62 + /** Globals */ //static int ecode; static LL_HANDLE conf_main=NULL; @@ -1713,5 +1715,12 @@ } + if(strlen(retval) > MAX_REND_LEN) { + retval[MAX_REND_LEN] = '\0'; + retval[MAX_REND_LEN-1] = '.'; + retval[MAX_REND_LEN-2] = '.'; + retval[MAX_REND_LEN-3] = '.'; + } + return retval; } Modified: trunk/src/ff-plugins.h =================================================================== --- trunk/src/ff-plugins.h 2006-12-19 01:48:27 UTC (rev 1464) +++ trunk/src/ff-plugins.h 2006-12-19 05:06:42 UTC (rev 1465) @@ -24,6 +24,11 @@ #include "ff-dbstruct.h" +#ifndef TRUE +#define TRUE 1 +#define FALSE 0 +#endif + /* Plugin types */ #define PLUGIN_OUTPUT 1 #define PLUGIN_SCANNER 2 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |