diff options
author | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-20 17:39:44 +0000 |
---|---|---|
committer | rizzo <rizzo@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-04-20 17:39:44 +0000 |
commit | 1d299362e5a1a2f8f592785cea368ef36ec4a5a5 (patch) | |
tree | 16552ad1f452eda2398484765d5833f20052ef99 /include | |
parent | 8791c86837b0d8a60025efc9dcc39a4374c51618 (diff) |
comment that for callerid field, NULL and "" should be considered
equivalent (the reason is, when passing these strings through a
statically allocated buffer, we have no way to tell between NULL and ""
so we would be unable to preserve the difference, if any).
No code changes yet.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@21743 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/channel.h | 39 |
1 files changed, 16 insertions, 23 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 7d2b4356f..3096d1656 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -146,10 +146,8 @@ struct ast_generator { /*! Structure for a data store type */ struct ast_datastore_info { - /*! Type of data store */ - const char *type; - /*! Destroy function */ - void (*destroy)(void *data); + const char *type; /*! Type of data store */ + void (*destroy)(void *data); /*! Destroy function */ }; /*! Structure for a channel data store */ @@ -164,26 +162,21 @@ struct ast_datastore { AST_LIST_ENTRY(ast_datastore) entry; }; -/*! Structure for all kinds of caller ID identifications */ +/*! Structure for all kinds of caller ID identifications. + * All string fields here are malloc'ed, so they need to be + * freed when the structure is deleted. + * Also, NULL and "" must be considered equivalent. + */ struct ast_callerid { - /*! Malloc'd Dialed Number Identifier */ - char *cid_dnid; - /*! Malloc'd Caller Number */ - char *cid_num; - /*! Malloc'd Caller Name */ - char *cid_name; - /*! Malloc'd ANI */ - char *cid_ani; - /*! Malloc'd RDNIS */ - char *cid_rdnis; - /*! Callerid presentation/screening */ - int cid_pres; - /*! Callerid ANI 2 (Info digits) */ - int cid_ani2; - /*! Callerid Type of Number */ - int cid_ton; - /*! Callerid Transit Network Select */ - int cid_tns; + char *cid_dnid; /*! Malloc'd Dialed Number Identifier */ + char *cid_num; /*! Malloc'd Caller Number */ + char *cid_name; /*! Malloc'd Caller Name */ + char *cid_ani; /*! Malloc'd ANI */ + char *cid_rdnis; /*! Malloc'd RDNIS */ + int cid_pres; /*! Callerid presentation/screening */ + int cid_ani2; /*! Callerid ANI 2 (Info digits) */ + int cid_ton; /*! Callerid Type of Number */ + int cid_tns; /*! Callerid Transit Network Select */ }; /*! Structure to describe a channel "technology", ie a channel driver |