Diffstat (limited to 'kmicromail/libetpan/generic/nntpstorage.c') (more/less context) (ignore whitespace changes)
-rw-r--r-- | kmicromail/libetpan/generic/nntpstorage.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kmicromail/libetpan/generic/nntpstorage.c b/kmicromail/libetpan/generic/nntpstorage.c index 5ba333b..89974cd 100644 --- a/kmicromail/libetpan/generic/nntpstorage.c +++ b/kmicromail/libetpan/generic/nntpstorage.c | |||
@@ -50,49 +50,49 @@ | |||
50 | #define NNTPS_DEFAULT_PORT 563 | 50 | #define NNTPS_DEFAULT_PORT 563 |
51 | 51 | ||
52 | static int nntp_mailstorage_connect(struct mailstorage * storage); | 52 | static int nntp_mailstorage_connect(struct mailstorage * storage); |
53 | static int nntp_mailstorage_get_folder_session(struct mailstorage * storage, | 53 | static int nntp_mailstorage_get_folder_session(struct mailstorage * storage, |
54 | char * pathname, mailsession ** result); | 54 | char * pathname, mailsession ** result); |
55 | static void nntp_mailstorage_uninitialize(struct mailstorage * storage); | 55 | static void nntp_mailstorage_uninitialize(struct mailstorage * storage); |
56 | 56 | ||
57 | static mailstorage_driver nntp_mailstorage_driver = { | 57 | static mailstorage_driver nntp_mailstorage_driver = { |
58 | .sto_name = "nntp", | 58 | .sto_name = "nntp", |
59 | .sto_connect = nntp_mailstorage_connect, | 59 | .sto_connect = nntp_mailstorage_connect, |
60 | .sto_get_folder_session = nntp_mailstorage_get_folder_session, | 60 | .sto_get_folder_session = nntp_mailstorage_get_folder_session, |
61 | .sto_uninitialize = nntp_mailstorage_uninitialize, | 61 | .sto_uninitialize = nntp_mailstorage_uninitialize, |
62 | }; | 62 | }; |
63 | 63 | ||
64 | int nntp_mailstorage_init(struct mailstorage * storage, | 64 | int nntp_mailstorage_init(struct mailstorage * storage, |
65 | char * nn_servername, uint16_t nn_port, | 65 | char * nn_servername, uint16_t nn_port, |
66 | char * nn_command, | 66 | char * nn_command, |
67 | int nn_connection_type, int nn_auth_type, | 67 | int nn_connection_type, int nn_auth_type, |
68 | char * nn_login, char * nn_password, | 68 | char * nn_login, char * nn_password, |
69 | int nn_cached, char * nn_cache_directory, char * nn_flags_directory) | 69 | int nn_cached, char * nn_cache_directory, char * nn_flags_directory) |
70 | { | 70 | { |
71 | struct nntp_mailstorage * nntp_storage; | 71 | struct nntp_mailstorage * nntp_storage; |
72 | int res; | 72 | int res; |
73 | 73 | ||
74 | nntp_storage = malloc(sizeof(struct nntp_mailstorage)); | 74 | nntp_storage = malloc(sizeof(* nntp_storage)); |
75 | if (nntp_storage == NULL) { | 75 | if (nntp_storage == NULL) { |
76 | res = MAIL_ERROR_MEMORY; | 76 | res = MAIL_ERROR_MEMORY; |
77 | goto err; | 77 | goto err; |
78 | } | 78 | } |
79 | 79 | ||
80 | nntp_storage->nntp_servername = strdup(nn_servername); | 80 | nntp_storage->nntp_servername = strdup(nn_servername); |
81 | if (nntp_storage->nntp_servername == NULL) { | 81 | if (nntp_storage->nntp_servername == NULL) { |
82 | res = MAIL_ERROR_MEMORY; | 82 | res = MAIL_ERROR_MEMORY; |
83 | goto free; | 83 | goto free; |
84 | } | 84 | } |
85 | 85 | ||
86 | nntp_storage->nntp_connection_type = nn_connection_type; | 86 | nntp_storage->nntp_connection_type = nn_connection_type; |
87 | 87 | ||
88 | if (nn_port == 0) { | 88 | if (nn_port == 0) { |
89 | switch (nn_connection_type) { | 89 | switch (nn_connection_type) { |
90 | case CONNECTION_TYPE_PLAIN: | 90 | case CONNECTION_TYPE_PLAIN: |
91 | case CONNECTION_TYPE_COMMAND: | 91 | case CONNECTION_TYPE_COMMAND: |
92 | nn_port = NNTP_DEFAULT_PORT; | 92 | nn_port = NNTP_DEFAULT_PORT; |
93 | break; | 93 | break; |
94 | 94 | ||
95 | case CONNECTION_TYPE_TLS: | 95 | case CONNECTION_TYPE_TLS: |
96 | case CONNECTION_TYPE_COMMAND_TLS: | 96 | case CONNECTION_TYPE_COMMAND_TLS: |
97 | nn_port = NNTPS_DEFAULT_PORT; | 97 | nn_port = NNTPS_DEFAULT_PORT; |
98 | break; | 98 | break; |