~ubuntu-branches/ubuntu/karmic/asterisk/karmic

« back to all changes in this revision

Viewing changes to funcs/func_callerid.c

  • Committer: Bazaar Package Importer
  • Author(s): Faidon Liambotis, Tzafrir Cohen, Faidon Liambotis
  • Date: 2007-12-06 17:20:21 UTC
  • mfrom: (1.1.19 upstream)
  • Revision ID: james.westby@ubuntu.com-20071206172021-pd0wrjirz3os7hia
Tags: 1:1.4.15~dfsg-1
* New upstream release (Closes: #452054)
  - Fix a potential corrupt of voicemail.conf on simultaneous PIN updates
    (Closes: #353227)

[ Tzafrir Cohen ]
* Add some sample/reference config files as documentation.
* Provide asterisk-bristuff for upgrading from Etch.
* Move libc-client to not be last, so debian/backports/xorcom.etch would
  still work.

[ Faidon Liambotis ]
* Really enable the libcap/ToS functionality; the previous patch didn't
  enable the functionality, even though the code and the libcap.so
  dependency were there. (Closes: #454342)
* Fix a minor issue with init script's stop target when running with
  safe_asterisk.
* Add chan_vpb, adding support for VoiceTronix OpenSwitch and OpenLine
  cards. (Closes: #396499)
* Fix debian/watch by using a pkg-voip wrapper to avoid upstream's silly
  redirections. (Closes: #449706)
* Use DEBVERSION as asterisk's version string.
* Disable the MD5 build sum that breaks all out-of-tree plugins (duh!).
* Create /usr/local/share/asterisk/sounds to put all site-specific
  non-modifiable sounds.
* Add a note about bugs.debian.org to the banner.
* Add noload for res_config_* since loading them results in errors and
  doesn't provide any functionality.
* News entries were added but we never shipped the file; ship NEWS.Debian.
* Add an entry to NEWS.Debian warning users about app_voicemail_*.so
  (Closes: #452596)
* Provide options in /etc/default/asterisk for configuring safe_asterisk.
  (Closes: #381786)

[ Tzafrir Cohen ]
* Provide a custom sounds directory under /var/lib - user-modifieble at
  runtime and hence not under /usr. (Closes: #337209)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#include "asterisk.h"
24
24
 
25
 
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 61681 $")
 
25
ASTERISK_FILE_VERSION(__FILE__, "$Revision: 90147 $")
26
26
 
27
27
#include <stdlib.h>
28
28
#include <stdio.h>
64
64
                        ast_log(LOG_ERROR, "Unknown callerid data type '%s'.\n", data);
65
65
                }
66
66
        } else {
 
67
                ast_channel_lock(chan);
 
68
 
67
69
                if (!strncasecmp("all", data, 3)) {
68
70
                        snprintf(buf, len, "\"%s\" <%s>",
69
71
                                 S_OR(chan->cid.cid_name, ""),
92
94
                } else {
93
95
                        ast_log(LOG_ERROR, "Unknown callerid data type '%s'.\n", data);
94
96
                }
 
97
 
 
98
                ast_channel_unlock(chan);
95
99
        }
96
100
 
97
101
        return 0;
117
121
        } else if (!strncasecmp("ani", data, 3)) {
118
122
                ast_set_callerid(chan, NULL, NULL, value);
119
123
        } else if (!strncasecmp("dnid", data, 4)) {
120
 
                /* do we need to lock chan here? */
 
124
                ast_channel_lock(chan);
121
125
                if (chan->cid.cid_dnid)
122
126
                        free(chan->cid.cid_dnid);
123
127
                chan->cid.cid_dnid = ast_strdup(value);
 
128
                ast_channel_unlock(chan);
124
129
        } else if (!strncasecmp("rdnis", data, 5)) {
125
 
                /* do we need to lock chan here? */
 
130
                ast_channel_lock(chan);
126
131
                if (chan->cid.cid_rdnis)
127
132
                        free(chan->cid.cid_rdnis);
128
133
                chan->cid.cid_rdnis = ast_strdup(value);
 
134
                ast_channel_unlock(chan);
129
135
        } else {
130
136
                ast_log(LOG_ERROR, "Unknown callerid data type '%s'.\n", data);
131
137
        }