|
From: <he...@us...> - 2009-07-27 20:53:36
|
Revision: 165
http://pdbsql.svn.sourceforge.net/pdbsql/?rev=165&view=rev
Author: herwinw
Date: 2009-07-27 20:53:02 +0000 (Mon, 27 Jul 2009)
Log Message:
-----------
Slight changes to compile against Samba 3.4
WARNING: It compiles, but has not been tested in *any* way. Use at your own risk. It might work, it might crash
Modified Paths:
--------------
branches/pdbsql_34/pdb_multi.c
branches/pdbsql_34/pdb_mysql.c
branches/pdbsql_34/pdb_pgsql.c
Modified: branches/pdbsql_34/pdb_multi.c
===================================================================
--- branches/pdbsql_34/pdb_multi.c 2009-07-20 20:32:50 UTC (rev 164)
+++ branches/pdbsql_34/pdb_multi.c 2009-07-27 20:53:02 UTC (rev 165)
@@ -93,7 +93,7 @@
int i;
data = (struct multisam_data *) methods->private_data;
- state = TALLOC_ZERO_P(search->mem_ctx, struct multisam_search_state);
+ state = talloc_zero(search, struct multisam_search_state);
if (state == NULL)
{
DEBUG(0, ("Talloc failed\n"));
@@ -831,7 +831,7 @@
data->location = talloc_strdup(data, location);
data->names = str_list_make(data, data->location, NULL);
- data->num_backends = str_list_count((const char **)data->names);
+ data->num_backends = str_list_length((const char **)data->names);
data->locations = talloc_array(data, char *, data->num_backends);
data->methods = talloc_array(data, struct pdb_methods *, data->num_backends);
Modified: branches/pdbsql_34/pdb_mysql.c
===================================================================
--- branches/pdbsql_34/pdb_mysql.c 2009-07-20 20:32:50 UTC (rev 164)
+++ branches/pdbsql_34/pdb_mysql.c 2009-07-27 20:53:02 UTC (rev 165)
@@ -443,9 +443,9 @@
}
entry->acct_flags = atoi(row[23]);
- entry->account_name = talloc_strdup(search->mem_ctx,row[6]);
- entry->fullname = talloc_strdup(search->mem_ctx,row[9]);
- entry->description = talloc_strdup(search->mem_ctx,row[14]);
+ entry->account_name = talloc_strdup(search, row[6]);
+ entry->fullname = talloc_strdup(search, row[9]);
+ entry->description = talloc_strdup(search, row[14]);
state->current += 1;
@@ -482,7 +482,7 @@
int mysql_ret;
struct mysqlsam_search_state *state;
- state = TALLOC_ZERO_P(search->mem_ctx, struct mysqlsam_search_state);
+ state = TALLOC_ZERO_P(search, struct mysqlsam_search_state);
if (state == NULL) {
DEBUG(0, ("talloc failed\n"));
return false;
Modified: branches/pdbsql_34/pdb_pgsql.c
===================================================================
--- branches/pdbsql_34/pdb_pgsql.c 2009-07-20 20:32:50 UTC (rev 164)
+++ branches/pdbsql_34/pdb_pgsql.c 2009-07-27 20:53:02 UTC (rev 165)
@@ -486,9 +486,9 @@
}
entry->acct_flags = atoi(PQgetvalue(r, row, 23));
- entry->account_name = talloc_strdup(search->mem_ctx, PQgetvalue(r, row, 6));
- entry->fullname = talloc_strdup(search->mem_ctx, PQgetvalue(r, row, 9));
- entry->description = talloc_strdup(search->mem_ctx, PQgetvalue(r, row, 14));
+ entry->account_name = talloc_strdup(search, PQgetvalue(r, row, 6));
+ entry->fullname = talloc_strdup(search, PQgetvalue(r, row, 9));
+ entry->description = talloc_strdup(search, PQgetvalue(r, row, 14));
search_state->currow++;
@@ -534,7 +534,7 @@
data = (struct pdb_pgsql_data *) pdb_methods->private_data;
- search_state = TALLOC_ZERO_P(search->mem_ctx, struct pdb_pgsql_search_state);
+ search_state = TALLOC_ZERO_P(search, struct pdb_pgsql_search_state);
if (search_state == NULL) {
DEBUG(0, ("talloc failed\n"));
return False;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|