Changeset e618d85 for protocols/skype


Ignore:
Timestamp:
2012-01-30T21:23:58Z (12 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
8d96b78
Parents:
441b9dd (diff), 85341dd (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging (what is hopefully) a fix for #901.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/skype/skype.c

    r441b9dd re618d85  
    22 *  skype.c - Skype plugin for BitlBee
    33 *
    4  *  Copyright (c) 2007, 2008, 2009, 2010, 2011 by Miklos Vajna <vmiklos@frugalware.org>
     4 *  Copyright (c) 2007, 2008, 2009, 2010, 2011, 2012 by Miklos Vajna <vmiklos@frugalware.org>
    55 *
    66 *  This program is free software; you can redistribute it and/or modify
     
    386386        else if (!strncmp(ptr, "LASTONLINETIMESTAMP ", 20))
    387387                sd->info_seen = g_strdup(ptr + 20);
    388         else if (!strncmp(ptr, "BIRTHDAY ", 9))
    389                 sd->info_birthday = g_strdup(ptr + 9);
    390388        else if (!strncmp(ptr, "SEX ", 4))
    391389                sd->info_sex = g_strdup(ptr + 4);
     
    401399                sd->info_homepage = g_strdup(ptr + 9);
    402400        else if (!strncmp(ptr, "ABOUT ", 6)) {
    403                 sd->info_about = g_strdup(ptr + 6);
     401                /* Support multiple about lines. */
     402                if (!sd->info_about)
     403                        sd->info_about = g_strdup(ptr + 6);
     404                else {
     405                        GString *st = g_string_new(sd->info_about);
     406                        g_string_append_printf(st, "\n%s", ptr + 6);
     407                        g_free(sd->info_about);
     408                        sd->info_about = g_strdup(st->str);
     409                        g_string_free(st, TRUE);
     410                }
     411        }
     412        else if (!strncmp(ptr, "BIRTHDAY ", 9)) {
     413                sd->info_birthday = g_strdup(ptr + 9);
    404414
    405415                GString *st = g_string_new("Contact Information\n");
     
    410420                                        sd->info_fullname);
    411421                        g_free(sd->info_fullname);
     422                        sd->info_fullname = NULL;
    412423                }
    413424                if (sd->info_phonehome) {
     
    416427                                        sd->info_phonehome);
    417428                        g_free(sd->info_phonehome);
     429                        sd->info_phonehome = NULL;
    418430                }
    419431                if (sd->info_phoneoffice) {
     
    422434                                        sd->info_phoneoffice);
    423435                        g_free(sd->info_phoneoffice);
     436                        sd->info_phoneoffice = NULL;
    424437                }
    425438                if (sd->info_phonemobile) {
     
    428441                                        sd->info_phonemobile);
    429442                        g_free(sd->info_phonemobile);
     443                        sd->info_phonemobile = NULL;
    430444                }
    431445                g_string_append_printf(st, "Personal Information\n");
     
    435449                                        "Contacts: %s\n", sd->info_nrbuddies);
    436450                        g_free(sd->info_nrbuddies);
     451                        sd->info_nrbuddies = NULL;
    437452                }
    438453                if (sd->info_tz) {
     
    447462                        }
    448463                        g_free(sd->info_tz);
     464                        sd->info_tz = NULL;
    449465                }
    450466                if (sd->info_seen) {
     
    458474                        }
    459475                        g_free(sd->info_seen);
     476                        sd->info_seen = NULL;
    460477                }
    461478                if (sd->info_birthday) {
     
    477494                        }
    478495                        g_free(sd->info_birthday);
     496                        sd->info_birthday = NULL;
    479497                }
    480498                if (sd->info_sex) {
     
    487505                        }
    488506                        g_free(sd->info_sex);
     507                        sd->info_sex = NULL;
    489508                }
    490509                if (sd->info_language) {
     
    499518                        }
    500519                        g_free(sd->info_language);
     520                        sd->info_language = NULL;
    501521                }
    502522                if (sd->info_country) {
     
    511531                        }
    512532                        g_free(sd->info_country);
     533                        sd->info_country = NULL;
    513534                }
    514535                if (sd->info_province) {
     
    517538                                        "Region: %s\n", sd->info_province);
    518539                        g_free(sd->info_province);
     540                        sd->info_province = NULL;
    519541                }
    520542                if (sd->info_city) {
     
    523545                                        "City: %s\n", sd->info_city);
    524546                        g_free(sd->info_city);
     547                        sd->info_city = NULL;
    525548                }
    526549                if (sd->info_homepage) {
     
    529552                                        "Homepage: %s\n", sd->info_homepage);
    530553                        g_free(sd->info_homepage);
     554                        sd->info_homepage = NULL;
    531555                }
    532556                if (sd->info_about) {
     
    535559                                        sd->info_about);
    536560                        g_free(sd->info_about);
     561                        sd->info_about = NULL;
    537562                }
    538563                imcb_log(ic, "%s", st->str);
     
    14461471        skype_printf(ic, "GET USER %s TIMEZONE\n", nick);
    14471472        skype_printf(ic, "GET USER %s LASTONLINETIMESTAMP\n", nick);
    1448         skype_printf(ic, "GET USER %s BIRTHDAY\n", nick);
    14491473        skype_printf(ic, "GET USER %s SEX\n", nick);
    14501474        skype_printf(ic, "GET USER %s LANGUAGE\n", nick);
     
    14541478        skype_printf(ic, "GET USER %s HOMEPAGE\n", nick);
    14551479        skype_printf(ic, "GET USER %s ABOUT\n", nick);
     1480        /*
     1481         * Hack: we query the bithday property which is always a single line,
     1482         * so we can send the collected properties to the user when we have
     1483         * this one.
     1484         */
     1485        skype_printf(ic, "GET USER %s BIRTHDAY\n", nick);
    14561486}
    14571487
Note: See TracChangeset for help on using the changeset viewer.