Allow for with slightly longer paths

This commit is contained in:
Jeremy Lakeman 2012-11-09 13:40:55 +10:30
parent 42c501330c
commit 54e2d66934
3 changed files with 5 additions and 5 deletions

@ -115,8 +115,8 @@ int overlay_mdp_client_init()
overlay_mdp_client_socket_path_len=strlen(overlay_mdp_client_socket_path)+1;
if(debug&DEBUG_IO) DEBUGF("MDP client socket name='%s'",overlay_mdp_client_socket_path);
}
if (overlay_mdp_client_socket_path_len > 104 - 1)
FATALF("MDP socket path too long (%d > %d)", overlay_mdp_client_socket_path_len, 104 - 1);
if (overlay_mdp_client_socket_path_len > sizeof(name.sun_path) - 1)
FATALF("MDP socket path too long (%d > %d)", overlay_mdp_client_socket_path_len, sizeof(name.sun_path) - 1);
bcopy(overlay_mdp_client_socket_path,name.sun_path,
overlay_mdp_client_socket_path_len);

@ -449,8 +449,8 @@ overlay_interface_init(char *name, struct in_addr src_addr, struct in_addr netma
overlay_interface *const interface = &overlay_interfaces[overlay_interface_count];
strcpy(interface->name,name);
strncpy(interface->name, name, sizeof interface->name);
/* Pick a reasonable default MTU.
This will ultimately get tuned by the bandwidth and other properties of the interface */
interface->mtu=1200;

@ -341,7 +341,7 @@ extern int overlayMode;
typedef struct overlay_interface {
struct sched_ent alarm;
char name[80];
char name[256];
int recv_offset;
int fileP;
int bits_per_second;