Changeset 019c031 for protocols


Ignore:
Timestamp:
2005-12-04T21:55:15Z (18 years ago)
Author:
Jelmer Vernooij <jelmer@…>
Branches:
master
Children:
568aaf7
Parents:
500a1b6 (diff), d636233 (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:

Merge from Wilmer

Location:
protocols
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.c

    r500a1b6 r019c031  
    2222 */
    2323
    24 #ifdef HAVE_CONFIG_H
    25 #include "config.h"
    26 #endif
    27 
    2824#ifndef _WIN32
    2925#include <sys/utsname.h>
     
    5955#define DEFAULT_PORT 5222
    6056#define DEFAULT_PORT_SSL 5223
     57#define JABBER_PORT_MIN 5220
     58#define JABBER_PORT_MAX 5229
    6159
    6260#define JABBER_GROUP "Friends"
     
    541539        gjconn gjc;
    542540       
    543         if (!g_slist_find(get_connections(), gc)) {
    544                 ssl_disconnect(source);
    545                 return;
    546         }
    547        
    548541        jd = gc->proto_data;
    549542        gjc = jd->gjc;
     
    551544        if (source == NULL) {
    552545                STATE_EVT(JCONN_STATE_OFF)
     546                return;
     547        }
     548       
     549        if (!g_slist_find(get_connections(), gc)) {
     550                ssl_disconnect(source);
    553551                return;
    554552        }
     
    589587        else if (port == -1 && ssl)
    590588                port = DEFAULT_PORT_SSL;
     589        else if (port < JABBER_PORT_MIN || port > JABBER_PORT_MAX) {
     590                serv_got_crap(GJ_GC(gjc), "For security reasons, the Jabber port number must be in the %d-%d range.", JABBER_PORT_MIN, JABBER_PORT_MAX);
     591                STATE_EVT(JCONN_STATE_OFF)
     592                return;
     593        }
    591594       
    592595        if (server == NULL)
  • protocols/nogaim.c

    r500a1b6 r019c031  
    452452void do_error_dialog( struct gaim_connection *gc, char *msg, char *title )
    453453{
    454         serv_got_crap( gc, "Error: %s", msg );
     454        if( msg && title )
     455                serv_got_crap( gc, "Error: %s: %s", title, msg );
     456        else if( msg )
     457                serv_got_crap( gc, "Error: %s", msg );
     458        else if( title )
     459                serv_got_crap( gc, "Error: %s", title );
     460        else
     461                serv_got_crap( gc, "Error" );
    455462}
    456463
     
    737744                /* If there's a newline/space in this string, split up there,
    738745                   looks a bit prettier. */
    739                 if( ( nl = strrchr( msg, '\n' ) ) || ( nl = strchr( msg, ' ' ) ) )
     746                if( ( nl = strrchr( msg, '\n' ) ) || ( nl = strrchr( msg, ' ' ) ) )
    740747                {
    741748                        msg[425] = tmp;
     
    769776       
    770777        if( ( u = user_findhandle( gc, handle ) ) )
    771                 irc_msgfrom( gc->irc, u->nick, "\1TYPING 1\1" );
     778                irc_privmsg( gc->irc, u, "PRIVMSG", gc->irc->nick, NULL, "\1TYPING 1\1" );
    772779}
    773780
  • protocols/proxy.c

    r500a1b6 r019c031  
    114114}
    115115
    116 static void no_one_calls(gpointer data, gint source, GaimInputCondition cond)
     116static void gaim_io_connected(gpointer data, gint source, GaimInputCondition cond)
    117117{
    118118        struct PHB *phb = data;
     
    163163        if (connect(fd, (struct sockaddr *)sin, sizeof(*sin)) < 0) {
    164164                if (sockerr_again()) {
    165                         phb->inpa = gaim_input_add(fd, GAIM_INPUT_WRITE, no_one_calls, phb);
     165                        phb->inpa = gaim_input_add(fd, GAIM_INPUT_WRITE, gaim_io_connected, phb);
    166166                        phb->fd = fd;
    167167                } else {
  • protocols/yahoo/crypt.c

    r500a1b6 r019c031  
    2222 * already had. isn't that lovely. people should just use linux or
    2323 * freebsd, crypt works properly on those systems. i hate solaris */
    24 
    25 #if HAVE_CONFIG_H
    26 #  include <config.h>
    27 #endif
    2824
    2925#if HAVE_STRING_H
  • protocols/yahoo/libyahoo2.c

    r500a1b6 r019c031  
    4343 *
    4444 */
    45 
    46 #if HAVE_CONFIG_H
    47 # include <config.h>
    48 #endif
    4945
    5046#ifndef _WIN32
  • protocols/yahoo/yahoo_httplib.c

    r500a1b6 r019c031  
    1919 *
    2020 */
    21 
    22 #if HAVE_CONFIG_H
    23 # include <config.h>
    24 #endif
    2521
    2622#include <stdio.h>
  • protocols/yahoo/yahoo_util.c

    r500a1b6 r019c031  
    1919 *
    2020 */
    21 
    22 #if HAVE_CONFIG_H
    23 # include <config.h>
    24 #endif
    2521
    2622#if STDC_HEADERS
Note: See TracChangeset for help on using the changeset viewer.