From f70f359598af89598ccb0fd25e756abba7aa177d Mon Sep 17 00:00:00 2001 From: Emmanuel Milou <emilou@emilou-desktop.(none)> Date: Wed, 17 Jun 2009 13:50:53 -0400 Subject: [PATCH] [#1310] Install sflphoned in $(prefix)/lib/sflphone --- sflphone-client-gnome/src/actions.c | 48 ++++++++++--------- sflphone-common/src/Makefile.am | 4 +- sflphone-common/src/dbus/Makefile.am | 2 +- .../src/dbus/org.sflphone.SFLphone.service.in | 2 +- 4 files changed, 31 insertions(+), 25 deletions(-) diff --git a/sflphone-client-gnome/src/actions.c b/sflphone-client-gnome/src/actions.c index 95eb391fc0..4e632c9ca2 100644 --- a/sflphone-client-gnome/src/actions.c +++ b/sflphone-client-gnome/src/actions.c @@ -862,38 +862,42 @@ sflphone_fill_codec_list() gchar** details; gchar** pl; - for(pl=order; *order; order++) + if (codecs) { - codec_t * c = g_new0(codec_t, 1); - c->_payload = atoi(*order); - details = (gchar **)dbus_codec_details(c->_payload); - //DEBUG("Codec details: %s / %s / %s / %s",details[0],details[1],details[2],details[3]); + for(pl=order; *order; order++) + { + codec_t * c = g_new0(codec_t, 1); + c->_payload = atoi(*order); + details = (gchar **)dbus_codec_details(c->_payload); - c->name = details[0]; - c->is_active = TRUE; - c->sample_rate = atoi(details[1]); - c->_bitrate = atof(details[2]); - c->_bandwidth = atof(details[3]); - codec_list_add(c); - } + //DEBUG("Codec details: %s / %s / %s / %s",details[0],details[1],details[2],details[3]); - for(pl=codecs; *codecs; codecs++) - { - details = (gchar **)dbus_codec_details(atoi(*codecs)); - if(codec_list_get_by_payload(atoi(*codecs))!=NULL){ - // does nothing - the codec is already in the list, so is active. - } - else{ - codec_t* c = g_new0(codec_t, 1); - c->_payload = atoi(*codecs); c->name = details[0]; - c->is_active = FALSE; + c->is_active = TRUE; c->sample_rate = atoi(details[1]); c->_bitrate = atof(details[2]); c->_bandwidth = atof(details[3]); codec_list_add(c); } + + for(pl=codecs; *codecs; codecs++) + { + details = (gchar **)dbus_codec_details(atoi(*codecs)); + if(codec_list_get_by_payload(atoi(*codecs))!=NULL){ + // does nothing - the codec is already in the list, so is active. + } + else{ + codec_t* c = g_new0(codec_t, 1); + c->_payload = atoi(*codecs); + c->name = details[0]; + c->is_active = FALSE; + c->sample_rate = atoi(details[1]); + c->_bitrate = atof(details[2]); + c->_bandwidth = atof(details[3]); + codec_list_add(c); + } + } } if( codec_list_get_size() == 0) { diff --git a/sflphone-common/src/Makefile.am b/sflphone-common/src/Makefile.am index 7a4db6ab79..74cb553b3e 100644 --- a/sflphone-common/src/Makefile.am +++ b/sflphone-common/src/Makefile.am @@ -1,6 +1,8 @@ include ../globals.mak -bin_PROGRAMS = sflphoned +libexecdir=$(libdir)/sflphone +libexec_PROGRAMS = sflphoned + if USE_IAX # Use the global instead of locally built diff --git a/sflphone-common/src/dbus/Makefile.am b/sflphone-common/src/dbus/Makefile.am index b94bdbaea5..5a2745e257 100644 --- a/sflphone-common/src/dbus/Makefile.am +++ b/sflphone-common/src/dbus/Makefile.am @@ -38,7 +38,7 @@ service_DATA = $(service_in_files:.service.in=.service) # Rule to make the service file with bindir expanded $(service_DATA): $(service_in_files) Makefile - sed -e "s|bindir|$(prefix)/bin|" $<> $@ + sed -e "s|libexec|$(prefix)/lib/sflphone|" $<> $@ EXTRA_DIST = *.xml README diff --git a/sflphone-common/src/dbus/org.sflphone.SFLphone.service.in b/sflphone-common/src/dbus/org.sflphone.SFLphone.service.in index 031173b777..b319dd2201 100644 --- a/sflphone-common/src/dbus/org.sflphone.SFLphone.service.in +++ b/sflphone-common/src/dbus/org.sflphone.SFLphone.service.in @@ -1,3 +1,3 @@ [D-BUS Service] Name=org.sflphone.SFLphone -Exec=bindir/sflphoned +Exec=libexec/sflphoned -- GitLab