[svn-commits] trunk r198 - in /trunk/asterisk-ooh323c: ooh323c/src/
src/
svn-commits at lists.digium.com
svn-commits at lists.digium.com
Thu Feb 9 11:30:22 MST 2006
Author: objsys
Date: Thu Feb 9 12:30:20 2006
New Revision: 198
URL: http://svn.digium.com/view/asterisk-addons?rev=198&view=rev
Log:
added \#\*\, chars for callerid and dailedDigit
Modified:
trunk/asterisk-ooh323c/ooh323c/src/ooUtils.c
trunk/asterisk-ooh323c/ooh323c/src/ooUtils.h
trunk/asterisk-ooh323c/src/chan_h323.c
Modified: trunk/asterisk-ooh323c/ooh323c/src/ooUtils.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/ooh323c/src/ooUtils.c?rev=198&r1=197&r2=198&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/ooh323c/src/ooUtils.c (original)
+++ trunk/asterisk-ooh323c/ooh323c/src/ooUtils.c Thu Feb 9 12:30:20 2006
@@ -27,14 +27,14 @@
}
-OOBOOL ooIsDigitString(const char* str)
+OOBOOL ooIsDailedDigit(const char* str)
{
- int i = 0;
if(str == NULL || *str =='\0') { return FALSE; }
- while(*(str+i) != '\0')
+ while(*str != '\0')
{
- if(!isdigit(*(str+i))) { return FALSE; }
- i++;
+ if(!isdigit(*str) &&
+ *str != '#' && *str != '*' && *str != ',') { return FALSE; }
+ str++;
}
return TRUE;
}
Modified: trunk/asterisk-ooh323c/ooh323c/src/ooUtils.h
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/ooh323c/src/ooUtils.h?rev=198&r1=197&r2=198&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/ooh323c/src/ooUtils.h (original)
+++ trunk/asterisk-ooh323c/ooh323c/src/ooUtils.h Thu Feb 9 12:30:20 2006
@@ -48,6 +48,6 @@
* @param str String to test
* @return TRUE if string contains all digits; FALSE otherwise
*/
-EXTERN OOBOOL ooIsDigitString(const char* str);
+EXTERN OOBOOL ooIsDailedDigit(const char* str);
#endif
Modified: trunk/asterisk-ooh323c/src/chan_h323.c
URL: http://svn.digium.com/view/asterisk-addons/trunk/asterisk-ooh323c/src/chan_h323.c?rev=198&r1=197&r2=198&view=diff
==============================================================================
--- trunk/asterisk-ooh323c/src/chan_h323.c (original)
+++ trunk/asterisk-ooh323c/src/chan_h323.c Thu Feb 9 12:30:20 2006
@@ -1293,7 +1293,7 @@
ooCallAddAliasDialedDigits(call, p->caller_dialedDigits);
}
else if(p->callerid_num) {
- if(ooIsDigitString(p->callerid_num)) {
+ if(ooIsDailedDigit(p->callerid_num)) {
if(gH323Debug) {
ast_verbose("setting callid number %s\n", p->callerid_num);
}
@@ -1307,15 +1307,7 @@
if(!ast_strlen_zero(p->exten))
{
- const char* pexten = p->exten;
- while(*pexten != '\0') {
- if(!(isdigit(*pexten)) &&
- *pexten != '#' && *pexten != '*' && *pexten != ',') {
- break;
- }
- pexten++;
- }
- if(*pexten == '\0') {
+ if(ooIsDailedDigit(p->exten)) {
ooCallSetCalledPartyNumber(call, p->exten);
ooCallAddRemoteAliasDialedDigits(call, p->exten);
}
@@ -1743,11 +1735,11 @@
int reload_config(void)
{
int format;
- struct ooAliases * pNewAlias=NULL;
+ struct ooAliases *pNewAlias = NULL;
struct ast_config *cfg;
struct ast_variable *v;
- struct ooh323_user *user = NULL;
- struct ooh323_peer *peer=NULL;
+ struct ooh323_user *user = NULL;
+ struct ooh323_peer *peer = NULL;
char *cat, *utype;
if(gH323Debug)
@@ -2198,7 +2190,7 @@
else if(gRasGkMode == RasDiscoverGatekeeper)
sprintf(value, "%s", "Discover");
else
- sprintf(value, "%s", gGatekeeper);
+ sprintf(value, "%s", gGatekeeper);
ast_cli(fd, "%-15s%s\n", "Gatekeeper:", value);
@@ -2207,7 +2199,7 @@
ast_cli(fd, "%-15s%s\n", "Context:", gContext);
ast_cli(fd, "%-15s%s\n", "Capability:",
- ast_getformatname_multiple(value,512,gCapability));
+ ast_getformatname_multiple(value,512,gCapability));
ast_cli(fd, "%-15s", "DTMF Mode: ");
if(gDTMFMode & H323_DTMF_RFC2833)
@@ -2412,7 +2404,7 @@
if(gRasGkMode == RasUseSpecificGatekeeper)
ooGkClientInit(gRasGkMode, gGatekeeper, 0);
else if(gRasGkMode == RasDiscoverGatekeeper)
- ooGkClientInit(gRasGkMode, 0, 0);
+ ooGkClientInit(gRasGkMode, 0, 0);
/* Register callbacks */
ooH323EpSetH323Callbacks(h323Callbacks);
More information about the svn-commits
mailing list