On Friday 07 February 2003 14:43, Thomas Reitelbach wrote: > Hello, > > in the past i randomly got disconnected from ICQ network, licq simply went > offline. we discussed this on irc and found that we all had a "unknown > service family subtype: 000b" in the logs a few seconds before we get > disconnected. it is the remote server that closes the connection, not licq. > > after some research we found that 0x000b service family subtype most likely > means the server is going to disconnect/shutdown/beeing maintained or > something like this. (Some documents interpret 0x000b as "Server pause"... > hm) > > The attached patch should make licq change the server and reconnect when it > receives such a signal from the server. unfortunately i have no way to > reproduce this, maybe someone else knows more about it. jon? any idea?
I found this is related to my patch.
If the information below is correct, than my patch does not make licq behave
correctly. well, changing servers is still better than going offline, so my
patch should be considered a workaround till we have something better :)
412 /*
413 * How Migrations work.
414 *
415 * The server sends a Server Pause message, which the client
should respond to
416 * with a Server Pause Ack, which contains the families it needs
on this
417 * connection. The server will send a Migration Notice with an
IP address, and
418 * then disconnect. Next the client should open the connection
and send the
419 * cookie. Repeat the normal login process and pretend this
never happened.
420 *
421 temas 1.1 * The Server Pause contains no data.
422 *
423 */
424
425 /* Service Pause (group 1, type 0x0b) */
426 static int serverpause(aim_session_t *sess, aim_module_t *mod,
aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
427 {
428 aim_rxcallback_t userfunc;
429
430 if ((userfunc = aim_callhandler(sess, rx->conn, snac->family,
snac->subtype)))
431 return userfunc(sess, rx);
432
433 return 0;
434 }
435
436 /*
437 * Service Pause Acknowledgement (group 1, type 0x0c)
438 *
439 * It is rather important that aim_sendpauseack() gets called
for the exact
440 * same connection that the Server Pause callback was called
for, since
441 * libfaim extracts the data for the SNAC from the connection
structure.
442 temas 1.1 *
443 * Of course, if you don't do that, more bad things happen than
just what
444 * libfaim can cause.
445 *
446 */
447 faim_export int aim_sendpauseack(aim_session_t *sess, aim_conn_t
*conn)
448 {
449 aim_frame_t *fr;
450 aim_snacid_t snacid;
451 aim_conn_inside_t *ins = (aim_conn_inside_t *)conn->inside;
452 struct snacgroup *sg;
453
454 if (!(fr = aim_tx_new(sess, conn, AIM_FRAMETYPE_FLAP, 0x02,
1024)))
455 return -ENOMEM;
456
457 snacid = aim_cachesnac(sess, 0x0001, 0x000c, 0x0000, NULL, 0);
458 aim_putsnac(&fr->data, 0x0001, 0x000c, 0x0000, snacid);
459
460 /*
461 * This list should have all the groups that the original
462 * Host Online / Server Ready said this host supports. And
463 temas 1.1 * we want them all back after the migration.
464 */
465 for (sg = ins->groups; sg; sg = sg->next)
466 aimbs_put16(&fr->data, sg->group);
467
468 aim_tx_enqueue(sess, fr);
469
470 return 0;
471 }
472
473 /* Service Resume (group 1, type 0x0d) */
474 static int serverresume(aim_session_t *sess, aim_module_t *mod,
aim_frame_t *rx, aim_modsnac_t *snac, aim_bstream_t *bs)
475 {
476 aim_rxcallback_t userfunc;
477
478 if ((userfunc = aim_callhandler(sess, rx->conn, snac->family,
snac->subtype)))
479 return userfunc(sess, rx);
480
481 return 0;
482 }
source of information:
http://www.jabberstudio.org/cgi-bin/viewcvs.cgi/aim-transport/src/Attic/service.c?annotate=1.1&sortby=rev
msg02067/pgp00000.pgp
Description: signature
