From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Aug 27 05:30:09 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8F54C16A41F for ; Sat, 27 Aug 2005 05:30:09 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 106A743D48 for ; Sat, 27 Aug 2005 05:30:09 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7R5U8rB009756 for ; Sat, 27 Aug 2005 05:30:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7R5U8Fl009748; Sat, 27 Aug 2005 05:30:08 GMT (envelope-from gnats) Resent-Date: Sat, 27 Aug 2005 05:30:08 GMT Resent-Message-Id: <200508270530.j7R5U8Fl009748@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Travis Poppe Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 81AF116A41F for ; Sat, 27 Aug 2005 05:29:47 +0000 (GMT) (envelope-from tlp@liquidx.org) Received: from illusionist.sov.kewlio.net.uk (fxp-0.712-illusionist.sov.kewlio.net.uk [85.116.0.25]) by mx1.FreeBSD.org (Postfix) with ESMTP id 09D0743D46 for ; Sat, 27 Aug 2005 05:29:46 +0000 (GMT) (envelope-from tlp@liquidx.org) Received: from maya.liquidx.org (168-103-42-226.bois.qwest.net [168.103.42.226]) (authenticated bits=0 user=tlp) by illusionist.sov.kewlio.net.uk (8.13.4/8.13.4) with ESMTP id j7R5TgJN053279 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO) for ; Sat, 27 Aug 2005 06:29:44 +0100 (BST) Message-Id: <200508262329.29862.tlp@liquidx.org> Date: Fri, 26 Aug 2005 23:29:29 -0600 From: Travis Poppe To: FreeBSD-gnats-submit@FreeBSD.org Cc: Subject: ports/85340: [PORT FIX] Fix net/naim so it will connect again X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Aug 2005 05:30:09 -0000 >Number: 85340 >Category: ports >Synopsis: [PORT FIX] Fix net/naim so it will connect again >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Aug 27 05:30:08 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Travis Poppe >Release: >Organization: >Environment: >Description: I was notified today that net/naim no longer connects to AIM. This is not a problem specific to FreeBSD. I've been provided an unofficial patch that fixes the problem (there will not likely be an official update for quite some time, as the author probably won't be available any time soon). I've included a diff containing the fix/patch. Patch author: Dane Wagner Additional discussion at: http://naimdoc.net/index.php/TOC_Issues >How-To-Repeat: >Fix: diff -ruN naim.orig/Makefile naim/Makefile --- naim.orig/Makefile Mon Apr 11 21:26:14 2005 +++ naim/Makefile Fri Aug 26 23:13:23 2005 @@ -7,6 +7,7 @@ PORTNAME= naim PORTVERSION= 0.11.7.3.1 +PORTREVISION= 1 CATEGORIES= net irc MASTER_SITES= http://shell.n.ml.org/n/naim/ diff -ruN naim.orig/files/patch-toc.c naim/files/patch-toc.c --- naim.orig/files/patch-toc.c Wed Dec 31 17:00:00 1969 +++ naim/files/patch-toc.c Fri Aug 26 23:13:01 2005 @@ -0,0 +1,92 @@ +--- firetalk/toc.c.orig Sun Jul 18 21:10:04 2004 ++++ firetalk/toc.c Fri Aug 26 13:09:16 2005 +@@ -1415,28 +1415,28 @@ + } else if (strcmp(arg0, "PAUSE") == 0) { + c->connectstate = 1; + firetalk_internal_set_connectstate(c, FCS_WAITING_SIGNON); +- } else if (strcmp(arg0, "IM_IN") == 0) { +- args = toc_parse_args(data, 4); ++ } else if (strcmp(arg0, "IM_IN2") == 0) { ++ args = toc_parse_args(data, 5); + if ((args[1] == NULL) || (args[2] == NULL) || (args[3] == NULL)) { + (void)toc_internal_disconnect(c, FE_INVALIDFORMAT); + return FE_INVALIDFORMAT; + } +- (void)aim_handle_ect(c, args[1], args[3], args[2][0] == 'T'?1:0); +- if (strlen(args[3]) > 0) { ++ (void)aim_handle_ect(c, args[1], args[4], args[2][0] == 'T'?1:0); ++ if (strlen(args[4]) > 0) { + char *mestart; + +- if (strncasecmp(args[3],"/me ",4) == 0) +- firetalk_callback_im_getaction(c, args[1], args[2][0] == 'T'?1:0, &args[3][4]); +- else if ((mestart = strstr(args[3],">/me ")) != NULL) ++ if (strncasecmp(args[4],"/me ",4) == 0) ++ firetalk_callback_im_getaction(c, args[1], args[2][0] == 'T'?1:0, &args[4][4]); ++ else if ((mestart = strstr(args[4],">/me ")) != NULL) + firetalk_callback_im_getaction(c, args[1], args[2][0] == 'T'?1:0, &mestart[5]); + else { + if (args[2][0] == 'T') /* interpolate only auto-messages */ +- firetalk_callback_im_getmessage(c, args[1], 1, aim_interpolate_variables(args[3], c->nickname)); ++ firetalk_callback_im_getmessage(c, args[1], 1, aim_interpolate_variables(args[4], c->nickname)); + else +- firetalk_callback_im_getmessage(c, args[1], 0, args[3]); ++ firetalk_callback_im_getmessage(c, args[1], 0, args[4]); + } + } +- } else if (strcmp(arg0, "UPDATE_BUDDY") == 0) { ++ } else if (strcmp(arg0, "UPDATE_BUDDY2") == 0) { + args = toc_parse_args(data,7); + if (!args[1] || !args[2] || !args[3] || !args[4] || !args[5] || !args[6]) { + (void)toc_internal_disconnect(c, FE_INVALIDFORMAT); +@@ -1609,6 +1609,7 @@ + char *tempchr2; + int permit_mode; + firetalk_t fchandle; ++ int magicnum; + + got_data_connecting_start: + r = toc_find_packet(c,buffer,bufferpos,data,c->connectstate == 0 ? SFLAP_FRAME_SIGNON : SFLAP_FRAME_DATA,&length); +@@ -1641,7 +1642,23 @@ + firetalk_callback_needpass(c,password,128); + + c->connectstate = 1; +- r = toc_send_printf(c,"toc_signon login.oscar.aol.com 5190 %s %s english \"" PACKAGE_NAME ":" PACKAGE_VERSION ":contact " PACKAGE_BUGREPORT "\"",c->nickname,toc_hash_password(password)); ++ ++ magicnum = 0; ++ { ++ /* see www.snaphat.com/toc2.txt */ ++ int a, b, cnum, sn, pw; ++ ++ sn = c->nickname[0] - 96; ++ pw = (int)(password[0]) - 96; ++ ++ a = sn * 7696 + 738816; ++ b = sn * 746512; ++ cnum = pw * a; ++ ++ magicnum = cnum - a + b + 71665152; ++ } ++ ++ r = toc_send_printf(c,"toc2_signon login.oscar.aol.com 5190 %s %s english \"TIC:naim\" 160 %d",c->nickname,toc_hash_password(password), magicnum); + if (r != FE_SUCCESS) { + firetalk_callback_connectfailed(c,r,"Error sending login string"); + return r; +@@ -1701,7 +1718,7 @@ + abort(); + } + c->connectstate = 3; +- } else if (strcmp(arg0,"CONFIG") == 0) { ++ } else if (strcmp(arg0,"CONFIG2") == 0) { + char *group; + + group = strdup("Saved buddy"); +@@ -1711,7 +1728,7 @@ + fchandle = firetalk_find_handle(c); + args = toc_parse_args(data,2); + if (!args[1]) { +- firetalk_callback_connectfailed(c,FE_INVALIDFORMAT,"CONFIG"); ++ firetalk_callback_connectfailed(c,FE_INVALIDFORMAT,"CONFIG2"); + return FE_INVALIDFORMAT; + } + tempchr1 = args[1]; >Release-Note: >Audit-Trail: >Unformatted: