[svn-commits] ctooley: branch ctooley/excel-sip-changes r118100 - /team/ctooley/excel-sip-c...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri May 23 08:33:23 CDT 2008


Author: ctooley
Date: Fri May 23 08:33:23 2008
New Revision: 118100

URL: http://svn.digium.com/view/asterisk?view=rev&rev=118100
Log:
removed most of the compile errors from ast_str_replace_char, still 2 left, need someone else to look over it.

Modified:
    team/ctooley/excel-sip-changes/include/asterisk/strings.h

Modified: team/ctooley/excel-sip-changes/include/asterisk/strings.h
URL: http://svn.digium.com/view/asterisk/team/ctooley/excel-sip-changes/include/asterisk/strings.h?view=diff&rev=118100&r1=118099&r2=118100
==============================================================================
--- team/ctooley/excel-sip-changes/include/asterisk/strings.h (original)
+++ team/ctooley/excel-sip-changes/include/asterisk/strings.h Fri May 23 08:33:23 2008
@@ -706,11 +706,11 @@
  * 	   work or 0 on success.
  */
 AST_INLINE_API(
-int ast_str_replace_char(struct ast_str **buf, const char replace, 
+int ast_str_replace_char(struct ast_str *buf, const char replace, 
 	const char *with, const int occurrences, const int end),
 {
 
-	int replace_ptr;
+	char *replace_ptr;
 	char *str_buf;
 	char *remove_buf;
 	int counter = 0;
@@ -746,13 +746,13 @@
 	} else {
 		while (str_buf) {
 			remove = ast_str_alloca(buf->len);
-			remove_buf = strsep(str_buf, replace);
-			ast_str_append(remove, remove_buf);
-		}
+			remove_buf = strsep(&str_buf, &replace);
+			ast_str_append(&remove, 0, "%s", remove_buf);
+		} 
 		buf->str = remove->str;
 		buf->used = remove->used;
 		return 0;
-	}
+	} 
 }
 )
 
@@ -764,7 +764,7 @@
  * 	   contained by the struct.
  */
 AST_INLINE_API(
-char * ast_str_to_string(struct ast_str **buf),
+char * ast_str_to_string(struct ast_str *buf),
 {
 	if (buf) {
 		return buf->str;
@@ -782,7 +782,7 @@
  * 	   length (capicity) of the string contained by the struct.
  */
 AST_INLINE_API(
-size_t ast_str_capacity(struct ast_str **buf),
+size_t ast_str_capacity(struct ast_str *buf),
 {
 	if (buf) {
 		return buf->len;
@@ -800,7 +800,7 @@
  * 	   of the string contained by the struct.
  */
 AST_INLINE_API(
-size_t ast_str_length(struct ast_str **buf),
+size_t ast_str_length(struct ast_str *buf),
 {
 	if (buf) {
 		return buf->used;




More information about the svn-commits mailing list