[dovecot-cvs] dovecot/src/login client-authenticate.c,1.24,1.25
cras at procontrol.fi
cras at procontrol.fi
Sun Dec 22 00:03:00 EET 2002
Update of /home/cvs/dovecot/src/login
In directory danu:/tmp/cvs-serv15300/login
Modified Files:
client-authenticate.c
Log Message:
Replaced TempString with a String which can use any memory pool and uses
Buffer internally.
Index: client-authenticate.c
===================================================================
RCS file: /home/cvs/dovecot/src/login/client-authenticate.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- client-authenticate.c 20 Dec 2002 05:01:09 -0000 1.24
+++ client-authenticate.c 21 Dec 2002 22:02:58 -0000 1.25
@@ -7,7 +7,7 @@
#include "istream.h"
#include "ostream.h"
#include "safe-memset.h"
-#include "temp-string.h"
+#include "str.h"
#include "auth-connection.h"
#include "client.h"
#include "client-authenticate.h"
@@ -29,7 +29,7 @@
const char *client_authenticate_get_capabilities(void)
{
- TempString *str;
+ String *str;
int i;
if (auth_methods == available_auth_methods)
@@ -38,19 +38,18 @@
auth_methods = available_auth_methods;
i_free(auth_methods_capability);
- str = t_string_new(128);
+ str = t_str_new(128);
for (i = 0; i < AUTH_METHODS_COUNT; i++) {
if ((auth_methods & auth_method_desc[i].method) &&
auth_method_desc[i].name != NULL) {
- t_string_append_c(str, ' ');
- t_string_append(str, "AUTH=");
- t_string_append(str, auth_method_desc[i].name);
+ str_append_c(str, ' ');
+ str_append(str, "AUTH=");
+ str_append(str, auth_method_desc[i].name);
}
}
- auth_methods_capability = str->len == 1 ? NULL :
- i_strdup_empty(str->str);
+ auth_methods_capability = i_strdup_empty(str_c(str));
return auth_methods_capability;
}
More information about the dovecot-cvs
mailing list