~ubuntu-branches/ubuntu/precise/evolution-data-server/precise

« back to all changes in this revision

Viewing changes to camel/providers/pop3/camel-pop3-store.c

  • Committer: Bazaar Package Importer
  • Author(s): Mathieu Trudel-Lapierre
  • Date: 2011-07-14 15:00:38 UTC
  • Revision ID: james.westby@ubuntu.com-20110714150038-aha2wqajqp2i8s5v
Tags: 3.1.3.1-0ubuntu3
debian/patches/999git_EDS_3_1_3_1_to_f94a069.patch: apply changes from git
branch up to commit f94a069.

Show diffs side-by-side

added added

removed removed

Lines of Context:
314
314
        CamelURL *url;
315
315
        guchar *line, *resp;
316
316
        CamelSasl *sasl;
 
317
        gchar *string;
317
318
        guint len;
318
319
        gint ret;
319
320
 
331
332
                return -1;
332
333
        }
333
334
 
334
 
        if (camel_stream_printf((CamelStream *)stream, "AUTH %s\r\n", mech) == -1)
 
335
        string = g_strdup_printf ("AUTH %s\r\n", mech);
 
336
        ret = camel_stream_write_string (
 
337
                CAMEL_STREAM (stream), string, cancellable, error);
 
338
        g_free (string);
 
339
 
 
340
        if (ret == -1)
335
341
                goto ioerror;
336
342
 
337
343
        while (1) {
359
365
                if (strncmp((gchar *) line, "+ ", 2) != 0
360
366
                    || camel_sasl_get_authenticated (sasl)
361
367
                    || (resp = (guchar *) camel_sasl_challenge_base64_sync (sasl, (const gchar *) line+2, cancellable, NULL)) == NULL) {
362
 
                        camel_stream_printf((CamelStream *)stream, "*\r\n");
 
368
                        camel_stream_write_string (
 
369
                                CAMEL_STREAM (stream), "*\r\n", NULL, NULL);
363
370
                        camel_pop3_stream_line (stream, &line, &len, NULL, NULL);
364
371
                        g_set_error (
365
372
                                error, CAMEL_SERVICE_ERROR,
370
377
                        goto done;
371
378
                }
372
379
 
373
 
                ret = camel_stream_printf((CamelStream *)stream, "%s\r\n", resp);
 
380
                string = g_strdup_printf ("%s\r\n", resp);
 
381
                ret = camel_stream_write_string (
 
382
                        CAMEL_STREAM (stream), string, cancellable, error);
 
383
                g_free (string);
 
384
 
374
385
                g_free (resp);
 
386
 
375
387
                if (ret == -1)
376
388
                        goto ioerror;
377
389