[asterisk-commits] ivaxer: branch ivaxer/ast_storage r273890 - in /team/ivaxer/ast_storage: incl...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 5 08:55:30 CDT 2010


Author: ivaxer
Date: Mon Jul  5 08:55:26 2010
New Revision: 273890

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=273890
Log:
the "path" field was moved from ast_storage structures to odbc_storage_pvt

Modified:
    team/ivaxer/ast_storage/include/asterisk/storage.h
    team/ivaxer/ast_storage/res/res_storage_odbc.c

Modified: team/ivaxer/ast_storage/include/asterisk/storage.h
URL: http://svnview.digium.com/svn/asterisk/team/ivaxer/ast_storage/include/asterisk/storage.h?view=diff&rev=273890&r1=273889&r2=273890
==============================================================================
--- team/ivaxer/ast_storage/include/asterisk/storage.h (original)
+++ team/ivaxer/ast_storage/include/asterisk/storage.h Mon Jul  5 08:55:26 2010
@@ -69,7 +69,6 @@
 struct ast_storage {
 	const struct ast_storage_be *be;
 	void *storage_pvt; /* Backend specific structure */
-	char path[1];
 };
 
 int __ast_register_storage(const struct ast_storage_be *e, struct ast_module *mod);

Modified: team/ivaxer/ast_storage/res/res_storage_odbc.c
URL: http://svnview.digium.com/svn/asterisk/team/ivaxer/ast_storage/res/res_storage_odbc.c?view=diff&rev=273890&r1=273889&r2=273890
==============================================================================
--- team/ivaxer/ast_storage/res/res_storage_odbc.c (original)
+++ team/ivaxer/ast_storage/res/res_storage_odbc.c Mon Jul  5 08:55:26 2010
@@ -63,6 +63,7 @@
 	char tablename[128];
 	struct odbc_obj *conn;
 	AST_RWLIST_HEAD(odbc_columns, columns) columns;
+	char path[1];
 };
 
 static const struct ast_storage_be odbc_se;
@@ -104,7 +105,7 @@
 
 	pathname_len = sizeof(char) * strlen(args.pathname);
 
-	st = ast_calloc(1, sizeof(struct ast_storage) + pathname_len);
+	st = ast_calloc(1, sizeof(struct ast_storage));
 	if (!st) {
 		return NULL;
 	}
@@ -114,7 +115,7 @@
 		return NULL;
 	}
 
-	pvt = ast_calloc(1, sizeof(struct odbc_storage_pvt));
+	pvt = ast_calloc(1, sizeof(struct odbc_storage_pvt) + pathname_len);
 	if (!pvt) {
 		se_release(st);
 		return NULL;
@@ -128,7 +129,7 @@
 
 	ast_copy_string(pvt->odbc_class, args.class, sizeof(pvt->odbc_class));
 	ast_copy_string(pvt->tablename, args.tablename, sizeof(pvt->tablename));
-	ast_copy_string(st->path, args.pathname, pathname_len);
+	ast_copy_string(pvt->path, args.pathname, pathname_len);
 
 	pvt->conn = ast_odbc_request_obj(pvt->odbc_class, 0);
 	if (!pvt->conn) {




More information about the asterisk-commits mailing list