diff options
author | aaron <aaron@7b491191-dbf0-0310-aff6-d879d4d69008> | 2007-04-09 04:51:45 +0000 |
---|---|---|
committer | aaron <aaron@7b491191-dbf0-0310-aff6-d879d4d69008> | 2007-04-09 04:51:45 +0000 |
commit | b659820e9d3277919451092d47cf7994f6721557 (patch) | |
tree | 0eb40bf225d21f0d150e086a7f6bedf8c3f7539b /timsieve.c | |
parent | 8cd7f8c0b52191621ff550e81bf2b6cdf9304825 (diff) |
* check_dbmail_deliver.c dbmail-user.c lmtp.c user.c imap4.h db.c
modules/authsql.c modules/authldap.c modules/sortsieve.c quota.c
debug.h acl.c imapcommands.c dsn.c pipe.c dm_base64.c dbmail-message.c
check_dbmail_db.c sievecmd.c dbmail-imapsession.c main.c timsieve.c
memblock.c misc.c:
Changed all instances of dm_free, dm_malloc, dm_strdup to g_free,
g_new0 or g_malloc, g_strdup, respectively.
git-svn-id: https://svn.ic-s.nl/svn/dbmail/branches/dbmail_2_2_branch@2511 7b491191-dbf0-0310-aff6-d879d4d69008
Diffstat (limited to 'timsieve.c')
-rw-r--r-- | timsieve.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -80,7 +80,7 @@ int tims_handle_connection(clientinfo_t * ci) if (! ci->tx) { TRACE(TRACE_MESSAGE, "TX stream is null!"); - dm_free(buffer); + g_free(buffer); return 0; } @@ -104,7 +104,7 @@ int tims_handle_connection(clientinfo_t * ci) if (alarm_occured) { alarm_occured = 0; client_close(); - dm_free(buffer); + g_free(buffer); return 0; } } while (ferror(ci->rx) && errno == EINTR); @@ -137,7 +137,7 @@ int tims_handle_connection(clientinfo_t * ci) } /* memory cleanup */ - dm_free(buffer); + g_free(buffer); buffer = NULL; /* reset timers */ @@ -276,7 +276,7 @@ int tims(clientinfo_t *ci, char *buffer, PopSession_t * session) strncpy(tmpcharlen, tmpleft, (10 < tmplen ? 10 : tmplen)); tmpcharlen[(10 < tmplen ? 10 : tmplen)] = '\0'; - dm_free(tmpleft); + g_free(tmpleft); authlen = strtoull(tmpcharlen, NULL, 10); if (authlen >= UINT_MAX) { @@ -317,8 +317,8 @@ int tims(clientinfo_t *ci, char *buffer, PopSession_t * session) ci_write((FILE *) stream, "OK\r\n"); session->state = AUTH; session->useridnr = useridnr; - session->username = dm_strdup(tmp64[1]); - session->password = dm_strdup(tmp64[2]); + session->username = g_strdup(tmp64[1]); + session->password = g_strdup(tmp64[2]); child_reg_connected_user(session->username); } else { ci_write((FILE *) stream, "NO \"Username or password incorrect.\"\r\n"); @@ -361,7 +361,7 @@ int tims(clientinfo_t *ci, char *buffer, PopSession_t * session) strncpy(scriptname, tmpleft, (MAX_SIEVE_SCRIPTNAME < tmplen ? MAX_SIEVE_SCRIPTNAME : tmplen)); /* Of course, be sure to NULL terminate, because strncpy() likely won't */ scriptname[(MAX_SIEVE_SCRIPTNAME < tmplen ? MAX_SIEVE_SCRIPTNAME : tmplen)] = '\0'; - dm_free(tmpleft); + g_free(tmpleft); /* Offset from the previous match to make sure not to pull * the "length" from a script with a malicious name */ @@ -378,7 +378,7 @@ int tims(clientinfo_t *ci, char *buffer, PopSession_t * session) strncpy(tmpcharlen, tmpleft, (10 < tmplen ? 10 : tmplen)); tmpcharlen[(10 < tmplen ? 10 : tmplen)] = '\0'; - dm_free(tmpleft); + g_free(tmpleft); scriptlen = strtoull(tmpcharlen, NULL, 10); TRACE(TRACE_INFO, "Client sending script of length [%llu]", scriptlen); @@ -456,7 +456,7 @@ int tims(clientinfo_t *ci, char *buffer, PopSession_t * session) strncpy(scriptname, tmpleft, (MAX_SIEVE_SCRIPTNAME < tmplen ? MAX_SIEVE_SCRIPTNAME : tmplen)); /* Of course, be sure to NULL terminate, because strncpy() likely won't */ scriptname[(MAX_SIEVE_SCRIPTNAME < tmplen ? MAX_SIEVE_SCRIPTNAME : tmplen)] = '\0'; - dm_free(tmpleft); + g_free(tmpleft); ret = db_activate_sievescript(session->useridnr, scriptname); if (ret == -3) { @@ -475,7 +475,7 @@ int tims(clientinfo_t *ci, char *buffer, PopSession_t * session) ci_write((FILE *) stream, "OK \"No scripts are active at this time.\"\r\n"); } else { ret = db_deactivate_sievescript(session->useridnr, scriptname); - dm_free(scriptname); + g_free(scriptname); if (ret == -3) { ci_write((FILE *)stream, "NO \"Active script does not exist.\"\r\n"); return -1; @@ -512,7 +512,7 @@ int tims(clientinfo_t *ci, char *buffer, PopSession_t * session) strncpy(scriptname, tmpleft, (MAX_SIEVE_SCRIPTNAME < tmplen ? MAX_SIEVE_SCRIPTNAME : tmplen)); /* Of course, be sure to NULL terminate, because strncpy() likely won't */ scriptname[(MAX_SIEVE_SCRIPTNAME < tmplen ? MAX_SIEVE_SCRIPTNAME : tmplen)] = '\0'; - dm_free(tmpleft); + g_free(tmpleft); ret = db_get_sievescript_byname(session->useridnr, scriptname, &script); if (ret == -3) { @@ -549,7 +549,7 @@ int tims(clientinfo_t *ci, char *buffer, PopSession_t * session) strncpy(scriptname, tmpleft, (MAX_SIEVE_SCRIPTNAME < tmplen ? MAX_SIEVE_SCRIPTNAME : tmplen)); /* Of course, be sure to NULL terminate, because strncpy() likely won't */ scriptname[(MAX_SIEVE_SCRIPTNAME < tmplen ? MAX_SIEVE_SCRIPTNAME : tmplen)] = '\0'; - dm_free(tmpleft); + g_free(tmpleft); ret = db_delete_sievescript(session->useridnr, scriptname); if (ret == -3) { @@ -613,7 +613,7 @@ int tims(clientinfo_t *ci, char *buffer, PopSession_t * session) if (sort_result) sort_free_result(sort_result); if (f_buf) - dm_free(f_buf); + g_free(f_buf); return 1; } |