Changeset 11e42dc


Ignore:
Timestamp:
2015-04-10T17:10:40Z (9 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
d80822c
Parents:
254a4da
git-author:
dequis <dx@…> (09-03-15 08:35:50)
git-committer:
dequis <dx@…> (10-04-15 17:10:40)
Message:

msn: removed switchboards, implemented SDG message

Location:
protocols/msn
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • protocols/msn/Makefile

    r254a4da r11e42dc  
    1313
    1414# [SH] Program variables
    15 objects = msn.o msn_util.o ns.o sb.o soap.o tables.o
     15objects = msn.o msn_util.o ns.o soap.o tables.o
    1616
    1717LFLAGS += -r
  • protocols/msn/msn.c

    r254a4da r11e42dc  
    3030int msn_chat_id;
    3131GSList *msn_connections;
    32 GSList *msn_switchboards;
    3332
    3433static char *set_eval_display_name(set_t *set, char *value);
     
    4847
    4948        set_add(&acc->set, "mail_notifications", "false", set_eval_bool, acc);
    50         set_add(&acc->set, "switchboard_keepalives", "false", set_eval_bool, acc);
    5149
    5250        acc->flags |= ACC_FLAG_AWAY_MESSAGE | ACC_FLAG_STATUS_MESSAGE |
     
    8078        md->away_state = msn_away_state_list;
    8179        md->domaintree = g_tree_new(msn_domaintree_cmp);
    82         md->ns->fd = -1;
     80        md->fd = -1;
    8381
    8482        msn_connections = g_slist_prepend(msn_connections, ic);
    8583
    8684        imcb_log(ic, "Connecting");
    87         msn_ns_connect(ic, md->ns, server,
     85        msn_ns_connect(ic, server,
    8886                       set_getint(&ic->acc->set, "port"));
    8987}
     
    9694
    9795        if (md) {
    98                 msn_ns_close(md->ns);
    99 
    100                 while (md->switchboards) {
    101                         msn_sb_destroy(md->switchboards->data);
    102                 }
     96                msn_ns_close(md);
    10397
    10498                msn_msgq_purge(ic, &md->msgq);
     
    154148{
    155149        struct bee_user *bu = bee_user_by_handle(ic->bee, ic, who);
    156         struct msn_buddy_data *bd = bu ? bu->data : NULL;
    157         struct msn_switchboard *sb;
    158150
    159151#ifdef DEBUG
    160152        if (strcmp(who, "raw") == 0) {
    161153                msn_ns_write(ic, -1, "%s\r\n", message);
    162         } else
     154                return 0;
     155        }
    163156#endif
    164         if (bd && bd->flags & MSN_BUDDY_FED) {
    165                 msn_ns_sendmessage(ic, bu, message);
    166         } else if ((sb = msn_sb_by_handle(ic, who))) {
    167                 return(msn_sb_sendmessage(sb, message));
    168         } else {
    169                 struct msn_message *m;
    170 
    171                 /* Create a message. We have to arrange a usable switchboard, and send the message later. */
    172                 m = g_new0(struct msn_message, 1);
    173                 m->who = g_strdup(who);
    174                 m->text = g_strdup(message);
    175 
    176                 return msn_sb_write_msg(ic, m);
    177         }
    178 
     157
     158        msn_ns_sendmessage(ic, bu, message);
    179159        return(0);
    180160}
     
    198178static void msn_set_away(struct im_connection *ic, char *state, char *message)
    199179{
    200         char *uux;
     180        //char *uux;
    201181        struct msn_data *md = ic->proto_data;
    202182
     
    258238static void msn_chat_msg(struct groupchat *c, char *message, int flags)
    259239{
    260         struct msn_switchboard *sb = msn_sb_by_chat(c);
    261 
    262         if (sb) {
    263                 msn_sb_sendmessage(sb, message);
    264         }
    265         /* FIXME: Error handling (although this can't happen unless something's
    266            already severely broken) disappeared here! */
     240        /* TODO: groupchats*/
    267241}
    268242
    269243static void msn_chat_invite(struct groupchat *c, char *who, char *message)
    270244{
    271         struct msn_switchboard *sb = msn_sb_by_chat(c);
    272 
    273         if (sb) {
    274                 msn_sb_write(sb, "CAL %d %s\r\n", ++sb->trId, who);
    275         }
     245        /* TODO: groupchats*/
    276246}
    277247
    278248static void msn_chat_leave(struct groupchat *c)
    279249{
    280         struct msn_switchboard *sb = msn_sb_by_chat(c);
    281 
    282         if (sb) {
    283                 msn_sb_write(sb, "OUT\r\n");
    284         }
     250        /* TODO: groupchats*/
    285251}
    286252
    287253static struct groupchat *msn_chat_with(struct im_connection *ic, char *who)
    288254{
    289         struct msn_switchboard *sb;
     255        /* TODO: groupchats*/
    290256        struct groupchat *c = imcb_chat_new(ic, who);
    291 
    292         if ((sb = msn_sb_by_handle(ic, who))) {
    293                 debug("Converting existing switchboard to %s to a groupchat", who);
    294                 return msn_sb_to_chat(sb);
    295         } else {
    296                 struct msn_message *m;
    297 
    298                 /* Create a magic message. This is quite hackish, but who cares? :-P */
    299                 m = g_new0(struct msn_message, 1);
    300                 m->who = g_strdup(who);
    301                 m->text = g_strdup(GROUPCHAT_SWITCHBOARD_MESSAGE);
    302 
    303                 msn_sb_write_msg(ic, m);
    304 
    305                 return c;
    306         }
     257        return c;
    307258}
    308259
     
    324275static void msn_add_deny(struct im_connection *ic, char *who)
    325276{
    326         struct msn_switchboard *sb;
    327 
    328277        msn_buddy_list_add(ic, MSN_BUDDY_BL, who, who, NULL);
    329 
    330         /* If there's still a conversation with this person, close it. */
    331         if ((sb = msn_sb_by_handle(ic, who))) {
    332                 msn_sb_destroy(sb);
    333         }
    334278}
    335279
  • protocols/msn/msn.h

    r254a4da r11e42dc  
    3232#define NUDGE_MESSAGE "\r\r\rSHAKE THAT THING\r\r\r"
    3333#define GROUPCHAT_SWITCHBOARD_MESSAGE "\r\r\rME WANT TALK TO MANY PEOPLE\r\r\r"
    34 #define SB_KEEPALIVE_MESSAGE "\r\r\rDONT HANG UP ON ME!\r\r\r"
    3534
    3635#ifdef DEBUG_MSN
     
    6867#define MSN_CAP2        0x0000
    6968
    70 #define MSN_MESSAGE_HEADERS "MIME-Version: 1.0\r\n" \
     69#define MSN_MESSAGE_HEADERS \
     70        "Routing: 1.0\r\n" \
     71        "To: 1:%s\r\n" \
     72        "From: 1:%s;epid={%s}\r\n" \
     73        "\r\n" \
     74        "Reliability: 1.0\r\n" \
     75        "\r\n" \
     76        "Messaging: 2.0\r\n" \
     77        "Message-Type: Text\r\n" \
     78        "Content-Length: %zd\r\n" \
    7179        "Content-Type: text/plain; charset=UTF-8\r\n" \
    72         "User-Agent: BitlBee " BITLBEE_VERSION "\r\n" \
    73         "X-MMS-IM-Format: FN=MS%20Shell%20Dlg; EF=; CO=0; CS=0; PF=0\r\n" \
    74         "\r\n"
     80        "X-MMS-IM-Format: FN=Segoe%%20UI; EF=; CO=0; CS=0; PF=0\r\n" \
     81        "\r\n" \
     82        "%s"
    7583
    7684#define MSN_TYPING_HEADERS "MIME-Version: 1.0\r\n" \
     
    8492        "ID: 1\r\n" \
    8593        "\r\n"
    86 
    87 #define MSN_SB_KEEPALIVE_HEADERS "MIME-Version: 1.0\r\n" \
    88         "Content-Type: text/x-ping\r\n" \
    89         "\r\n\r\n"
    9094
    9195#define PROFILE_URL "http://members.msn.com/"
     
    99103} msn_flags_t;
    100104
    101 struct msn_handler_data {
     105struct msn_data {
    102106        int fd, inpa;
    103107        int rxlen;
     
    107111        char *cmd_text;
    108112
    109         /* Either ic or sb */
    110         gpointer data;
    111 
    112         int (*exec_command) (struct msn_handler_data *handler, char **cmd, int count);
    113         int (*exec_message) (struct msn_handler_data *handler, char *msg, int msglen, char **cmd, int count);
    114 };
    115 
    116 struct msn_data {
    117113        struct im_connection *ic;
    118114
    119         struct msn_handler_data ns[1];
    120115        msn_flags_t flags;
    121116
     
    126121
    127122        GSList *msgq, *grpq, *soapq;
    128         GSList *switchboards;
    129         int sb_failures;
    130         time_t first_sb_failure;
    131123
    132124        const struct msn_away_state *away_state;
     
    139131        GTree *domaintree;
    140132        int adl_todo;
    141 };
    142 
    143 struct msn_switchboard {
    144         struct im_connection *ic;
    145 
    146         /* The following two are also in the handler. TODO: Clean up. */
    147         int fd;
    148         gint inp;
    149         struct msn_handler_data *handler;
    150         gint keepalive;
    151 
    152         int trId;
    153         int ready;
    154 
    155         int session;
    156         char *key;
    157 
    158         GSList *msgq;
    159         char *who;
    160         struct groupchat *chat;
    161133};
    162134
     
    205177#define STATUS_FATAL            1
    206178#define STATUS_SB_FATAL         2
    207 #define STATUS_SB_IM_SPARE      4       /* Make one-to-one conversation switchboard available again, invite failed. */
    208 #define STATUS_SB_CHAT_SPARE    8       /* Same, but also for groupchats (not used yet). */
    209179
    210180extern int msn_chat_id;
     
    218188   before doing *anything* else. */
    219189extern GSList *msn_connections;
    220 extern GSList *msn_switchboards;
    221190
    222191/* ns.c */
    223192int msn_ns_write(struct im_connection *ic, int fd, const char *fmt, ...) G_GNUC_PRINTF(3, 4);
    224 gboolean msn_ns_connect(struct im_connection *ic, struct msn_handler_data *handler, const char *host, int port);
    225 void msn_ns_close(struct msn_handler_data *handler);
     193gboolean msn_ns_connect(struct im_connection *ic, const char *host, int port);
     194void msn_ns_close(struct msn_data *handler);
    226195void msn_auth_got_passport_token(struct im_connection *ic, const char *token, const char *error);
    227196void msn_auth_got_contact_list(struct im_connection *ic);
     
    229198int msn_ns_sendmessage(struct im_connection *ic, struct bee_user *bu, const char *text);
    230199void msn_ns_oim_send_queue(struct im_connection *ic, GSList **msgq);
     200int msn_ns_command(struct msn_data *md, char **cmd, int num_parts);
     201int msn_ns_message(struct msn_data *md, char *msg, int msglen, char **cmd, int num_parts);
    231202
    232203/* msn_util.c */
     
    236207void msn_buddy_ask(bee_user_t *bu);
    237208char **msn_linesplit(char *line);
    238 int msn_handler(struct msn_handler_data *h);
     209int msn_handler(struct msn_data *h);
    239210void msn_msgq_purge(struct im_connection *ic, GSList **list);
    240211char *msn_p11_challenge(char *challenge);
     
    251222const struct msn_status_code *msn_status_by_number(int number);
    252223
    253 /* sb.c */
    254 int msn_sb_write(struct msn_switchboard *sb, const char *fmt, ...) G_GNUC_PRINTF(2, 3);;
    255 struct msn_switchboard *msn_sb_create(struct im_connection *ic, char *host, int port, char *key, int session);
    256 struct msn_switchboard *msn_sb_by_handle(struct im_connection *ic, const char *handle);
    257 struct msn_switchboard *msn_sb_by_chat(struct groupchat *c);
    258 struct msn_switchboard *msn_sb_spare(struct im_connection *ic);
    259 int msn_sb_sendmessage(struct msn_switchboard *sb, char *text);
    260 struct groupchat *msn_sb_to_chat(struct msn_switchboard *sb);
    261 void msn_sb_destroy(struct msn_switchboard *sb);
    262 gboolean msn_sb_connected(gpointer data, gint source, b_input_condition cond);
    263 int msn_sb_write_msg(struct im_connection *ic, struct msn_message *m);
    264 void msn_sb_start_keepalives(struct msn_switchboard *sb, gboolean initial);
    265 void msn_sb_stop_keepalives(struct msn_switchboard *sb);
    266 
    267224#endif //_MSN_H
  • protocols/msn/msn_util.c

    r254a4da r11e42dc  
    266266                   1: OK */
    267267
    268 int msn_handler(struct msn_handler_data *h)
    269 {
     268int msn_handler(struct msn_data *h)
     269{
     270        struct im_connection *ic = h->ic;
    270271        int st;
    271272
     
    299300                                                ;
    300301                                        }
    301                                         st = h->exec_command(h, cmd, count);
     302                                        st = msn_ns_command(h, cmd, count);
    302303                                        g_free(cmd_text);
    303304
     
    340341                        }
    341342
    342                         st = h->exec_message(h, msg, h->msglen, cmd, count);
     343                        st = msn_ns_message(h, msg, h->msglen, cmd, count);
    343344                        g_free(msg);
    344345                        g_free(h->cmd_text);
  • protocols/msn/ns.c

    r254a4da r11e42dc  
    3535static gboolean msn_ns_connected(gpointer data, gint source, b_input_condition cond);
    3636static gboolean msn_ns_callback(gpointer data, gint source, b_input_condition cond);
    37 static int msn_ns_command(struct msn_handler_data *handler, char **cmd, int num_parts);
    38 static int msn_ns_message(struct msn_handler_data *handler, char *msg, int msglen, char **cmd, int num_parts);
    3937
    4038static void msn_ns_send_adl_start(struct im_connection *ic);
     
    5452
    5553        if (fd < 0) {
    56                 fd = md->ns->fd;
     54                fd = md->fd;
    5755        }
    5856
     
    7371}
    7472
    75 gboolean msn_ns_connect(struct im_connection *ic, struct msn_handler_data *handler, const char *host, int port)
    76 {
     73gboolean msn_ns_connect(struct im_connection *ic, const char *host, int port)
     74{
     75        struct msn_data *handler = ic->proto_data;
     76
    7777        if (handler->fd >= 0) {
    7878                closesocket(handler->fd);
    7979        }
    8080
    81         handler->exec_command = msn_ns_command;
    82         handler->exec_message = msn_ns_message;
    83         handler->data = ic;
    8481        handler->fd = proxy_connect(host, port, msn_ns_connected, handler);
    8582        if (handler->fd < 0) {
     
    9491static gboolean msn_ns_connected(gpointer data, gint source, b_input_condition cond)
    9592{
    96         struct msn_handler_data *handler = data;
    97         struct im_connection *ic = handler->data;
    98         struct msn_data *md;
    99 
    100         if (!g_slist_find(msn_connections, ic)) {
    101                 return FALSE;
    102         }
    103 
    104         md = ic->proto_data;
     93        struct msn_data *md = data;
     94        struct msn_data *handler = md;
     95        struct im_connection *ic = md->ic;
    10596
    10697        if (source == -1) {
     
    137128}
    138129
    139 void msn_ns_close(struct msn_handler_data *handler)
     130void msn_ns_close(struct msn_data *handler)
    140131{
    141132        if (handler->fd >= 0) {
     
    155146static gboolean msn_ns_callback(gpointer data, gint source, b_input_condition cond)
    156147{
    157         struct msn_handler_data *handler = data;
    158         struct im_connection *ic = handler->data;
     148        struct msn_data *handler = data;
     149        struct im_connection *ic = handler->ic;
    159150
    160151        if (msn_handler(handler) == -1) {  /* Don't do this on ret == 0, it's already done then. */
     
    168159}
    169160
    170 static int msn_ns_command(struct msn_handler_data *handler, char **cmd, int num_parts)
    171 {
    172         struct im_connection *ic = handler->data;
    173         struct msn_data *md = ic->proto_data;
     161int msn_ns_command(struct msn_data *handler, char **cmd, int num_parts)
     162{
     163        struct im_connection *ic = handler->ic;
     164        struct msn_data *md = handler;
    174165
    175166        if (num_parts == 0) {
     
    209200
    210201                        imcb_log(ic, "Transferring to other server");
    211                         return msn_ns_connect(ic, handler, server, port);
    212                 } else if (num_parts >= 6 && strcmp(cmd[2], "SB") == 0) {
    213                         struct msn_switchboard *sb;
    214 
    215                         server = strchr(cmd[3], ':');
    216                         if (!server) {
    217                                 imcb_error(ic, "Syntax error");
    218                                 imc_logout(ic, TRUE);
    219                                 return(0);
    220                         }
    221                         *server = 0;
    222                         port = atoi(server + 1);
    223                         server = cmd[3];
    224 
    225                         if (strcmp(cmd[4], "CKI") != 0) {
    226                                 imcb_error(ic, "Unknown authentication method for switchboard");
    227                                 imc_logout(ic, TRUE);
    228                                 return(0);
    229                         }
    230 
    231                         debug("Connecting to a new switchboard with key %s", cmd[5]);
    232 
    233                         if ((sb = msn_sb_create(ic, server, port, cmd[5], MSN_SB_NEW)) == NULL) {
    234                                 /* Although this isn't strictly fatal for the NS connection, it's
    235                                    definitely something serious (we ran out of file descriptors?). */
    236                                 imcb_error(ic, "Could not create new switchboard");
    237                                 imc_logout(ic, TRUE);
    238                                 return(0);
    239                         }
    240 
    241                         if (md->msgq) {
    242                                 struct msn_message *m = md->msgq->data;
    243                                 GSList *l;
    244 
    245                                 sb->who = g_strdup(m->who);
    246 
    247                                 /* Move all the messages to the first user in the message
    248                                    queue to the switchboard message queue. */
    249                                 l = md->msgq;
    250                                 while (l) {
    251                                         m = l->data;
    252                                         l = l->next;
    253                                         if (strcmp(m->who, sb->who) == 0) {
    254                                                 sb->msgq = g_slist_append(sb->msgq, m);
    255                                                 md->msgq = g_slist_remove(md->msgq, m);
    256                                         }
    257                                 }
    258                         }
     202                        return msn_ns_connect(ic, server, port);
    259203                } else {
    260204                        imcb_error(ic, "Syntax error");
     
    361305                                  st->name, NULL);
    362306
    363                 msn_sb_stop_keepalives(msn_sb_by_handle(ic, handle));
    364307        } else if (strcmp(cmd[0], "FLN") == 0) {
    365308                const char *handle;
     
    371314                handle = msn_normalize_handle(cmd[1]);
    372315                imcb_buddy_status(ic, handle, 0, NULL, NULL);
    373                 msn_sb_start_keepalives(msn_sb_by_handle(ic, handle), TRUE);
    374         } else if (strcmp(cmd[0], "RNG") == 0) {
    375                 struct msn_switchboard *sb;
    376                 char *server;
    377                 int session, port;
    378 
    379                 if (num_parts < 7) {
    380                         imcb_error(ic, "Syntax error");
    381                         imc_logout(ic, TRUE);
    382                         return(0);
    383                 }
    384 
    385                 session = atoi(cmd[1]);
    386 
    387                 server = strchr(cmd[2], ':');
    388                 if (!server) {
    389                         imcb_error(ic, "Syntax error");
    390                         imc_logout(ic, TRUE);
    391                         return(0);
    392                 }
    393                 *server = 0;
    394                 port = atoi(server + 1);
    395                 server = cmd[2];
    396 
    397                 if (strcmp(cmd[3], "CKI") != 0) {
    398                         imcb_error(ic, "Unknown authentication method for switchboard");
    399                         imc_logout(ic, TRUE);
    400                         return(0);
    401                 }
    402 
    403                 debug("Got a call from %s (session %d). Key = %s", cmd[5], session, cmd[4]);
    404 
    405                 if ((sb = msn_sb_create(ic, server, port, cmd[4], session)) == NULL) {
    406                         /* Although this isn't strictly fatal for the NS connection, it's
    407                            definitely something serious (we ran out of file descriptors?). */
    408                         imcb_error(ic, "Could not create new switchboard");
    409                         imc_logout(ic, TRUE);
    410                         return(0);
    411                 } else {
    412                         sb->who = g_strdup(msn_normalize_handle(cmd[5]));
    413                 }
    414316        } else if (strcmp(cmd[0], "OUT") == 0) {
    415317                int allow_reconnect = TRUE;
     
    494396                        handler->msglen = atoi(cmd[1]);
    495397                }
    496         } else if (strcmp(cmd[0], "NFY") == 0) {
     398        } else if ((strcmp(cmd[0], "NFY") == 0) || (strcmp(cmd[0], "SDG") == 0)) {
    497399                if (num_parts >= 3) {
    498400                        handler->msglen = atoi(cmd[2]);
     
    526428}
    527429
    528 static int msn_ns_message(struct msn_handler_data *handler, char *msg, int msglen, char **cmd, int num_parts)
    529 {
    530         struct im_connection *ic = handler->data;
     430int msn_ns_message(struct msn_data *handler, char *msg, int msglen, char **cmd, int num_parts)
     431{
     432        struct im_connection *ic = handler->ic;
    531433        char *body;
    532434        int blen = 0;
     
    717619                        }
    718620                }
    719         } else if (strcmp(cmd[0], "UBM") == 0) {
    720                 /* This one will give us msgs from federated networks. Technically
    721                    it should also get us offline messages, but I don't know how
    722                    I can signal MSN servers to use it. */
    723                 char *ct, *handle;
    724 
    725                 if (strcmp(cmd[1], ic->acc->user) == 0) {
    726                         /* With MPOP, you'll get copies of your own msgs from other
    727                            sessions. Discard those at least for now. */
    728                         return 1;
    729                 }
    730 
    731                 ct = get_rfc822_header(msg, "Content-Type", msglen);
    732                 if (strncmp(ct, "text/plain", 10) != 0) {
    733                         /* Typing notification or something? */
    734                         g_free(ct);
    735                         return 1;
    736                 }
    737                 if (strcmp(cmd[2], "1") != 0) {
    738                         handle = g_strdup_printf("%s:%s", cmd[2], cmd[1]);
    739                 } else {
    740                         handle = g_strdup(cmd[1]);
    741                 }
    742 
    743                 imcb_buddy_msg(ic, handle, body, 0, 0);
    744                 g_free(handle);
     621        } else if (strcmp(cmd[0], "SDG") == 0) {
     622                char **parts = g_strsplit(msg, "\r\n\r\n", 4);
     623                char *from = NULL;
     624                char *mt = NULL;
     625                char *who = NULL;
     626                char *s = NULL;
     627
     628                if ((from = get_rfc822_header(parts[0], "From", 0)) &&
     629                    (mt = get_rfc822_header(parts[2], "Message-Type", 0)) &&
     630                    (s = strchr(from, ';'))) {
     631
     632                        who = g_strndup(from + 2, s - from - 2);
     633
     634                        if (strcmp(mt, "Control/Typing") == 0) {
     635                                imcb_buddy_typing(ic, who, OPT_TYPING);
     636                        } else if (strcmp(mt, "Text") == 0) {
     637                                imcb_buddy_msg(ic, who, parts[3], 0, 0);
     638                        }
     639                }
     640                g_free(from);
     641                g_free(mt);
     642                g_free(who);
     643                return 1;
    745644        }
    746645
     
    893792}
    894793
     794// TODO: typing notifications, nudges lol, etc
    895795int msn_ns_sendmessage(struct im_connection *ic, bee_user_t *bu, const char *text)
    896796{
    897797        struct msn_data *md = ic->proto_data;
    898         int type = 0;
    899         char *buf, *handle;
     798        int retval = 0;
     799        char *buf;
    900800
    901801        if (strncmp(text, "\r\r\r", 3) == 0) {
     
    905805        }
    906806
    907         /* This might be a federated contact. Get its network number,
    908            prefixed to bu->handle with a colon. Default is 1. */
    909         for (handle = bu->handle; g_ascii_isdigit(*handle); handle++) {
    910                 type = type * 10 + *handle - '0';
    911         }
    912         if (*handle == ':') {
    913                 handle++;
    914         } else {
    915                 type = 1;
    916         }
    917 
    918         buf = g_strdup_printf("%s%s", MSN_MESSAGE_HEADERS, text);
    919 
    920         if (msn_ns_write(ic, -1, "UUM %d %s %d %d %zd\r\n%s",
    921                          ++md->trId, handle, type,
    922                          1,          /* type == IM (not nudge/typing) */
    923                          strlen(buf), buf)) {
    924                 return 1;
    925         } else {
    926                 return 0;
    927         }
     807        buf = g_strdup_printf(MSN_MESSAGE_HEADERS, bu->handle, ic->acc->user, md->uuid, strlen(text), text);
     808        retval = msn_ns_write(ic, -1, "SDG %d %zd\r\n%s", ++md->trId, strlen(buf), buf);
     809        g_free(buf);
     810        return retval;
    928811}
    929812
  • protocols/msn/tables.c

    r254a4da r11e42dc  
    7373        { 206, "Domain name missing",                                   0 },
    7474        { 207, "Already logged in",                                     0 },
    75         { 208, "Invalid handle",                                        STATUS_SB_IM_SPARE },
     75        { 208, "Invalid handle",                                        0 },
    7676        { 209, "Forbidden nickname",                                    0 },
    7777        { 210, "Buddy list too long",                                   0 },
    7878        { 215, "Handle is already in list",                             0 },
    79         { 216, "Handle is not in list",                                 STATUS_SB_IM_SPARE },
    80         { 217, "Person is off-line or non-existent",                    STATUS_SB_IM_SPARE },
     79        { 216, "Handle is not in list",                                 0 },
     80        { 217, "Person is off-line or non-existent",                    0 },
    8181        { 218, "Already in that mode",                                  0 },
    8282        { 219, "Handle is already in opposite list",                    0 },
     
    113113        { 711, "Write is blocking",                                     STATUS_FATAL },
    114114        { 712, "Session is overloaded",                                 STATUS_FATAL },
    115         { 713, "Calling too rapidly",                                   STATUS_SB_IM_SPARE },
     115        { 713, "Calling too rapidly",                                   0 },
    116116        { 714, "Too many sessions",                                     STATUS_FATAL },
    117117        { 715, "Not expected/Invalid argument/action",                  0 },
Note: See TracChangeset for help on using the changeset viewer.