+2007-04-01 Matthew Barnes <mbarnes@redhat.com>
+
+ * libedataserver/e-account.c (receipt_policy_to_str):
+ * libedataserver/e-iconv.c (e_dlist_init):
+ * libedataserver/e-list-iterator.c (e_list_iterator_insert):
+ * libedataserver/e-trie.c (e_trie_search):
+ * libedataserver/e-sexp.c (term_eval_castint), (e_sexp_finalise):
+ Fix some compiler warnings. Patch from Kjartan Maraas.
+
2007-03-29 Matthew Barnes <mbarnes@redhat.com>
* libedataserver/e-data-server-util.c:
+2007-04-01 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Various code clean-ups from Kjartan Maraas.
+
+ * libebook/e-book.c (e_book_new_system_address_book),
+ (e_book_new_default_addressbook):
+ * libebook/e-vcard.c (e_vcard_attribute_get_param),
+ (_evc_base64_encode_simple):
+ * backends/ldap/e-book-backend-ldap.c
+ (e_book_backend_ldap_get_contact_list), (member_compare):
+ * libedata-book/e-book-backend-db-cache.c
+ (e_book_backend_db_cache_add_contact):
+ * tests/ebook/test-ebook.c (print_email):
+ * tests/ebook/test-ebook-async.c (print_email):
+ Fix some compiler warnings.
+
+ * backends/ldap/e-book-backend-ldap.c:
+ Disable some unused functions.
+
+ * libedata-book/e-book-backend-cache.c
+ (e_book_backend_cache_constructor):
+ Use the global 'parent_class' variable.
+
+ * libedata-book/e-book-backend-cache.c
+ (e_book_backend_cache_set_time):
+ Return a duplicated string.
+
2007-03-26 Matthew Barnes <mbarnes@redhat.com>
* backends/groupwise/e-book-backend-groupwise.c:
*/
contact = create_contact (id_dbt.data, vcard_dbt.data);
-#if notyet
+#ifdef notyet
g_object_set (card, "last_use", NULL, "use_score", 0.0, NULL);
#endif
vcard_string = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
#ifndef SUNLDAP
static void
-get_ldap_library_info ()
+get_ldap_library_info (void)
{
LDAPAPIInfo info;
LDAP *ldap;
contact_list_handler, contact_list_dtor);
if (enable_debug) {
g_get_current_time (&end);
+
+ diff = end.tv_sec * 1000 + end.tv_usec/1000;
+ diff -= start.tv_sec * 1000 + start.tv_usec/1000;
+
printf ("e_book_backend_ldap_get_contact_list invoked contact_list_handler ");
printf ("and took %ld.%03ld seconds\n", diff/1000, diff%1000);
}
if (dn_cur) {
if (!g_ascii_strcasecmp (dn_new, dn_cur)) {
found = TRUE;
- g_list_remove (members_cur, attr_cur);
+ members_cur = g_list_remove (members_cur, attr_cur);
goto next_member;
}
}
return g_strdup("net,anon-access,do-initial-query,contact-lists");
}
+#if 0
static void
stop_views (EBookBackend *backend)
{
g_object_unref (iter);
g_object_unref (book_views);
}
+#endif
static void
e_book_backend_ldap_set_mode (EBookBackend *backend, int mode)
* Returns: a new #EBookListener
*/
EBookListener *
-e_book_listener_new ()
+e_book_listener_new (void)
{
static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
static PortableServer_POA poa = NULL;
* Return value: a new #EBookViewListener
*/
EBookViewListener *
-e_book_view_listener_new ()
+e_book_view_listener_new (void)
{
static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
static PortableServer_POA poa = NULL;
/* one-time start up for libebook */
static void
-e_book_activate()
+e_book_activate(void)
{
static GStaticMutex e_book_lock = G_STATIC_MUTEX_INIT;
static gboolean activated = FALSE;
ESource *source;
EBook *book;
- e_return_error_if_fail (uri, E_BOOK_ERROR_INVALID_ARG);
+ e_return_error_if_fail (uri, E_BOOK_ERROR_INVALID_ARG);
group = e_source_group_new ("", uri);
source = e_source_new ("", "");
if (!e_book_get_addressbooks (&sources, &err)) {
if (error)
g_propagate_error (error, err);
- return FALSE;
+ return NULL;
}
for (g = e_source_list_peek_groups (sources); g; g = g->next) {
if (!e_book_get_addressbooks (&sources, &err)) {
if (error)
g_propagate_error (error, err);
- return FALSE;
+ return NULL;
}
for (g = e_source_list_peek_groups (sources); g; g = g->next) {
* Return value: A new #EContactName struct.
**/
EContactName*
-e_contact_name_new ()
+e_contact_name_new (void)
{
return g_new0 (EContactName, 1);
}
* Return value: A new, blank #EVCard.
**/
EVCard *
-e_vcard_new ()
+e_vcard_new (void)
{
return e_vcard_new_from_string ("");
}
{
GList *params, *p;
- g_return_val_if_fail (attr != NULL, FALSE);
- g_return_val_if_fail (name != NULL, FALSE);
+ g_return_val_if_fail (attr != NULL, NULL);
+ g_return_val_if_fail (name != NULL, NULL);
params = e_vcard_attribute_get_params (attr);
{
unsigned char *out;
int state = 0, outlen;
- unsigned int save = 0;
+ int save = 0;
g_return_val_if_fail (data != NULL, NULL);
GObject *obj;
const char *uri;
char *cache_file;
- EBookBackendCacheClass *klass;
- GObjectClass *parent_class;
/* Invoke parent constructor. */
- klass = E_BOOK_BACKEND_CACHE_CLASS (g_type_class_peek (E_TYPE_BOOK_BACKEND_CACHE));
- parent_class = G_OBJECT_CLASS (g_type_class_peek_parent (klass));
obj = parent_class->constructor (type,
n_construct_properties,
construct_properties);
char *
e_book_backend_cache_get_time (EBookBackendCache *cache)
{
- g_return_val_if_fail (E_IS_BOOK_BACKEND_CACHE (cache), 0);
- return e_file_cache_get_object (E_FILE_CACHE (cache), "last_update_time");
+ g_return_val_if_fail (E_IS_BOOK_BACKEND_CACHE (cache), NULL);
+ return g_strdup (e_file_cache_get_object (E_FILE_CACHE (cache), "last_update_time"));
}
if (!uid) {
printf ("no uid\n");
printf("name:%s, email:%s\n", e_contact_get (contact, E_CONTACT_GIVEN_NAME), e_contact_get (contact, E_CONTACT_EMAIL_1));
- return NULL;
+ return FALSE;
}
string_to_dbt (uid, &uid_dbt);
static void
print_email (EContact *contact)
{
- char *file_as = e_contact_get_const (contact, E_CONTACT_FILE_AS);
- char *name_or_org = e_contact_get_const (contact, E_CONTACT_NAME_OR_ORG);
+ const char *file_as = e_contact_get_const (contact, E_CONTACT_FILE_AS);
+ const char *name_or_org = e_contact_get_const (contact, E_CONTACT_NAME_OR_ORG);
GList *emails, *e;
printf ("Contact: %s\n", file_as);
static void
print_email (EContact *contact)
{
- char *file_as = e_contact_get_const (contact, E_CONTACT_FILE_AS);
- char *name_or_org = e_contact_get_const (contact, E_CONTACT_NAME_OR_ORG);
+ const char *file_as = e_contact_get_const (contact, E_CONTACT_FILE_AS);
+ const char *name_or_org = e_contact_get_const (contact, E_CONTACT_NAME_OR_ORG);
GList *emails, *e;
printf ("Contact: %s\n", file_as);
+2007-04-01 Matthew Barnes <mbarnes@redhat.com>
+
+ * libedata-cal/e-data-cal-factory.c (get_backend_factory):
+ * backends/groupwise/e-cal-backend-groupwise-utils
+ (e_cal_backend_groupwise_set_attachments_from_comp),
+ (e_gw_connection_get_freebusy_info):
+ * backends/caldav/e-cal-backend-caldav.c (process_object):
+ * backends/contacts/e-cal-backend-contacts.c (book_record_new),
+ (contact_record_cb_new), (source_group_removed_cb),
+ (cdate_to_icaltime), (create_component):
+ * libecal/e-cal-listener.c (ECalListenerPrivate):
+ Fix some compiler warnings. Patch from Kjartan Maraas.
+
2007-03-29 Matthew Barnes <mbarnes@redhat.com>
* backends/file/e-cal-backend-file.c:
case ICAL_METHOD_REPLY:
if (online) {
- CalDAVObject object = { 0, };
+ CalDAVObject object = { NULL, };
if (ccomp) {
const char *href;
book_record_new (ECalBackendContacts *cbc, ESource *source)
{
EBook *book;
- GList *fields = 0;
+ GList *fields = NULL;
EBookQuery *query;
EBookView *book_view;
BookRecord *br;
cb_data->cbc = cbc;
cb_data->sexp = sexp;
- cb_data->result = 0;
+ cb_data->result = NULL;
return cb_data;
}
static void
contact_record_cb_free (ContactRecordCB *cb_data)
{
- g_list_foreach (cb_data->result, (GFunc) g_free, 0);
+ g_list_foreach (cb_data->result, (GFunc) g_free, NULL);
g_list_free (cb_data->result);
g_free (cb_data);
source_group_removed_cb (ESourceList *source_list, ESourceGroup *group, gpointer user_data)
{
ECalBackendContacts *cbc = E_CAL_BACKEND_CONTACTS (user_data);
- GSList *i = 0;
+ GSList *i = NULL;
g_return_if_fail (cbc);
ret.is_date = TRUE;
ret.is_utc = FALSE;
ret.zone = NULL;
+ ret.is_daylight = FALSE;
ret.hour = ret.minute = ret.second = 0;
struct icalrecurrencetype r;
GSList recur_list;
- g_return_val_if_fail (E_IS_CAL_BACKEND_CONTACTS (cbc), 0);
+ g_return_val_if_fail (E_IS_CAL_BACKEND_CONTACTS (cbc), NULL);
if (!cdate)
return NULL;
EGwItemAttachment *attach_item;
char *file_contents, *encoded_data;
- int file_len;
+ guint file_len;
char *attach_filename_full, *filename;
const char *uid;
if (tmp) {
start = soup_soap_parameter_get_string_value (tmp);
t = e_gw_connection_get_date_from_string (start);
- itt = icaltime_from_timet_with_zone (t, 0, default_zone ? default_zone : 0);
+ itt = icaltime_from_timet_with_zone (t, 0, default_zone ? default_zone : NULL);
ipt.start = itt;
}
if (tmp) {
end = soup_soap_parameter_get_string_value (tmp);
t = e_gw_connection_get_date_from_string (end);
- itt = icaltime_from_timet_with_zone (t, 0, default_zone ? default_zone : 0);
+ itt = icaltime_from_timet_with_zone (t, 0, default_zone ? default_zone : NULL);
ipt.end = itt;
}
icalprop = icalproperty_new_freebusy (ipt);
gpointer fn_data;
/* Whether notification is desired */
- gboolean notify : 1;
+ guint notify : 1;
};
/* Signal IDs */
kinds = g_hash_table_lookup (methods, method);
if (!kinds)
- return 0;
+ return NULL;
factory = g_hash_table_lookup (kinds, GINT_TO_POINTER (kind));
#endif
static char *
-test_new_system_calendar()
+test_new_system_calendar(void)
{
ECal *cal;
char *uri;
}
static char *
-test_new_system_tasks()
+test_new_system_tasks(void)
{
ECal *cal;
char *uri;
}
static char *
-test_new_system_memos()
+test_new_system_memos(void)
{
ECal *cal;
char *uri;
+2007-04-01 Matthew Barnes <mbarnes@redhat.com>
+
+ * camel-mime-utils.c (rfc2047_encode_word):
+ Properly escape what would otherwise be a trigraph (??=).
+ Patch from Kjartan Maraas.
+
+ * camel-search-private.c (header_match):
+ * camel-url.c (camel_url_to_string):
+ Fix a compiler warning. Patch from Kjartan Maraas.
+
2007-03-29 Matthew Barnes <mbarnes@redhat.com>
* camel-private.h:
proclen = -1;
p = inptr;
i = 0;
- while (p < (in+len) && convlen < (75 - strlen("=?utf-8?q\?\?="))) {
+ while (p < (in+len) && convlen < (75 - strlen("=?utf-8?q?\?="))) {
unsigned char c = *p++;
if (c >= 0xc0)
else
convlen += 3;
}
- if (proclen >= 0 && proclen < i && convlen < (75 - strlen("=?utf-8?q\?\?=")))
+ if (proclen >= 0 && proclen < i && convlen < (75 - strlen("=?utf-8?q?\?=")))
proclen = i;
/* well, we probably have broken utf8, just copy it anyway what the heck */
if (proclen == -1) {
/* from dan the man, if we have mixed case, perform a case-sensitive match,
otherwise not */
p = (const unsigned char *)match;
- while (c = camel_utf8_getc(&p)) {
+ while ((c = camel_utf8_getc(&p))) {
if (g_unichar_isupper(c)) {
switch (how) {
case CAMEL_SEARCH_MATCH_EXACT:
#ifdef G_OS_WIN32
if (url->protocol && !strcmp(url->protocol, "file"))
return g_filename_to_uri(url->path, url->host, NULL);
-#endif G_OS_WIN32
+#endif
str = g_string_sized_new (20);
+2007-04-01 Matthew Barnes <mbarnes@redhat.com>
+
+ * camel-groupwise-store.c:
+ Disable unused functions. Patch from Kjartan Maraas.
+
2007-03-29 Matthew Barnes <mbarnes@redhat.com>
* camel-groupwise-utils.c:
return FALSE;
}
+#if 0
static void
groupwise_disconnect_cleanup (CamelService *service, gboolean clean, CamelException *ex)
{
groupwise_store->priv = NULL;
}
}
+#endif
static gboolean
groupwise_disconnect (CamelService *service, gboolean clean, CamelException *ex)
CamelException ex;
};
+#if 0
static void
store_refresh_refresh (CamelSession *session, CamelSessionThreadMsg *msg)
{
store_refresh_refresh,
store_refresh_free,
};
+#endif
/*** Thread stuff ends ***/
+2007-04-01 Matthew Barnes <mbarnes@redhat.com>
+
+ * camel-pop3-store.c (connect_to_server):
+ Fix a compiler warning. Patch from Kjartan Maraas.
+
2007-03-26 Matthew Barnes <mbarnes@redhat.com>
* camel-pop3-folder.c:
guint32 flags = 0;
int clean_quit = TRUE;
int ret;
- gchar *delete_days;
+ const gchar *delete_days;
if (ssl_mode != MODE_CLEAR) {
#ifdef HAVE_SSL
static char*
receipt_policy_to_str (EAccountReceiptPolicy val)
{
- char *ret = 0;
+ char *ret = NULL;
switch (val) {
case E_ACCOUNT_RECEIPT_NEVER:
static void e_dlist_init(EDList *v)
{
v->head = (EDListNode *)&v->tail;
- v->tail = 0;
+ v->tail = NULL;
v->tailpred = (EDListNode *)&v->head;
}
iterator->iterator = iterator->iterator->prev;
} else {
if (iterator->iterator->next)
- g_list_prepend(iterator->iterator->next, data);
+ iterator->iterator->next = g_list_prepend(iterator->iterator->next, data);
else
- g_list_append(iterator->iterator, data);
+ iterator->iterator = g_list_append(iterator->iterator, data);
iterator->iterator = iterator->iterator->next;
}
e_list_invalidate_iterators(iterator->list, E_ITERATOR(iterator));
r->value.number = argv[0]->value.bool != 0;
break;
case ESEXP_RES_STRING:
- r->value.number = strtoul(argv[0]->value.string, 0, 10);
+ r->value.number = strtoul(argv[0]->value.string, NULL, 10);
break;
default:
e_sexp_result_free(f, r);
e_memchunk_destroy(s->term_chunks);
e_memchunk_destroy(s->result_chunks);
- g_scanner_scope_foreach_symbol(s->scanner, 0, free_symbol, 0);
+ g_scanner_scope_foreach_symbol(s->scanner, 0, free_symbol, NULL);
g_scanner_destroy(s->scanner);
#ifdef E_SEXP_IS_G_OBJECT
const unsigned char *inptr, *inend, *prev, *pat;
register size_t inlen = buflen;
struct _trie_state *q;
- struct _trie_match *m;
+ struct _trie_match *m = NULL; /* init to please gcc */
gunichar c;
inptr = (const unsigned char *) buffer;
semi = memchr (uri_string, ';', end - uri_string);
if (semi) {
if (semi[1]) {
- const char *cur, *p, *eq;
+ const char *cur, *ptr, *eq;
char *name, *value;
- for (cur = semi + 1; cur < end; cur = p + 1) {
- p = memchr (cur, ';', end - cur);
- if (!p)
- p = end;
- eq = memchr (cur, '=', p - cur);
+ for (cur = semi + 1; cur < end; cur = ptr + 1) {
+ ptr = memchr (cur, ';', end - cur);
+ if (!ptr)
+ ptr = end;
+ eq = memchr (cur, '=', ptr - cur);
if (eq) {
name = g_strndup (cur, eq - cur);
- value = g_strndup (eq + 1, p - (eq + 1));
+ value = g_strndup (eq + 1, ptr - (eq + 1));
uri_decode (value);
} else {
- name = g_strndup (cur, p - cur);
+ name = g_strndup (cur, ptr - cur);
value = g_strdup ("");
}
uri_decode (name);
+2007-04-01 Matthew Barnes <mbarnes@redhat.com>
+
+ * e-source-selector.c (group_search_function):
+ Fix a compiler warning. Patch from Kjartan Maraas.
+
+ * e-passwords.c: Use #ifdef WITH_GNOME_KEYRING, not #if.
+ Patch from Kjartan Maraas.
+
2007-03-29 Matthew Barnes <mbarnes@redhat.com>
* e-source-selector.c:
#include "libedataserver/e-msgport.h"
#include "libedataserver/e-url.h"
-#if WITH_GNOME_KEYRING
+#ifdef WITH_GNOME_KEYRING
#include <gnome-keyring.h>
#endif
}
/* the functions that actually do the work */
-#if WITH_GNOME_KEYRING
+#ifdef WITH_GNOME_KEYRING
static void
ep_clear_passwords_keyring(EPassMsg *msg)
{
return TRUE;
}
-#if WITH_GNOME_KEYRING
+#ifdef WITH_GNOME_KEYRING
static void
ep_forget_passwords_keyring(EPassMsg *msg)
{
return path;
}
-#if WITH_GNOME_KEYRING
+#ifdef WITH_GNOME_KEYRING
static void
ep_remember_password_keyring(EPassMsg *msg)
{
e_msgport_reply(&msg->msg);
}
-#if WITH_GNOME_KEYRING
+#ifdef WITH_GNOME_KEYRING
static void
ep_forget_password_keyring (EPassMsg *msg)
{
}
-#if WITH_GNOME_KEYRING
+#ifdef WITH_GNOME_KEYRING
static void
ep_get_password_keyring (EPassMsg *msg)
{
msg->oldpass = msg->password;
ep_add_password(msg);
}
-#if WITH_GNOME_KEYRING
+#ifdef WITH_GNOME_KEYRING
if (*msg->remember && type == E_PASSWORDS_REMEMBER_FOREVER) {
if (gnome_keyring_is_available())
ep_remember_password_keyring(msg);
mw = (EPassMsg *)request_list.head;
mn = (EPassMsg *)mw->msg.ln.next;
while (mn) {
-#if WITH_GNOME_KEYRING
+#ifdef WITH_GNOME_KEYRING
if ((mw->dispatch == (gnome_keyring_is_available() ? ep_forget_password_keyring : ep_forget_password_file)
#else
if ((mw->dispatch == ep_forget_password_file
#endif
-#if WITH_GNOME_KEYRING
+#ifdef WITH_GNOME_KEYRING
|| mw->dispatch == (gnome_keyring_is_available() ? ep_get_password_keyring : ep_get_password_file)
#else
|| mw->dispatch == ep_get_password_file
gtk_widget_grab_focus (msg->entry);
if ((msg->flags & E_PASSWORDS_REPROMPT)) {
-#if WITH_GNOME_KEYRING
+#ifdef WITH_GNOME_KEYRING
if (gnome_keyring_is_available())
ep_get_password_keyring(msg);
else
void
e_passwords_forget_passwords (void)
{
-#if WITH_GNOME_KEYRING
+#ifdef WITH_GNOME_KEYRING
EPassMsg *msg = ep_msg_new(gnome_keyring_is_available() ? ep_forget_passwords_keyring : ep_forget_passwords_file);
#else
EPassMsg *msg = ep_msg_new(ep_forget_passwords_file);
void
e_passwords_clear_passwords (const char *component_name)
{
-#if WITH_GNOME_KEYRING
+#ifdef WITH_GNOME_KEYRING
EPassMsg *msg = ep_msg_new(gnome_keyring_is_available() ? ep_clear_passwords_keyring : ep_clear_passwords_file);
#else
EPassMsg *msg = ep_msg_new(ep_clear_passwords_file);
g_return_if_fail(component_name != NULL);
g_return_if_fail(key != NULL);
-#if WITH_GNOME_KEYRING
+#ifdef WITH_GNOME_KEYRING
msg = ep_msg_new(gnome_keyring_is_available() ? ep_remember_password_keyring : ep_remember_password_file);
#else
msg = ep_msg_new(ep_remember_password_file);
g_return_if_fail(component_name != NULL);
g_return_if_fail(key != NULL);
-#if WITH_GNOME_KEYRING
+#ifdef WITH_GNOME_KEYRING
msg = ep_msg_new(gnome_keyring_is_available() ? ep_forget_password_keyring : ep_forget_password_file);
#else
msg = ep_msg_new(ep_forget_password_file);
g_return_val_if_fail(component_name != NULL, NULL);
g_return_val_if_fail(key != NULL, NULL);
-#if WITH_GNOME_KEYRING
+#ifdef WITH_GNOME_KEYRING
msg = ep_msg_new(gnome_keyring_is_available() ? ep_get_password_keyring : ep_get_password_file);
#else
msg = ep_msg_new(ep_get_password_file);
gpointer dummy)
{
void *data;
- char *name=NULL;
+ const char *name = NULL;
gboolean status = TRUE;
gtk_tree_model_get (model, iter, 0, &data, -1);
+2007-04-01 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Various code clean-ups from Kjartan Maraas.
+
+ * storage/exchange-account.h (exchange_account_set_password):
+ Function declaration should not be subject to conditional compilation.
+
+ * storage/e-folder-type-registry.c
+ (e_folder_type_registry_get_display_name_for_type),
+ (e_folder_type_registry_get_description_for_type):
+ Return NULL, not FALSE.
+
+ * lib/e2k-rule-xml.c: Declare private arrays as static.
+
+ * lib/e2k-context.c (e2k_context_new), (e2k_debug_print_request),
+ (e2k_debug_print_response): Use NULL instead of zero (0).
+
+ * lib/e2k-context.c (do_notification):
+ g_io_channel_read_chars() returns GIOStatus, not GIOError.
+
+ * lib/e2k-autoconfig.c (e2k_autoconfig_check_exchange):
+ Fix a compiler warning.
+
2007-03-26 Matthew Barnes <mbarnes@redhat.com>
* storage/e-folder-exchange.c:
E2kResultIter *iter;
E2kResult *results;
GByteArray *entryid;
- const char *exchange_dn, *timezone, *prop, *hrefs[] = { "" };
+ const char *exchange_dn, *timezone, *hrefs[] = { "" };
+ xmlChar *prop;
char *body;
int len;
E2kUri *euri;
g_object_ref (ctx);
ctx->priv->get_local_address_sock =
soup_socket_client_new_async (
- suri->host, suri->port, FALSE,
+ suri->host, suri->port, NULL,
got_connection, ctx);
soup_uri_free (suri);
msg->method, uri->path,
uri->query ? "?" : "",
uri->query ? uri->query : "",
- msg, (unsigned long)time (0));
+ msg, (unsigned long)time (NULL));
if (note)
printf (" [%s]\n", note);
else
{
printf ("%d %s\nE2k-Debug: %p @ %lu\n",
msg->status_code, msg->reason_phrase,
- msg, time (0));
+ msg, time (NULL));
if (e2k_debug_level > 1) {
soup_message_foreach_header (msg->response_headers,
print_header, NULL);
E2kSubscription *sub;
char buffer[1024], *id, *lasts;
gsize len;
- GIOError err;
+ GIOStatus status;
- err = g_io_channel_read_chars (source, buffer, sizeof (buffer) - 1, &len, NULL);
- if (err != G_IO_ERROR_NONE && err != G_IO_ERROR_AGAIN) {
- g_warning ("do_notification I/O error: %d (%s)", err,
+ status = g_io_channel_read_chars (source, buffer, sizeof (buffer) - 1, &len, NULL);
+ if (status != G_IO_STATUS_NORMAL && status != G_IO_STATUS_AGAIN) {
+ g_warning ("do_notification I/O error: %d (%s)", status,
g_strerror (errno));
return FALSE;
}
#include "e2k-utils.h"
#include "mapi.h"
-const char *contains_types[] = { NULL, "contains", NULL, NULL, NULL, "not contains", NULL, NULL };
-const char *subject_types[] = { "is", "contains", "starts with", NULL, "is not", "not contains", "not starts with", NULL };
+static const char *contains_types[] = { NULL, "contains", NULL, NULL, NULL, "not contains", NULL, NULL };
+static const char *subject_types[] = { "is", "contains", "starts with", NULL, "is not", "not contains", "not starts with", NULL };
#define E2K_FL_NEGATE 4
#define E2K_FL_MAX 8
return map[fuzzy_level];
}
-const char *is_types[] = { NULL, NULL, NULL, NULL, "is", "is not" };
-const char *include_types[] = { NULL, NULL, NULL, NULL, "include", "not include" };
-const char *date_types[] = { "before", "before", "after", "after", NULL, NULL };
-const char *size_types[] = { "less than", "less than", "greater than", "greater than", NULL, NULL };
+static const char *is_types[] = { NULL, NULL, NULL, NULL, "is", "is not" };
+static const char *include_types[] = { NULL, NULL, NULL, NULL, "include", "not include" };
+static const char *date_types[] = { "before", "before", "after", "after", NULL, NULL };
+static const char *size_types[] = { "less than", "less than", "greater than", "greater than", NULL, NULL };
#if 0
static gboolean
folder_type = get_folder_type (folder_type_registry, type_name);
if (folder_type == NULL)
- return FALSE;
+ return NULL;
return folder_type->display_name;
}
folder_type = get_folder_type (folder_type_registry, type_name);
if (folder_type == NULL)
- return FALSE;
+ return NULL;
return folder_type->description;
}
E2kResult *results;
int nresults = 0, mode;
GByteArray *entryid;
- const char *timezone;
+ const char *tz;
E2kGlobalCatalogStatus gcstatus;
E2kGlobalCatalogEntry *entry;
E2kOperation gcop;
if (entryid)
account->legacy_exchange_dn = g_strdup (e2k_entryid_to_dn (entryid));
- timezone = e2k_properties_get_prop (results[0].props, E2K_PR_EXCHANGE_TIMEZONE);
- if (timezone)
- account->default_timezone = g_strdup (timezone);
+ tz = e2k_properties_get_prop (results[0].props, E2K_PR_EXCHANGE_TIMEZONE);
+ if (tz)
+ account->default_timezone = g_strdup (tz);
}
if (!setup_account_hierarchies (account)) {
int
exchange_account_check_password_expiry (ExchangeAccount *account)
{
- E2kGlobalCatalogEntry *entry;
+ E2kGlobalCatalogEntry *entry; /* This is never set before it's used! */
int max_pwd_age_days = -1;
g_return_val_if_fail (EXCHANGE_IS_ACCOUNT (account), 0);
char *exchange_account_get_password (ExchangeAccount *acct);
-#ifdef HAVE_KRB5
ExchangeAccountResult exchange_account_set_password (ExchangeAccount *acct,
char *old_password,
char *new_password);
-#endif
void exchange_account_forget_password (ExchangeAccount *acct);
+2007-04-01 Matthew Barnes <mbarnes@redhat.com>
+
+ ** Various code-cleanups from Kjartan Maraas.
+
+ * e-gw-recur-utils.c: Declare private array as static.
+
+ * e-gw-message.c (debug_handler), (setup_debug):
+ Use NULL instead of zero (0).
+
2007-03-26 Matthew Barnes <mbarnes@redhat.com>
* e-gw-connection.c:
{
EGwItem *item;
char *item_type;
- SoupSoapParameter *subparam, *child, *category_param, *attachment_param;
+ SoupSoapParameter *subparameter, *child, *category_param, *attachment_param;
gboolean is_group_item = TRUE;
GList *user_email = NULL;
e_gw_item_set_email_list (item, user_email);
/* If the parameter consists of changes - populate deltas */
- subparam = soup_soap_parameter_get_first_child_by_name (param, "changes");
- if (subparam) {
- SoupSoapParameter *changes = subparam;
- subparam = soup_soap_parameter_get_first_child_by_name (changes, "add");
- if (!subparam)
- subparam = soup_soap_parameter_get_first_child_by_name (changes, "delete");
- if (!subparam)
- subparam = soup_soap_parameter_get_first_child_by_name (changes, "update");
- }
- else subparam = param; /* The item is a complete one, not a delta */
+ subparameter = soup_soap_parameter_get_first_child_by_name (param, "changes");
+ if (subparameter) {
+ SoupSoapParameter *changes = subparameter;
+ subparameter = soup_soap_parameter_get_first_child_by_name (changes, "add");
+ if (!subparameter)
+ subparameter = soup_soap_parameter_get_first_child_by_name (changes, "delete");
+ if (!subparameter)
+ subparameter = soup_soap_parameter_get_first_child_by_name (changes, "update");
+ }
+ else subparameter = param; /* The item is a complete one, not a delta */
/* now add all properties to the private structure */
- for (child = soup_soap_parameter_get_first_child (subparam);
+ for (child = soup_soap_parameter_get_first_child (subparameter);
child != NULL;
child = soup_soap_parameter_get_next_child (child)) {
const char *name;
{
g_print ("%d %s\nSOAP-Debug: %p @ %lu\n",
msg->status_code, msg->reason_phrase,
- msg, time (0));
+ msg, time (NULL));
/* print headers */
soup_message_foreach_header (msg->response_headers, print_header, NULL);
SOUP_MESSAGE (msg)->method, suri->path,
suri->query ? "?" : "",
suri->query ? suri->query : "",
- msg, (unsigned long) time (0));
+ msg, (unsigned long) time (NULL));
/* print message headers */
print_header ("Host", suri->host, NULL);
#endif
#include "e-gw-recur-utils.h"
-const char *days_of_week[7] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
+static const char *days_of_week[7] = {"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"};
const char *
e_gw_recur_get_day_of_week (short day)
}
EGwSendOptions *
-e_gw_sendoptions_new ()
+e_gw_sendoptions_new (void)
{
EGwSendOptions *opts;