- Timestamp:
- 2008-04-14T12:59:15Z (16 years ago)
- Branches:
- master
- Children:
- b79308b
- Parents:
- 2625d6d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
dcc.c
r2625d6d r6cac643 584 584 file_transfer_t *ft; 585 585 dcc_file_transfer_t *df; 586 587 if( regcomp( &re, pattern, REG_EXTENDED ) ) 586 char errbuf[256]; 587 int regerrcode, gret; 588 589 if( ( regerrcode = regcomp( &re, pattern, REG_EXTENDED ) ) || 590 ( regerrcode = regexec( &re, line, 9, pmatch, 0 ) ) ) { 591 regerror( regerrcode,&re,errbuf,sizeof( errbuf ) ); 592 imcb_log( ic, 593 "DCC: error parsing 'DCC SEND': %s, line: %s", 594 errbuf, line ); 588 595 return NULL; 589 if( regexec( &re, line, 9, pmatch, 0 ) ) 590 return NULL; 596 } 591 597 592 598 if( ( pmatch[1].rm_so > 0 ) && … … 616 622 if ( pmatch[5].rm_so > 0 ) 617 623 { 618 struct in_addr ipaddr = { htonl( atoi( input + pmatch[5].rm_so ) ) };624 struct in_addr ipaddr = { .s_addr = htonl( atoi( input + pmatch[5].rm_so ) ) }; 619 625 host = inet_ntoa( ipaddr ); 620 626 } else … … 631 637 632 638 memset( &hints, 0, sizeof ( struct addrinfo ) ); 633 if ( getaddrinfo( host, port, &hints, &rp) )639 if ( ( gret = getaddrinfo( host, port, &hints, &rp ) ) ) 634 640 { 635 641 g_free( input ); 642 imcb_log( ic, "DCC: getaddrinfo() failed with %s " 643 "when parsing incoming 'DCC SEND': " 644 "host %s, port %s", 645 gai_strerror( gret ), host, port ); 636 646 return NULL; 637 647 } … … 650 660 } 651 661 662 imcb_log( ic, "DCC: couldnt parse 'DCC SEND' line: %s", line ); 663 652 664 return NULL; 653 665 }
Note: See TracChangeset
for help on using the changeset viewer.