[Pkg-voip-commits] r7771 - in /asterisk/branches/lenny/debian: changelog patches/bristuff/uniqueid-40-manager
paravoid at alioth.debian.org
paravoid at alioth.debian.org
Sat Nov 7 10:04:30 UTC 2009
Author: paravoid
Date: Sat Nov 7 10:04:29 2009
New Revision: 7771
URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=7771
Log:
bristuff: fix uniqueid generation when system name is not defined.
Thanks to Wolfgang Pichler. (Closes: #554820)
Modified:
asterisk/branches/lenny/debian/changelog
asterisk/branches/lenny/debian/patches/bristuff/uniqueid-40-manager
Modified: asterisk/branches/lenny/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/branches/lenny/debian/changelog?rev=7771&op=diff
==============================================================================
--- asterisk/branches/lenny/debian/changelog (original)
+++ asterisk/branches/lenny/debian/changelog Sat Nov 7 10:04:29 2009
@@ -17,9 +17,11 @@
recorded at high speed. (Closes: #535968)
* bristuff: don't priority jump to n+201 if priority jumping is disabled.
Thanks to Tim Retout. (Closes: #537055)
+ * bristuff: fix uniqueid generation when system name is not defined.
+ Thanks to Wolfgang Pichler. (Closes: #554820)
* Create the /usr/share/asterisk/agi-bin directory. (Closes: #463983)
- -- Faidon Liambotis <paravoid at debian.org> Sat, 07 Nov 2009 10:48:11 +0200
+ -- Faidon Liambotis <paravoid at debian.org> Sat, 07 Nov 2009 11:43:10 +0200
asterisk (1:1.4.21.2~dfsg-3) unstable; urgency=medium
Modified: asterisk/branches/lenny/debian/patches/bristuff/uniqueid-40-manager
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/branches/lenny/debian/patches/bristuff/uniqueid-40-manager?rev=7771&op=diff
==============================================================================
--- asterisk/branches/lenny/debian/patches/bristuff/uniqueid-40-manager (original)
+++ asterisk/branches/lenny/debian/patches/bristuff/uniqueid-40-manager Sat Nov 7 10:04:29 2009
@@ -224,17 +224,26 @@
/*! \brief Report DTMF on channel 1 */
--- a/main/channel.c
+++ b/main/channel.c
-@@ -706,6 +706,15 @@ static const struct ast_channel_tech nul
+@@ -706,6 +706,24 @@ static const struct ast_channel_tech nul
.description = "Null channel (should not see this)",
};
+/*! \brief Create a uniqueid */
+char *ast_alloc_uniqueid(void) {
-+ char *uniqueid;
-+ uniqueid = malloc(64);
-+ if (!uniqueid) return NULL;
-+ snprintf(uniqueid, 63, "%s-%d-%li.%d", ast_config_AST_SYSTEM_NAME, ast_mainpid, (long)time(NULL), ast_atomic_fetchadd_int(&uniqueint, 1));
-+ return uniqueid;
++ char *uniqueid;
++ uniqueid = malloc(64);
++ if (!uniqueid)
++ return NULL;
++
++ if (ast_strlen_zero(ast_config_AST_SYSTEM_NAME)) {
++ snprintf(uniqueid, 63, "%li.%d", (long)time(NULL),
++ ast_atomic_fetchadd_int(&uniqueint, 1));
++ } else {
++ snprintf(uniqueid, 63, "%s-%li.%d", ast_config_AST_SYSTEM_NAME,
++ (long)time(NULL), ast_atomic_fetchadd_int(&uniqueint, 1));
++ }
++
++ return uniqueid;
+}
+
/*! \brief Create a new channel structure */
More information about the Pkg-voip-commits
mailing list