[Home]

Summary:ASTERISK-00291: UNIQUEID variable not set correctly
Reporter:ajvargas (ajvargas)Labels:
Date Opened:2003-09-19 20:13:28Date Closed:2011-06-07 14:10:50
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) pbx.c.diff
Description:UNIQUEID variable not stored correctly.
in pbx.c
in function pbx_substitute_variables_temp(...)
if var name was UNIQUEID
value was not copied to workspace variable also
*ret was not set to workspace.

attaching diff file

****** ADDITIONAL INFORMATION ******

--- pbx.c       2003-09-19 18:11:41.000000000 +0000
+++ pbx.c.old   2003-09-19 18:12:23.000000000 +0000
@@ -860,8 +860,7 @@
                  );
         *ret = workspace;
       } else if (c && !strcmp(var, "UNIQUEID")) {
-                strncpy(workspace, c->uniqueid, workspacelen -1);
-                *ret = workspace;
+         snprintf(workspace, workspacelen -1, "%s", c->uniqueid);
       } else {
               if (c) {
                       AST_LIST_TRAVERSE(headp,variables,entries) {
Comments:By: James Golovich (jamesgolovich) 2003-10-30 19:28:07.000-0600

This was fixed on 9/19.  Here is the cvs log of it:

2003-09-19 20:34  martinp

* pbx.c (1.54): Fix getting ${UNIQUEID} value