Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 74039 | Differences between
and this patch

Collapse All | Expand All

(-)esound-0.2.36/esdlib.c (-2 / +3 lines)
Lines 42-47 static void dummy_signal(int signum) { Link Here
42
42
43
/* from esd_config.c */
43
/* from esd_config.c */
44
extern char esd_spawn_options[];
44
extern char esd_spawn_options[];
45
extern char esd_spawn_binary[];
45
extern int esd_no_spawn;
46
extern int esd_no_spawn;
46
extern int esd_spawn_wait_ms;
47
extern int esd_spawn_wait_ms;
47
void esd_config_read(void);
48
void esd_config_read(void);
Lines 766-774 int esd_open_sound( const char *host ) Link Here
766
		char *cmd;
767
		char *cmd;
767
768
768
		setsid();
769
		setsid();
769
		cmd = malloc(strlen(SERVERDIR"/esd  -spawnfd 999999") + (esd_spawn_options?strlen(esd_spawn_options):0));
770
		cmd = malloc(strlen("  -spawnfd 999999") + (esd_spawn_binary?strlen(esd_spawn_binary):strlen(SERVERDIR"/esd")) + (esd_spawn_options?strlen(esd_spawn_options):0));
770
771
771
		sprintf(cmd, "%s/esd %s -spawnfd %d", SERVERDIR, esd_spawn_options?esd_spawn_options:"", esd_pipe[1]);
772
		sprintf(cmd, "%s %s -spawnfd %d", esd_spawn_binary?esd_spawn_binary:SERVERDIR"/esd", esd_spawn_options?esd_spawn_options:"", esd_pipe[1]);
772
773
773
		execl("/bin/sh", "/bin/sh", "-c", cmd, NULL);
774
		execl("/bin/sh", "/bin/sh", "-c", cmd, NULL);
774
		perror("execl");
775
		perror("execl");
(-)esound-0.2.36/esd_config.c (+9 lines)
Lines 12-17 int esd_no_spawn=1; /* If we can't even Link Here
12
int esd_spawn_wait_ms=100; /* Time to wait trying to connect to an
12
int esd_spawn_wait_ms=100; /* Time to wait trying to connect to an
13
			      autospawned ESD, in milliseconds. */
13
			      autospawned ESD, in milliseconds. */
14
char esd_spawn_options[LINEBUF_SIZE] = "-terminate -nobeeps -as 2";
14
char esd_spawn_options[LINEBUF_SIZE] = "-terminate -nobeeps -as 2";
15
char esd_spawn_binary[LINEBUF_SIZE] = SERVERDIR"/esd";
15
16
16
char esd_default_options [LINEBUF_SIZE] = ""; /* Default options, always applied */
17
char esd_default_options [LINEBUF_SIZE] = ""; /* Default options, always applied */
17
18
Lines 62-67 esd_config_read(void) Link Here
62
  if(tmpenv && strlen(tmpenv) < (sizeof(esd_spawn_options) - 1))
63
  if(tmpenv && strlen(tmpenv) < (sizeof(esd_spawn_options) - 1))
63
    strcpy(esd_spawn_options, tmpenv);
64
    strcpy(esd_spawn_options, tmpenv);
64
65
66
  tmpenv = getenv("ESD_SPAWN_BINARY");
67
  if(tmpenv && strlen(tmpenv) < (sizeof(esd_spawn_binary) - 1))
68
    strcpy(esd_spawn_binary, tmpenv);
69
65
  tmpenv = getenv("ESD_DEFAULT_OPTIONS");
70
  tmpenv = getenv("ESD_DEFAULT_OPTIONS");
66
  if(tmpenv && strlen(tmpenv) < (sizeof(esd_default_options) - 1))
71
  if(tmpenv && strlen(tmpenv) < (sizeof(esd_default_options) - 1))
67
    strcpy(esd_default_options, tmpenv);
72
    strcpy(esd_default_options, tmpenv);
Lines 120-125 esd_config_read_file(FILE *fh) Link Here
120
	{
125
	{
121
	  strcpy(esd_spawn_options, value);
126
	  strcpy(esd_spawn_options, value);
122
	}
127
	}
128
      else if(!strcasecmp(key, "spawn_binary"))
129
	{
130
	  strcpy(esd_spawn_binary, value);
131
	}
123
      else if(!strcasecmp(key, "default_options"))
132
      else if(!strcasecmp(key, "default_options"))
124
	{
133
	{
125
	  strcpy(esd_default_options, value);
134
	  strcpy(esd_default_options, value);
(-)esound-0.2.36/esd.conf (+1 lines)
Lines 1-5 Link Here
1
[esd]
1
[esd]
2
auto_spawn=1
2
auto_spawn=1
3
# spawn_binary=esd
3
spawn_options=-terminate -nobeeps -as 2
4
spawn_options=-terminate -nobeeps -as 2
4
spawn_wait_ms=100
5
spawn_wait_ms=100
5
# default options are used in spawned and non-spawned mode
6
# default options are used in spawned and non-spawned mode

Return to bug 74039