[asterisk-commits] branch oej/multiparking r32520 - in
/team/oej/multiparking: ./ apps/ channels...
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Tue Jun 6 01:34:09 MST 2006
Author: oej
Date: Tue Jun 6 03:34:08 2006
New Revision: 32520
URL: http://svn.digium.com/view/asterisk?rev=32520&view=rev
Log:
Reset automerge
Added:
team/oej/multiparking/apps/app_followme.c
- copied unchanged from r32499, trunk/apps/app_followme.c
team/oej/multiparking/configs/followme.conf.sample
- copied unchanged from r32499, trunk/configs/followme.conf.sample
Modified:
team/oej/multiparking/ (props changed)
team/oej/multiparking/callerid.c
team/oej/multiparking/channel.c
team/oej/multiparking/channels/chan_zap.c
team/oej/multiparking/include/asterisk/callerid.h
team/oej/multiparking/include/asterisk/stringfields.h
Propchange: team/oej/multiparking/
------------------------------------------------------------------------------
automerge = http://edvina.net/training/
Propchange: team/oej/multiparking/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Jun 6 03:34:08 2006
@@ -1,1 +1,1 @@
-/trunk:1-32444
+/trunk:1-32519
Modified: team/oej/multiparking/callerid.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/callerid.c?rev=32520&r1=32519&r2=32520&view=diff
==============================================================================
--- team/oej/multiparking/callerid.c (original)
+++ team/oej/multiparking/callerid.c Tue Jun 6 03:34:08 2006
@@ -696,7 +696,7 @@
free(cid);
}
-static int callerid_genmsg(char *msg, int size, char *number, char *name, int flags)
+static int callerid_genmsg(char *msg, int size, const char *number, const char *name, int flags)
{
time_t t;
struct tm tm;
@@ -827,7 +827,7 @@
return bytes;
}
-int callerid_generate(unsigned char *buf, char *number, char *name, int flags, int callwaiting, int codec)
+int callerid_generate(unsigned char *buf, const char *number, const char *name, int flags, int callwaiting, int codec)
{
int bytes=0;
int x, sum;
@@ -989,7 +989,7 @@
return 0;
}
-static int __ast_callerid_generate(unsigned char *buf, char *name, char *number, int callwaiting, int codec)
+static int __ast_callerid_generate(unsigned char *buf, const char *name, const char *number, int callwaiting, int codec)
{
if (ast_strlen_zero(name))
name = NULL;
@@ -998,12 +998,12 @@
return callerid_generate(buf, number, name, 0, callwaiting, codec);
}
-int ast_callerid_generate(unsigned char *buf, char *name, char *number, int codec)
+int ast_callerid_generate(unsigned char *buf, const char *name, const char *number, int codec)
{
return __ast_callerid_generate(buf, name, number, 0, codec);
}
-int ast_callerid_callwaiting_generate(unsigned char *buf, char *name, char *number, int codec)
+int ast_callerid_callwaiting_generate(unsigned char *buf, const char *name, const char *number, int codec)
{
return __ast_callerid_generate(buf, name, number, 1, codec);
}
Modified: team/oej/multiparking/channel.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/channel.c?rev=32520&r1=32519&r2=32520&view=diff
==============================================================================
--- team/oej/multiparking/channel.c (original)
+++ team/oej/multiparking/channel.c Tue Jun 6 03:34:08 2006
@@ -1502,8 +1502,10 @@
int res = 0;
ast_channel_lock(chan);
/* You can't answer an outbound call */
- if (ast_test_flag(chan, AST_FLAG_OUTGOING))
+ if (ast_test_flag(chan, AST_FLAG_OUTGOING)) {
+ ast_channel_unlock(chan);
return 0;
+ }
/* Stop if we're a zombie or need a soft hangup */
if (ast_test_flag(chan, AST_FLAG_ZOMBIE) || ast_check_hangup(chan)) {
ast_channel_unlock(chan);
Modified: team/oej/multiparking/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/channels/chan_zap.c?rev=32520&r1=32519&r2=32520&view=diff
==============================================================================
--- team/oej/multiparking/channels/chan_zap.c (original)
+++ team/oej/multiparking/channels/chan_zap.c Tue Jun 6 03:34:08 2006
@@ -619,26 +619,32 @@
struct zt_distRings drings;
- char context[AST_MAX_CONTEXT];
- char defcontext[AST_MAX_CONTEXT];
- char exten[AST_MAX_EXTENSION];
- char language[MAX_LANGUAGE];
- char musicclass[MAX_MUSICCLASS];
- char parkinglot[AST_MAX_EXTENSION]; /*!< Parking lot for this channel */
+ AST_DECLARE_STRING_FIELDS(
+ AST_STRING_FIELD(language);
+ AST_STRING_FIELD(musicclass);
+ AST_STRING_FIELD(accountcode);
+ AST_STRING_FIELD(mailbox);
+ AST_STRING_FIELD(call_forward);
+ AST_STRING_FIELD(cid_num);
+ AST_STRING_FIELD(cid_name);
+ AST_STRING_FIELD(lastcid_num);
+ AST_STRING_FIELD(lastcid_name);
+ AST_STRING_FIELD(dnid);
+ AST_STRING_FIELD(callwait_num);
+ AST_STRING_FIELD(callwait_name);
+ AST_STRING_FIELD(finaldial);
+ AST_STRING_FIELD(context);
+ AST_STRING_FIELD(defcontext);
+ AST_STRING_FIELD(exten);
+ AST_STRING_FIELD(parkinglot); /*!< Parking lot for this channel */
#ifdef PRI_ANI
- char cid_ani[AST_MAX_EXTENSION];
-#endif
- char cid_num[AST_MAX_EXTENSION];
+ AST_STRING_FIELD(cid_ani);
+#endif
+ );
int cid_ton; /*!< Type Of Number (TON) */
- char cid_name[AST_MAX_EXTENSION];
- char lastcid_num[AST_MAX_EXTENSION];
- char lastcid_name[AST_MAX_EXTENSION];
char *origcid_num; /*!< malloced original callerid */
char *origcid_name; /*!< malloced original callerid */
- char callwait_num[AST_MAX_EXTENSION];
- char callwait_name[AST_MAX_EXTENSION];
char rdnis[AST_MAX_EXTENSION];
- char dnid[AST_MAX_EXTENSION];
unsigned int group;
int law;
int confno; /*!< Our conference */
@@ -674,12 +680,8 @@
int cref; /*!< Call reference number */
ZT_DIAL_OPERATION dop;
int whichwink; /*!< SIG_FEATDMF_TA Which wink are we on? */
- char finaldial[64];
- char accountcode[AST_MAX_ACCOUNT_CODE]; /*!< Account code */
int amaflags; /*!< AMA Flags */
struct tdd_state *tdd; /*!< TDD flag */
- char call_forward[AST_MAX_EXTENSION];
- char mailbox[AST_MAX_EXTENSION];
char dialdest[256];
int onhooktime;
int msgstate;
@@ -1825,13 +1827,13 @@
/* Call waiting call */
p->callwaitrings = 0;
if (ast->cid.cid_num)
- ast_copy_string(p->callwait_num, ast->cid.cid_num, sizeof(p->callwait_num));
+ ast_string_field_set(p, callwait_num, ast->cid.cid_num);
else
- p->callwait_num[0] = '\0';
+ ast_string_field_set(p, callwait_num, "");
if (ast->cid.cid_name)
- ast_copy_string(p->callwait_name, ast->cid.cid_name, sizeof(p->callwait_name));
+ ast_string_field_set(p, callwait_name, ast->cid.cid_name);
else
- p->callwait_name[0] = '\0';
+ ast_string_field_set(p, callwait_name, "");
/* Call waiting tone instead */
if (zt_callwait(ast)) {
ast_mutex_unlock(&p->lock);
@@ -1845,13 +1847,13 @@
n = ast->cid.cid_name;
l = ast->cid.cid_num;
if (l)
- ast_copy_string(p->lastcid_num, l, sizeof(p->lastcid_num));
+ ast_string_field_set(p, lastcid_num, l);
else
- p->lastcid_num[0] = '\0';
+ ast_string_field_set(p, lastcid_num, "");
if (n)
- ast_copy_string(p->lastcid_name, n, sizeof(p->lastcid_name));
+ ast_string_field_set(p, lastcid_name, n);
else
- p->lastcid_name[0] = '\0';
+ ast_string_field_set(p, lastcid_name, "");
ast_setstate(ast, AST_STATE_RINGING);
index = zt_get_index(ast, p, 0);
if (index > -1) {
@@ -1939,7 +1941,7 @@
return -1;
}
snprintf(p->dop.dialstr, sizeof(p->dop.dialstr), "M*%s%s#", ozz, cic);
- snprintf(p->finaldial, sizeof(p->finaldial), "M*%s#", c);
+ ast_string_field_build(p, finaldial, "M*%s#", c);
p->whichwink = 0;
}
break;
@@ -2154,6 +2156,7 @@
ASTOBJ_UNREF(p->smdi_iface, ast_smdi_interface_destroy);
#endif
ast_mutex_destroy(&p->lock);
+ ast_string_field_free_all(p);
free(p);
*pvt = NULL;
}
@@ -2372,19 +2375,19 @@
zt_confmute(p, 0);
restore_gains(p);
if (p->origcid_num) {
- ast_copy_string(p->cid_num, p->origcid_num, sizeof(p->cid_num));
+ ast_string_field_set(p, cid_num, p->origcid_num);
free(p->origcid_num);
p->origcid_num = NULL;
- }
+ }
if (p->origcid_name) {
- ast_copy_string(p->cid_name, p->origcid_name, sizeof(p->cid_name));
+ ast_string_field_set(p, cid_name, p->origcid_name);
free(p->origcid_name);
p->origcid_name = NULL;
}
if (p->dsp)
ast_dsp_digitmode(p->dsp,DSP_DIGITMODE_DTMF | p->dtmfrelax);
- if (p->exten)
- p->exten[0] = '\0';
+ if (!ast_strlen_zero(p->exten))
+ ast_string_field_set(p, exten, "");
ast_log(LOG_DEBUG, "Hangup: channel: %d index = %d, normal = %d, callwait = %d, thirdcall = %d\n",
p->channel, index, p->subs[SUB_REAL].zfd, p->subs[SUB_CALLWAIT].zfd, p->subs[SUB_THREEWAY].zfd);
@@ -4098,8 +4101,8 @@
p->origcid_num = ast_strdup(p->cid_num);
if (!p->origcid_name)
p->origcid_name = ast_strdup(p->cid_name);
- ast_copy_string(p->cid_num, cid_num, sizeof(p->cid_num));
- ast_copy_string(p->cid_name, cid_name, sizeof(p->cid_name));
+ ast_string_field_set(p, cid_num, cid_num);
+ ast_string_field_set(p, cid_name, cid_name);
}
/* Swap things around between the three-way and real call */
swap_subs(p, SUB_THREEWAY, SUB_REAL);
@@ -5347,7 +5350,7 @@
ast_log(LOG_DEBUG, "No such possible extension '%s' in context '%s'\n", exten, chan->context);
chan->hangupcause = AST_CAUSE_UNALLOCATED;
ast_hangup(chan);
- p->exten[0] = '\0';
+ ast_string_field_set(p, exten, "");
/* Since we send release complete here, we won't get one */
p->call = NULL;
}
@@ -5661,7 +5664,7 @@
if (!res || !ast_matchmore_extension(chan, chan->context, exten, 1, p->cid_num)) {
if (getforward) {
/* Record this as the forwarding extension */
- ast_copy_string(p->call_forward, exten, sizeof(p->call_forward));
+ ast_string_field_set(p, call_forward, exten);
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Setting call forward to '%s' on channel %d\n", p->call_forward, p->channel);
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_DIALRECALL);
@@ -5810,7 +5813,7 @@
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Cancelling call forwarding on channel %d\n", p->channel);
res = tone_zone_play_tone(p->subs[index].zfd, ZT_TONE_DIALRECALL);
- memset(p->call_forward, 0, sizeof(p->call_forward));
+ ast_string_field_set(p, call_forward, "");
getforward = 0;
memset(exten, 0, sizeof(exten));
len = 0;
@@ -6113,9 +6116,9 @@
counter = 0;
counter1 = 0;
/* Check to see if context is what it should be, if not set to be. */
- if (strcmp(p->context,p->defcontext) != 0) {
- ast_copy_string(p->context, p->defcontext, sizeof(p->context));
- ast_copy_string(chan->context,p->defcontext,sizeof(chan->context));
+ if (!strcmp(p->context, p->defcontext)) {
+ ast_string_field_set(p, context, p->defcontext);
+ ast_copy_string(chan->context, p->defcontext, sizeof(chan->context));
}
for (;;) {
@@ -6173,10 +6176,10 @@
}
if (distMatches == 3) {
/* The ring matches, set the context to whatever is for distinctive ring.. */
- ast_copy_string(p->context, p->drings.ringContext[counter].contextData, sizeof(p->context));
+ ast_string_field_set(p, context, p->drings.ringContext[counter].contextData);
ast_copy_string(chan->context, p->drings.ringContext[counter].contextData, sizeof(chan->context));
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "Distinctive Ring matched context %s\n",p->context);
+ ast_verbose( VERBOSE_PREFIX_3 "Distinctive Ring matched context %s\n", p->context);
break;
}
}
@@ -6215,9 +6218,9 @@
counter = 0;
counter1 = 0;
/* Check to see if context is what it should be, if not set to be. */
- if (strcmp(p->context,p->defcontext) != 0) {
- ast_copy_string(p->context, p->defcontext, sizeof(p->context));
- ast_copy_string(chan->context,p->defcontext,sizeof(chan->context));
+ if (!strcmp(p->context, p->defcontext)) {
+ ast_string_field_set(p, context, p->defcontext);
+ ast_copy_string(chan->context, p->defcontext, sizeof(chan->context));
}
/* Take out of linear mode for Caller*ID processing */
@@ -6346,10 +6349,10 @@
}
if (distMatches == 3) {
/* The ring matches, set the context to whatever is for distinctive ring.. */
- ast_copy_string(p->context, p->drings.ringContext[counter].contextData, sizeof(p->context));
+ ast_string_field_set(p, context, p->drings.ringContext[counter].contextData);
ast_copy_string(chan->context, p->drings.ringContext[counter].contextData, sizeof(chan->context));
if (option_verbose > 2)
- ast_verbose( VERBOSE_PREFIX_3 "Distinctive Ring matched context %s\n",p->context);
+ ast_verbose(VERBOSE_PREFIX_3 "Distinctive Ring matched context %s\n", p->context);
break;
}
}
@@ -7005,6 +7008,10 @@
if (!here && !reloading) {
if (!(tmp = ast_calloc(1, sizeof(*tmp)))) {
+ destroy_zt_pvt(&tmp);
+ return NULL;
+ }
+ if (ast_string_field_init(tmp, 256)) {
destroy_zt_pvt(&tmp);
return NULL;
}
@@ -7312,7 +7319,7 @@
}
#endif
- ast_copy_string(tmp->accountcode, accountcode, sizeof(tmp->accountcode));
+ ast_string_field_set(tmp, accountcode, accountcode);
tmp->amaflags = amaflags;
if (!here) {
tmp->confno = -1;
@@ -7320,15 +7327,15 @@
}
tmp->canpark = canpark;
tmp->transfer = transfer;
- ast_copy_string(tmp->defcontext, context,sizeof(tmp->defcontext));
- ast_copy_string(tmp->language, language, sizeof(tmp->language));
- ast_copy_string(tmp->musicclass, musicclass, sizeof(tmp->musicclass));
- ast_copy_string(tmp->parkinglot, parkinglot, sizeof(tmp->parkinglot));
- ast_copy_string(tmp->context, context, sizeof(tmp->context));
- ast_copy_string(tmp->cid_num, cid_num, sizeof(tmp->cid_num));
+ ast_string_field_set(tmp, defcontext, context);
+ ast_string_field_set(tmp, language, language);
+ ast_string_field_set(tmp, musicclass, musicclass);
+ ast_string_field_set(tmp, context, context);
+ ast_string_field_set(tmp, cid_num, cid_num);
+ ast_string_field_set((tmp->parkinglot, parkinglot, sizeof(tmp->parkinglot));
tmp->cid_ton = 0;
- ast_copy_string(tmp->cid_name, cid_name, sizeof(tmp->cid_name));
- ast_copy_string(tmp->mailbox, mailbox, sizeof(tmp->mailbox));
+ ast_string_field_set(tmp, cid_name, cid_name);
+ ast_string_field_set(tmp, mailbox, mailbox);
tmp->msgstate = -1;
tmp->group = cur_group;
tmp->callgroup=cur_callergroup;
@@ -8570,22 +8577,22 @@
apply_plan_to_number(plancallingnum, sizeof(plancallingnum), pri, e->ring.callingnum, e->ring.callingplan);
if (pri->pvts[chanpos]->use_callerid) {
ast_shrink_phone_number(plancallingnum);
- ast_copy_string(pri->pvts[chanpos]->cid_num, plancallingnum, sizeof(pri->pvts[chanpos]->cid_num));
+ ast_string_field_set(pri->pvts[chanpos], cid_num, plancallingnum);
#ifdef PRI_ANI
if (!ast_strlen_zero(e->ring.callingani)) {
apply_plan_to_number(plancallingani, sizeof(plancallingani), pri, e->ring.callingani, e->ring.callingplanani);
ast_shrink_phone_number(plancallingani);
- ast_copy_string(pri->pvts[chanpos]->cid_ani, plancallingani, sizeof(pri->pvts[chanpos]->cid_ani));
+ ast_string_field_set(pri->pvts[chanpos], cid_ani, plancallingani);
} else {
- pri->pvts[chanpos]->cid_ani[0] = '\0';
+ ast_string_field_set(pri->pvts[chanpos], cid_ani, "");
}
#endif
- ast_copy_string(pri->pvts[chanpos]->cid_name, e->ring.callingname, sizeof(pri->pvts[chanpos]->cid_name));
+ ast_string_field_set(pri->pvts[chanpos], cid_name, e->ring.callingname);
pri->pvts[chanpos]->cid_ton = e->ring.callingplan; /* this is the callingplan (TON/NPI), e->ring.callingplan>>4 would be the TON */
} else {
- pri->pvts[chanpos]->cid_num[0] = '\0';
- pri->pvts[chanpos]->cid_ani[0] = '\0';
- pri->pvts[chanpos]->cid_name[0] = '\0';
+ ast_string_field_set(pri->pvts[chanpos], cid_num, "");
+ ast_string_field_set(pri->pvts[chanpos], cid_ani, "");
+ ast_string_field_set(pri->pvts[chanpos], cid_name, "");
pri->pvts[chanpos]->cid_ton = 0;
}
apply_plan_to_number(pri->pvts[chanpos]->rdnis, sizeof(pri->pvts[chanpos]->rdnis), pri,
@@ -8594,24 +8601,22 @@
if (pri->pvts[chanpos]->immediate) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Going to extension s|1 because of immediate=yes\n");
- pri->pvts[chanpos]->exten[0] = 's';
- pri->pvts[chanpos]->exten[1] = '\0';
+ ast_string_field_set(pri->pvts[chanpos], exten, "s");
}
/* Get called number */
else if (!ast_strlen_zero(e->ring.callednum)) {
- ast_copy_string(pri->pvts[chanpos]->exten, e->ring.callednum, sizeof(pri->pvts[chanpos]->exten));
- ast_copy_string(pri->pvts[chanpos]->dnid, e->ring.callednum, sizeof(pri->pvts[chanpos]->dnid));
+ ast_string_field_set(pri->pvts[chanpos], exten, e->ring.callednum);
+ ast_string_field_set(pri->pvts[chanpos], dnid, e->ring.callednum);
} else
- pri->pvts[chanpos]->exten[0] = '\0';
+ ast_string_field_set(pri->pvts[chanpos], exten, "");
/* Set DNID on all incoming calls -- even immediate */
if (!ast_strlen_zero(e->ring.callednum))
- ast_copy_string(pri->pvts[chanpos]->dnid, e->ring.callednum, sizeof(pri->pvts[chanpos]->dnid));
+ ast_string_field_set(pri->pvts[chanpos], dnid, e->ring.callednum);
/* No number yet, but received "sending complete"? */
if (e->ring.complete && (ast_strlen_zero(e->ring.callednum))) {
if (option_verbose > 2)
ast_verbose(VERBOSE_PREFIX_3 "Going to extension s|1 because of Complete received\n");
- pri->pvts[chanpos]->exten[0] = 's';
- pri->pvts[chanpos]->exten[1] = '\0';
+ ast_string_field_set(pri->pvts[chanpos], exten, "s");
}
/* Make sure extension exists (or in overlap dial mode, can exist) */
if ((pri->overlapdial && ast_canmatch_extension(NULL, pri->pvts[chanpos]->context, pri->pvts[chanpos]->exten, 1, pri->pvts[chanpos]->cid_num)) ||
@@ -8736,7 +8741,7 @@
pri->pvts[chanpos]->prioffset, pri->span);
pri_hangup(pri->pri, e->ring.call, PRI_CAUSE_UNALLOCATED);
pri->pvts[chanpos]->call = NULL;
- pri->pvts[chanpos]->exten[0] = '\0';
+ ast_string_field_set(pri->pvts[chanpos], exten, "");
}
if (crv)
ast_mutex_unlock(&crv->lock);
@@ -8874,8 +8879,8 @@
} else {
/* Re-use *69 field for PRI */
ast_mutex_lock(&pri->pvts[chanpos]->lock);
- ast_copy_string(pri->pvts[chanpos]->lastcid_num, e->facname.callingnum, sizeof(pri->pvts[chanpos]->lastcid_num));
- ast_copy_string(pri->pvts[chanpos]->lastcid_name, e->facname.callingname, sizeof(pri->pvts[chanpos]->lastcid_name));
+ ast_string_field_set(pri->pvts[chanpos], lastcid_num, e->facname.callingnum);
+ ast_string_field_set(pri->pvts[chanpos], lastcid_name, e->facname.callingname);
pri->pvts[chanpos]->subs[SUB_REAL].needcallerid =1;
zt_enable_ec(pri->pvts[chanpos]);
ast_mutex_unlock(&pri->pvts[chanpos]->lock);
@@ -10394,6 +10399,7 @@
if (cur_outsignalling < 0) cur_outsignalling = cur_signalling;
for (x = start; x <= finish; x++) {
#ifdef HAVE_LIBPRI
+ ast_verbose("channel: %d cur_sig: %d cur_outsig: %d cur_radio: %d\n", x, cur_signalling, cur_outsignalling, cur_radio);
tmp = mkintf(x, cur_signalling, cur_outsignalling, cur_radio, pri, reload);
#else
tmp = mkintf(x, cur_signalling, cur_outsignalling, cur_radio, NULL, reload);
@@ -10410,9 +10416,9 @@
}
} else {
if (reload == 1)
- ast_log(LOG_ERROR, "Unable to reconfigure channel '%s'\n", v->value);
+ ast_log(LOG_ERROR, "Unable to reconfigure channel '%d'\n", x);
else
- ast_log(LOG_ERROR, "Unable to register channel '%s'\n", v->value);
+ ast_log(LOG_ERROR, "Unable to register channel '%d'\n", x);
ast_config_destroy(cfg);
ast_mutex_unlock(&iflock);
return -1;
Modified: team/oej/multiparking/include/asterisk/callerid.h
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/include/asterisk/callerid.h?rev=32520&r1=32519&r2=32520&view=diff
==============================================================================
--- team/oej/multiparking/include/asterisk/callerid.h (original)
+++ team/oej/multiparking/include/asterisk/callerid.h Tue Jun 6 03:34:08 2006
@@ -86,7 +86,7 @@
* \return It returns the size
* (in bytes) of the data (if it returns a size of 0, there is probably an error)
*/
-int callerid_generate(unsigned char *buf, char *number, char *name, int flags, int callwaiting, int codec);
+int callerid_generate(unsigned char *buf, const char *number, const char *name, int flags, int callwaiting, int codec);
/*! \brief Create a callerID state machine
* \param cid_signalling Type of signalling in use
@@ -157,7 +157,7 @@
*
* Acts like callerid_generate except uses an asterisk format callerid string.
*/
-int ast_callerid_generate(unsigned char *buf, char *name, char *number, int codec);
+int ast_callerid_generate(unsigned char *buf, const char *name, const char *number, int codec);
/*! \brief Generate message waiting indicator (stutter tone) */
int vmwi_generate(unsigned char *buf, int active, int mdmf, int codec);
@@ -165,7 +165,7 @@
/*! \brief Generate Caller-ID spill but in a format suitable for Call Waiting(tm)'s Caller*ID(tm)
* See ast_callerid_generate() for other details
*/
-int ast_callerid_callwaiting_generate(unsigned char *buf, char *name, char *number, int codec);
+int ast_callerid_callwaiting_generate(unsigned char *buf, const char *name, const char *number, int codec);
/*! \brief Destructively parse inbuf into name and location (or number)
* Parses callerid stream from inbuf and changes into useable form, outputed in name and location.
Modified: team/oej/multiparking/include/asterisk/stringfields.h
URL: http://svn.digium.com/view/asterisk/team/oej/multiparking/include/asterisk/stringfields.h?rev=32520&r1=32519&r2=32520&view=diff
==============================================================================
--- team/oej/multiparking/include/asterisk/stringfields.h (original)
+++ team/oej/multiparking/include/asterisk/stringfields.h Tue Jun 6 03:34:08 2006
@@ -47,7 +47,7 @@
sample = calloc(1, sizeof(*sample));
if (sample) {
- if (!ast_string_field_init(sample, 256)) {
+ if (ast_string_field_init(sample, 256)) {
free(sample);
sample = NULL;
}
@@ -132,7 +132,7 @@
\param size Amount of storage to allocate
\param fields Pointer to the first entry of the field array
\param num_fields Number of fields in the array
- \return 0 on failure, non-zero on success
+ \return 0 on success, non-zero on failure
*/
int __ast_string_field_init(struct ast_string_field_mgr *mgr, size_t size,
ast_string_field *fields, int num_fields);
@@ -205,7 +205,7 @@
\brief Initialize a field pool and fields
\param x Pointer to a structure containing fields
\param size Amount of storage to allocate
- \return 0 on failure, non-zero on success
+ \return 0 on success, non-zero on failure
*/
#define ast_string_field_init(x, size) \
__ast_string_field_init(&(x)->__field_mgr, size, &(x)->__begin_field[0], ast_string_field_count(x))
More information about the asterisk-commits
mailing list