Changeset 1ba7e8f for protocols/oscar


Ignore:
Timestamp:
2008-02-15T17:38:57Z (17 years ago)
Author:
ulim <a.sporto+bee@…>
Branches:
master
Children:
506e61b
Parents:
0fbd3a6d (diff), eeb85a8 (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:

Merged with upstream r328

Wilmer van der Gaast 2008-02-11 Got rid of some noise at startup: complaining when the default configuration

Wilmer van der Gaast 2008-02-10 Added support for password-protected Jabber chatrooms.
Wilmer van der Gaast 2008-02-10 Making AI_ADDRCONFIG optional, it doesn't exist on at least NetBSD and
Wilmer van der Gaast 2008-02-09 Restored "add -tmp". A bit hackish, but it will do for now.
Wilmer van der Gaast 2008-02-07 Fixed getnameinfo() calls, this fixes Solaris stability issues. Thanks to
Wilmer van der Gaast 2008-02-04 Added bogus G_GNUC_MALLOC to restore GLib 2.4 compatibility (hopefully).
Wilmer van der Gaast 2008-02-03 Messages from the user are also included in backlogs when joining a Jabber
Wilmer van der Gaast 2008-02-03 Disabling "Unknown command" warnings since they're very noisy and pretty
Wilmer van der Gaast 2008-02-03 Implemented XEP-0115. This adds some info to the <presence/> tags so
Wilmer van der Gaast 2008-02-03 Saner garbage collection of cached packets in the Jabber module. Now
Wilmer van der Gaast 2008-02-02 Added help_free() and cleaned up some very stale help-related stuff I
Wilmer van der Gaast 2008-01-30 Fixed handling of OSCAR multi-part messages... They're not arrays, they're
Wilmer van der Gaast 2008-01-24 Keeping track of valid Jabber connections so _connected() events will be
Wilmer van der Gaast 2008-01-24 Fixed two valgrind warnings (partially uninitialized "struct tm" vars.)
Wilmer van der Gaast 2008-01-20 The Jabber module now uses imcb_chat_log() instead of imcb_log() where
Wilmer van der Gaast 2008-01-20 Added imcb_chat_log() for chatroom system messages, so they can be
Wilmer van der Gaast 2008-01-20 GET_BUDDY_FIRST wasn't actually implemented, even though it was in use
Wilmer van der Gaast 2008-01-19 Using test -f instead of test -e. This breaks if the include files are
Wilmer van der Gaast 2008-01-19 Added byte swapping code to the new MD5 checksumming code to make it work
Wilmer van der Gaast 2008-01-18 Moving imcb_chat_new() to a saner location (no code changes) and fixing
Wilmer van der Gaast 2008-01-17 Apparently ext_yahoo_got_im can be called with msg=NULL, so it should be
Wilmer van der Gaast 2008-01-17 Fixing some Solaris compiler warnings (u_int->uint, adding some typecasts
Wilmer van der Gaast 2008-01-13 Fixed handing of failed groupchat joins.
Wilmer van der Gaast 2008-01-13 Fixed "Conditional jump or move depends on uninitialised value(s)" at
Wilmer van der Gaast 2008-01-13 Fixed quickstart2. (Bug #349.)
Wilmer van der Gaast 2008-01-13 Different handling of charset mismatches before login time. Ignoring a
Wilmer van der Gaast 2008-01-12 When a switchboard connection dies (at the TCP level) and there are still
Wilmer van der Gaast 2008-01-12 Killed info_string_append() and now showing the IP address of ICQ users
Wilmer van der Gaast 2008-01-11 Fixing bug #344, now away states should always be correct, even when people
Wilmer van der Gaast 2008-01-11 Adding own handle to protocol name in blist output for people with multiple
Wilmer van der Gaast 2008-01-10 Now setting odata->icq properly again, this got lost some time ago, which
Wilmer van der Gaast 2008-01-06 More consistency in error/warning errors. Until now "WARNING:" was usually
Wilmer van der Gaast 2008-01-06 Changed warning message about unsent MSN messages. It should show the actual
Wilmer van der Gaast 2008-01-05 Added "mail_notifications" setting. Who needs those notifications anyway?
Wilmer van der Gaast 2008-01-05 Build fix from vmiklos.
Wilmer van der Gaast 2008-01-05 Added handling of MSN switchboard NAK messages. Untested, but hey, it
Wilmer van der Gaast 2008-01-05 Removed closure->result. I was planning to add some more stuff, but will
Miklos Vajna 2007-12-31 encode: md5.c is no longer in protocols/, it's in lib/
Wilmer van der Gaast 2007-12-28 Fixed return value check in proxy_connect(), since on some systems
Wilmer van der Gaast 2007-12-28 Added missing return in jabber_login().
Wilmer van der Gaast 2007-12-16 Implemented XEP-0199 (patch from misc@…).
Wilmer van der Gaast 2007-12-12 Checking conn->xcred before trying to clean it up since GnuTLS doesn't
Wilmer van der Gaast 2007-12-12 Killed the <server> parameter to "account add" and changed the default
Wilmer van der Gaast 2007-12-12 Fixed sockerr_again() usage in Jabber module to (hopefully) fix a 100% CPU
Wilmer van der Gaast 2007-12-10 Don't allow nicks that start with a number.
Wilmer van der Gaast 2007-12-10 Fixed "set xxx" syntax (it showed all settings instead of just xxx).
Wilmer van der Gaast 2007-12-09 If I keep forgetting to credit people in commit msgs I should probably add
Wilmer van der Gaast 2007-12-09 Added /invite support for Jabber chatrooms (and fixed the argument order

Location:
protocols/oscar
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • protocols/oscar/oscar.c

    r0fbd3a6d r1ba7e8f  
    9191        gboolean icq;
    9292        GSList *evilhack;
     93       
     94        GHashTable *ips;
    9395
    9496        struct {
     
    356358        struct oscar_data *odata = ic->proto_data = g_new0(struct oscar_data, 1);
    357359
    358         if (!isdigit(acc->user[0])) {
     360        if (isdigit(acc->user[0]))
     361                odata->icq = TRUE;
     362        else
    359363                ic->flags |= OPT_DOES_HTML;
    360         }
    361364
    362365        sess = g_new0(aim_session_t, 1);
     
    411414                g_free(cr);
    412415        }
     416        if (odata->ips)
     417                g_hash_table_destroy(odata->ips);
    413418        if (odata->email)
    414419                g_free(odata->email);
     
    987992                signon = time(NULL) - info->sessionlen;
    988993
     994        if (info->present & AIM_USERINFO_PRESENT_ICQIPADDR) {
     995                uint32_t *uin = g_new0(uint32_t, 1);
     996               
     997                if (od->ips == NULL)
     998                        od->ips = g_hash_table_new_full(g_int_hash, g_int_equal, g_free, NULL);
     999               
     1000                if (sscanf(info->sn, "%d", uin) == 1)
     1001                        g_hash_table_insert(od->ips, uin, (gpointer) (long) info->icqinfo.ipaddr);
     1002        }
     1003
    9891004        tmp = g_strdup(normalize(ic->acc->user));
    9901005        if (!strcmp(tmp, normalize(info->sn)))
     
    10511066                g_snprintf(tmp, BUF_LONG, "%s", args->msg);
    10521067        } else {
    1053                 int i;
     1068                aim_mpmsg_section_t *part;
    10541069               
    10551070                *tmp = 0;
    1056                 for (i = 0; i < args->mpmsg.numparts; i ++) {
    1057                         g_strlcat(tmp, (char*) args->mpmsg.parts[i].data, BUF_LONG);
    1058                         g_strlcat(tmp, "\n", BUF_LONG);
     1071                for (part = args->mpmsg.parts; part; part = part->next) {
     1072                        if (part->data) {
     1073                                g_strlcat(tmp, (char*) part->data, BUF_LONG);
     1074                                g_strlcat(tmp, "\n", BUF_LONG);
     1075                        }
    10591076                }
    10601077        }
     
    22192236static int gaim_icqinfo(aim_session_t *sess, aim_frame_t *fr, ...)
    22202237{
    2221         struct im_connection *ic = sess->aux_data;
    2222         gchar who[16];
    2223         GString *str;
    2224         va_list ap;
    2225         struct aim_icq_info *info;
    2226 
    2227         va_start(ap, fr);
    2228         info = va_arg(ap, struct aim_icq_info *);
    2229         va_end(ap);
    2230 
    2231         if (!info->uin)
    2232                 return 0;
    2233 
    2234         str = g_string_sized_new(100);
    2235         g_snprintf(who, sizeof(who), "%u", info->uin);
    2236 
    2237         g_string_sprintfa(str, "%s: %s - %s: %s", _("UIN"), who, _("Nick"),
    2238                                 info->nick ? info->nick : "-");
    2239         info_string_append(str, "\n", _("First Name"), info->first);
    2240         info_string_append(str, "\n", _("Last Name"), info->last);
    2241                 info_string_append(str, "\n", _("Email Address"), info->email);
    2242         if (info->numaddresses && info->email2) {
    2243                 int i;
    2244                 for (i = 0; i < info->numaddresses; i++) {
    2245                                         info_string_append(str, "\n", _("Email Address"), info->email2[i]);
    2246                 }
    2247         }
    2248         info_string_append(str, "\n", _("Mobile Phone"), info->mobile);
    2249         if (info->gender != 0)
    2250                 info_string_append(str, "\n", _("Gender"), info->gender==1 ? _("Female") : _("Male"));
    2251         if (info->birthyear || info->birthmonth || info->birthday) {
    2252                 char date[30];
    2253                 struct tm tm;
    2254                 tm.tm_mday = (int)info->birthday;
    2255                 tm.tm_mon = (int)info->birthmonth-1;
    2256                 tm.tm_year = (int)info->birthyear%100;
    2257                 strftime(date, sizeof(date), "%Y-%m-%d", &tm);
    2258                 info_string_append(str, "\n", _("Birthday"), date);
    2259         }
    2260         if (info->age) {
    2261                 char age[5];
    2262                 g_snprintf(age, sizeof(age), "%hhd", info->age);
    2263                 info_string_append(str, "\n", _("Age"), age);
    2264         }
    2265                 info_string_append(str, "\n", _("Personal Web Page"), info->personalwebpage);
    2266         if (info->info && info->info[0]) {
    2267                 g_string_sprintfa(str, "\n%s:\n%s\n%s", _("Additional Information"),
    2268                                                 info->info, _("End of Additional Information"));
    2269         }
    2270         g_string_sprintfa(str, "\n");
    2271         if ((info->homeaddr && (info->homeaddr[0])) || (info->homecity && info->homecity[0]) || (info->homestate && info->homestate[0]) || (info->homezip && info->homezip[0])) {
    2272                 g_string_sprintfa(str, "%s:", _("Home Address"));
    2273                 info_string_append(str, "\n", _("Address"), info->homeaddr);
    2274                 info_string_append(str, "\n", _("City"), info->homecity);
    2275                 info_string_append(str, "\n", _("State"), info->homestate);
    2276                                 info_string_append(str, "\n", _("Zip Code"), info->homezip);
    2277                 g_string_sprintfa(str, "\n");
    2278         }
    2279         if ((info->workaddr && info->workaddr[0]) || (info->workcity && info->workcity[0]) || (info->workstate && info->workstate[0]) || (info->workzip && info->workzip[0])) {
    2280                 g_string_sprintfa(str, "%s:", _("Work Address"));
    2281                 info_string_append(str, "\n", _("Address"), info->workaddr);
    2282                 info_string_append(str, "\n", _("City"), info->workcity);
    2283                 info_string_append(str, "\n", _("State"), info->workstate);
    2284                                 info_string_append(str, "\n", _("Zip Code"), info->workzip);
    2285                 g_string_sprintfa(str, "\n");
    2286         }
    2287         if ((info->workcompany && info->workcompany[0]) || (info->workdivision && info->workdivision[0]) || (info->workposition && info->workposition[0]) || (info->workwebpage && info->workwebpage[0])) {
    2288                 g_string_sprintfa(str, "%s:", _("Work Information"));
    2289                 info_string_append(str, "\n", _("Company"), info->workcompany);
    2290                 info_string_append(str, "\n", _("Division"), info->workdivision);
    2291                 info_string_append(str, "\n", _("Position"), info->workposition);
    2292                 if (info->workwebpage && info->workwebpage[0]) {
    2293                         info_string_append(str, "\n", _("Web Page"), info->workwebpage);
    2294                 }
    2295                 g_string_sprintfa(str, "\n");
    2296         }
    2297 
    2298                 imcb_log(ic, "%s\n%s", _("User Info"), str->str);
    2299         g_string_free(str, TRUE);
    2300 
    2301         return 1;
     2238        struct im_connection *ic = sess->aux_data;
     2239        struct oscar_data *od = ic->proto_data;
     2240        gchar who[16];
     2241        GString *str;
     2242        va_list ap;
     2243        struct aim_icq_info *info;
     2244        uint32_t ip;
     2245
     2246        va_start(ap, fr);
     2247        info = va_arg(ap, struct aim_icq_info *);
     2248        va_end(ap);
     2249
     2250        if (!info->uin)
     2251                return 0;
     2252
     2253        str = g_string_sized_new(512);
     2254        g_snprintf(who, sizeof(who), "%u", info->uin);
     2255
     2256        g_string_printf(str, "%s: %s - %s: %s", _("UIN"), who, _("Nick"),
     2257        info->nick ? info->nick : "-");
     2258        g_string_append_printf(str, "\n%s: %s", _("First Name"), info->first);
     2259        g_string_append_printf(str, "\n%s: %s", _("Last Name"), info->last);
     2260        g_string_append_printf(str, "\n%s: %s", _("Email Address"), info->email);
     2261        if (info->numaddresses && info->email2) {
     2262                int i;
     2263                for (i = 0; i < info->numaddresses; i++) {
     2264                        g_string_append_printf(str, "\n%s: %s", _("Email Address"), info->email2[i]);
     2265                }
     2266        }
     2267        if ((ip = (long) g_hash_table_lookup(od->ips, &info->uin)) != 0) {
     2268                g_string_append_printf(str, "\n%s: %d.%d.%d.%d", _("Last used IP address"),
     2269                                       (ip >> 24), (ip >> 16) & 0xff, (ip >> 8) & 0xff, ip & 0xff);
     2270        }
     2271        g_string_append_printf(str, "\n%s: %s", _("Mobile Phone"), info->mobile);
     2272        if (info->gender != 0)
     2273                g_string_append_printf(str, "\n%s: %s", _("Gender"), info->gender==1 ? _("Female") : _("Male"));
     2274        if (info->birthyear || info->birthmonth || info->birthday) {
     2275                char date[30];
     2276                struct tm tm;
     2277                memset(&tm, 0, sizeof(struct tm));
     2278                tm.tm_mday = (int)info->birthday;
     2279                tm.tm_mon = (int)info->birthmonth-1;
     2280                tm.tm_year = (int)info->birthyear%100;
     2281                strftime(date, sizeof(date), "%Y-%m-%d", &tm);
     2282                g_string_append_printf(str, "\n%s: %s", _("Birthday"), date);
     2283        }
     2284        if (info->age) {
     2285                char age[5];
     2286                g_snprintf(age, sizeof(age), "%hhd", info->age);
     2287                g_string_append_printf(str, "\n%s: %s", _("Age"), age);
     2288        }
     2289        g_string_append_printf(str, "\n%s: %s", _("Personal Web Page"), info->personalwebpage);
     2290        if (info->info && info->info[0]) {
     2291                g_string_sprintfa(str, "\n%s:\n%s\n%s", _("Additional Information"),
     2292                info->info, _("End of Additional Information"));
     2293        }
     2294        g_string_append_c(str, '\n');
     2295        if ((info->homeaddr && (info->homeaddr[0])) || (info->homecity && info->homecity[0]) || (info->homestate && info->homestate[0]) || (info->homezip && info->homezip[0])) {
     2296                g_string_append_printf(str, "%s:", _("Home Address"));
     2297                g_string_append_printf(str, "\n%s: %s", _("Address"), info->homeaddr);
     2298                g_string_append_printf(str, "\n%s: %s", _("City"), info->homecity);
     2299                g_string_append_printf(str, "\n%s: %s", _("State"), info->homestate);
     2300                g_string_append_printf(str, "\n%s: %s", _("Zip Code"), info->homezip);
     2301                g_string_append_c(str, '\n');
     2302        }
     2303        if ((info->workaddr && info->workaddr[0]) || (info->workcity && info->workcity[0]) || (info->workstate && info->workstate[0]) || (info->workzip && info->workzip[0])) {
     2304                g_string_append_printf(str, "%s:", _("Work Address"));
     2305                g_string_append_printf(str, "\n%s: %s", _("Address"), info->workaddr);
     2306                g_string_append_printf(str, "\n%s: %s", _("City"), info->workcity);
     2307                g_string_append_printf(str, "\n%s: %s", _("State"), info->workstate);
     2308                g_string_append_printf(str, "\n%s: %s", _("Zip Code"), info->workzip);
     2309                g_string_append_c(str, '\n');
     2310        }
     2311        if ((info->workcompany && info->workcompany[0]) || (info->workdivision && info->workdivision[0]) || (info->workposition && info->workposition[0]) || (info->workwebpage && info->workwebpage[0])) {
     2312                g_string_append_printf(str, "%s:", _("Work Information"));
     2313                g_string_append_printf(str, "\n%s: %s", _("Company"), info->workcompany);
     2314                g_string_append_printf(str, "\n%s: %s", _("Division"), info->workdivision);
     2315                g_string_append_printf(str, "\n%s: %s", _("Position"), info->workposition);
     2316                if (info->workwebpage && info->workwebpage[0]) {
     2317                        g_string_append_printf(str, "\n%s: %s", _("Web Page"), info->workwebpage);
     2318                }
     2319                g_string_append_c(str, '\n');
     2320        }
     2321
     2322        imcb_log(ic, "%s\n%s", _("User Info"), str->str);
     2323        g_string_free(str, TRUE);
     2324
     2325        return 1;
    23022326
    23032327}
     
    24332457                /* User has stopped typing */
    24342458                imcb_buddy_typing(ic, sn, 0);
    2435         }       
     2459        }
    24362460       
    24372461        return 1;
  • protocols/oscar/service.c

    r0fbd3a6d r1ba7e8f  
    894894*/
    895895                } else
    896                         imcb_error(sess->aux_data, "WARNING: unknown hash request");
     896                        imcb_error(sess->aux_data, "Warning: unknown hash request");
    897897
    898898        }
  • protocols/oscar/txqueue.c

    r0fbd3a6d r1ba7e8f  
    8080
    8181        if (!fr->conn) {
    82                 imcb_error(sess->aux_data, "WARNING: enqueueing packet with no connection");
     82                imcb_error(sess->aux_data, "Warning: enqueueing packet with no connection");
    8383                fr->conn = aim_getconn_type(sess, AIM_CONN_TYPE_BOS);
    8484        }
Note: See TracChangeset for help on using the changeset viewer.