[Asterisk-cvs] asterisk Makefile,1.127,1.128 file.c,1.54,1.55
markster at lists.digium.com
markster at lists.digium.com
Sun Jan 9 22:13:59 CST 2005
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv28655
Modified Files:
Makefile file.c
Log Message:
Fix voicemail symlinks (bug #3024)
Index: Makefile
===================================================================
RCS file: /usr/cvsroot/asterisk/Makefile,v
retrieving revision 1.127
retrieving revision 1.128
diff -u -d -r1.127 -r1.128
--- Makefile 29 Dec 2004 23:52:42 -0000 1.127
+++ Makefile 10 Jan 2005 04:18:17 -0000 1.128
@@ -410,15 +410,7 @@
for x in $(SUBDIRS); do $(MAKE) -C $$x install || exit 1 ; done
install -d $(DESTDIR)$(ASTHEADERDIR)
install -m 644 include/asterisk/*.h $(DESTDIR)$(ASTHEADERDIR)
- rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/vm
rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail
- if [ ! -h $(DESTDIR)$(ASTSPOOLDIR)/vm ] && [ -d $(DESTDIR)$(ASTSPOOLDIR)/vm ]; then \
- mv $(DESTDIR)$(ASTSPOOLDIR)/vm $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default; \
- else \
- mkdir -p $(DESTDIR)$(ASTSPOOLDIR)/voicemail/default; \
- rm -f $(DESTDIR)$(ASTSPOOLDIR)/vm; \
- fi
- ln -s $(ASTSPOOLDIR)/voicemail/default $(DESTDIR)$(ASTSPOOLDIR)/vm
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds
mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/keys
@@ -433,7 +425,6 @@
else \
echo "You need to do cvs update -d not just cvs update" ; \
fi
- ( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/vm . )
( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds ; ln -s $(ASTSPOOLDIR)/voicemail . )
if [ -f mpg123-0.59r/mpg123 ]; then make -C mpg123-0.59r install; fi
@echo " +---- Asterisk Installation Complete -------+"
Index: file.c
===================================================================
RCS file: /usr/cvsroot/asterisk/file.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- file.c 24 Dec 2004 01:40:07 -0000 1.54
+++ file.c 10 Jan 2005 04:18:17 -0000 1.55
@@ -282,19 +282,23 @@
{
char *fn;
int fnsize = 0;
- char tmp[AST_CONFIG_MAX_PATH]="";
- snprintf(tmp, sizeof(tmp), "%s/%s", ast_config_AST_VAR_DIR, "sounds");
- fnsize = strlen(tmp) + strlen(filename) + strlen(ext) + 10;
- fn = malloc(fnsize);
- if (fn) {
- if (filename[0] == '/')
+ if (filename[0] == '/') {
+ fnsize = strlen(filename) + strlen(ext) + 2;
+ fn = malloc(fnsize);
+ if (fn)
snprintf(fn, fnsize, "%s.%s", filename, ext);
- else
+ } else {
+ char tmp[AST_CONFIG_MAX_PATH] = "";
+
+ snprintf(tmp, sizeof(tmp), "%s/%s", ast_config_AST_VAR_DIR, "sounds");
+ fnsize = strlen(tmp) + strlen(filename) + strlen(ext) + 3;
+ fn = malloc(fnsize);
+ if (fn)
snprintf(fn, fnsize, "%s/%s.%s", tmp, filename, ext);
}
+
return fn;
-
}
static int exts_compare(const char *exts, const char *type)
More information about the svn-commits
mailing list