[Asterisk-cvs] asterisk-addons/asterisk-ooh323c/ooh323c/src
ooUtils.c, 1.2, 1.3 ooUtils.h, 1.2, 1.3
vphirke
vphirke
Fri Nov 11 15:58:41 CST 2005
Update of /usr/cvsroot/asterisk-addons/asterisk-ooh323c/ooh323c/src
In directory mongoose.digium.com:/tmp/cvs-serv17805/ooh323c/src
Modified Files:
ooUtils.c ooUtils.h
Log Message:
Fix for bug causing dialed digits alias being set as a char string
Index: ooUtils.c
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/asterisk-ooh323c/ooh323c/src/ooUtils.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ooUtils.c 26 Oct 2005 20:49:40 -0000 1.2
+++ ooUtils.c 11 Nov 2005 20:49:21 -0000 1.3
@@ -26,3 +26,15 @@
return (str == NULL || *str =='\0');
}
+
+OOBOOL ooIsDigitString(const char* str)
+{
+ int i = 0;
+ if(str == NULL || *str =='\0') { return FALSE; }
+ while(*(str+i) != '\0')
+ {
+ if(!isdigit(*(str+i))) { return FALSE; }
+ i++;
+ }
+ return TRUE;
+}
Index: ooUtils.h
===================================================================
RCS file: /usr/cvsroot/asterisk-addons/asterisk-ooh323c/ooh323c/src/ooUtils.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ooUtils.h 26 Oct 2005 20:49:40 -0000 1.2
+++ ooUtils.h 11 Nov 2005 20:49:21 -0000 1.3
@@ -41,4 +41,13 @@
*/
EXTERN OOBOOL ooUtilsIsStrEmpty (const char * str);
+
+/**
+ * Test if given string value is digit string.
+ *
+ * @param str String to test
+ * @return TRUE if string contains all digits; FALSE otherwise
+ */
+EXTERN OOBOOL ooIsDigitString(const char* str);
+
#endif
More information about the svn-commits
mailing list