aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/sendmail/camel-sendmail-transport.c
diff options
context:
space:
mode:
authorPeter Williams <peterw@src.gnome.org>2000-08-11 01:30:50 +0800
committerPeter Williams <peterw@src.gnome.org>2000-08-11 01:30:50 +0800
commit8cb514d6dd9497893a35a089d07a132d51263ee7 (patch)
tree9f4e5d1f929da7e0be900919753d419fe4c9c61a /camel/providers/sendmail/camel-sendmail-transport.c
parentbcbb63c59f80eb4e684036c5ef58ab141fb01b03 (diff)
downloadgsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.gz
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.bz2
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.lz
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.xz
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.tar.zst
gsoc2013-evolution-8cb514d6dd9497893a35a089d07a132d51263ee7.zip
Merge with camel-async.
svn path=/trunk/; revision=4687
Diffstat (limited to 'camel/providers/sendmail/camel-sendmail-transport.c')
-rw-r--r--camel/providers/sendmail/camel-sendmail-transport.c30
1 files changed, 12 insertions, 18 deletions
diff --git a/camel/providers/sendmail/camel-sendmail-transport.c b/camel/providers/sendmail/camel-sendmail-transport.c
index 3facc42676..c53512ccb4 100644
--- a/camel/providers/sendmail/camel-sendmail-transport.c
+++ b/camel/providers/sendmail/camel-sendmail-transport.c
@@ -64,25 +64,19 @@ camel_sendmail_transport_class_init (CamelSendmailTransportClass *camel_sendmail
camel_transport_class->send_to = _send_to;
}
-GtkType
+CamelType
camel_sendmail_transport_get_type (void)
{
- static GtkType camel_sendmail_transport_type = 0;
+ static CamelType camel_sendmail_transport_type = CAMEL_INVALID_TYPE;
- if (!camel_sendmail_transport_type) {
- GtkTypeInfo camel_sendmail_transport_info =
- {
- "CamelSendmailTransport",
- sizeof (CamelSendmailTransport),
- sizeof (CamelSendmailTransportClass),
- (GtkClassInitFunc) camel_sendmail_transport_class_init,
- (GtkObjectInitFunc) NULL,
- /* reserved_1 */ NULL,
- /* reserved_2 */ NULL,
- (GtkClassInitFunc) NULL,
- };
-
- camel_sendmail_transport_type = gtk_type_unique (CAMEL_TRANSPORT_TYPE, &camel_sendmail_transport_info);
+ if (camel_sendmail_transport_type == CAMEL_INVALID_TYPE) {
+ camel_sendmail_transport_type = camel_type_register (CAMEL_TRANSPORT_TYPE, "CamelSendmailTransport",
+ sizeof (CamelSendmailTransport),
+ sizeof (CamelSendmailTransportClass),
+ (CamelObjectClassInitFunc) camel_sendmail_transport_class_init,
+ NULL,
+ (CamelObjectInitFunc) NULL,
+ NULL);
}
return camel_sendmail_transport_type;
@@ -148,13 +142,13 @@ _send_internal (CamelMedium *message, char **argv, CamelException *ex)
out = camel_stream_fs_new_with_fd (fd[1]);
if (camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), out) == -1
|| camel_stream_close(out) == -1) {
- gtk_object_unref (GTK_OBJECT (out));
+ camel_object_unref (CAMEL_OBJECT (out));
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
"Could not send message: %s",
strerror(errno));
return FALSE;
}
- gtk_object_unref (GTK_OBJECT (out));
+ camel_object_unref (CAMEL_OBJECT (out));
/* Wait for sendmail to exit. */
while (waitpid (pid, &wstat, 0) == -1 && errno == EINTR)